aboutsummaryrefslogtreecommitdiff
path: root/src/libframe
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-09-30 19:05:50 +0000
committerrsc <devnull@localhost>2003-09-30 19:05:50 +0000
commit522b0689c340d26feeac360640bf7e2e0582353c (patch)
treeba3a550c28684be3b3997899528a110c4e9cd91a /src/libframe
parent2df2758496b2ab508d349208449f04d85ae2eb2c (diff)
downloadplan9port-522b0689c340d26feeac360640bf7e2e0582353c.tar.gz
plan9port-522b0689c340d26feeac360640bf7e2e0582353c.tar.bz2
plan9port-522b0689c340d26feeac360640bf7e2e0582353c.zip
Reorg
Diffstat (limited to 'src/libframe')
-rw-r--r--src/libframe/Make.Darwin-PowerMacintosh6
-rw-r--r--src/libframe/Make.FreeBSD-3867
-rw-r--r--src/libframe/Make.HP-UX-90006
-rw-r--r--src/libframe/Make.Linux-3867
-rw-r--r--src/libframe/Make.NetBSD-3867
-rw-r--r--src/libframe/Make.OSF1-alpha6
-rw-r--r--src/libframe/Make.SunOS-sun4u2
-rw-r--r--src/libframe/Make.SunOS-sun4u-cc6
-rw-r--r--src/libframe/Make.SunOS-sun4u-gcc6
-rw-r--r--src/libframe/Makefile82
-rw-r--r--src/libframe/Makefile.MID21
-rw-r--r--src/libframe/frame.h85
-rw-r--r--src/libframe/mkfile1
13 files changed, 6 insertions, 236 deletions
diff --git a/src/libframe/Make.Darwin-PowerMacintosh b/src/libframe/Make.Darwin-PowerMacintosh
deleted file mode 100644
index 14b8d4e7..00000000
--- a/src/libframe/Make.Darwin-PowerMacintosh
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=gcc
-CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/libframe/Make.FreeBSD-386 b/src/libframe/Make.FreeBSD-386
deleted file mode 100644
index 087ed3ab..00000000
--- a/src/libframe/Make.FreeBSD-386
+++ /dev/null
@@ -1,7 +0,0 @@
-CC=gcc
-CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
-NAN=nan64.$O
diff --git a/src/libframe/Make.HP-UX-9000 b/src/libframe/Make.HP-UX-9000
deleted file mode 100644
index edbdc111..00000000
--- a/src/libframe/Make.HP-UX-9000
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=cc
-CFLAGS=-O -c -Ae -I.
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/libframe/Make.Linux-386 b/src/libframe/Make.Linux-386
deleted file mode 100644
index 74b0252c..00000000
--- a/src/libframe/Make.Linux-386
+++ /dev/null
@@ -1,7 +0,0 @@
-CC=gcc
-CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I.
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
-NAN=nan64.$O
diff --git a/src/libframe/Make.NetBSD-386 b/src/libframe/Make.NetBSD-386
deleted file mode 100644
index 087ed3ab..00000000
--- a/src/libframe/Make.NetBSD-386
+++ /dev/null
@@ -1,7 +0,0 @@
-CC=gcc
-CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
-NAN=nan64.$O
diff --git a/src/libframe/Make.OSF1-alpha b/src/libframe/Make.OSF1-alpha
deleted file mode 100644
index 3d45279b..00000000
--- a/src/libframe/Make.OSF1-alpha
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=cc
-CFLAGS+=-g -c -I.
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/libframe/Make.SunOS-sun4u b/src/libframe/Make.SunOS-sun4u
deleted file mode 100644
index c5fe67b8..00000000
--- a/src/libframe/Make.SunOS-sun4u
+++ /dev/null
@@ -1,2 +0,0 @@
-include Make.SunOS-sun4u-$(CC)
-NAN=nan64.$O
diff --git a/src/libframe/Make.SunOS-sun4u-cc b/src/libframe/Make.SunOS-sun4u-cc
deleted file mode 100644
index 829301de..00000000
--- a/src/libframe/Make.SunOS-sun4u-cc
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=cc
-CFLAGS+=-g -c -I. -O
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/libframe/Make.SunOS-sun4u-gcc b/src/libframe/Make.SunOS-sun4u-gcc
deleted file mode 100644
index 5c415948..00000000
--- a/src/libframe/Make.SunOS-sun4u-gcc
+++ /dev/null
@@ -1,6 +0,0 @@
-CC=gcc
-CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c
-O=o
-AR=ar
-ARFLAGS=rvc
-NAN=nan64.$O
diff --git a/src/libframe/Makefile b/src/libframe/Makefile
index 81b73e98..979e4eb1 100644
--- a/src/libframe/Makefile
+++ b/src/libframe/Makefile
@@ -1,27 +1,7 @@
-
-# this works in gnu make
-SYSNAME:=${shell uname}
-OBJTYPE:=${shell uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'}
-
-# this works in bsd make
-SYSNAME!=uname
-OBJTYPE!=uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'
-
-# the gnu rules will mess up bsd but not vice versa,
-# hence the gnu rules come first.
-
-include Make.$(SYSNAME)-$(OBJTYPE)
-
-PREFIX=/usr/local
-
-NUKEFILES=
-
-TGZFILES=
+9SRC=..
+include $(9SRC)/Makehdr
LIB=libframe.a
-VERSION=2.0
-PORTPLACE=devel/libframe
-NAME=libdraw
OFILES=\
frbox.$O\
@@ -34,59 +14,9 @@ OFILES=\
frstr.$O\
frutil.$O\
-all: $(LIB)
-
-install: $(LIB)
- install -c -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
- install -c -m 0644 frame.h $(PREFIX)/include/frame.h
-$(LIB): $(OFILES)
- $(AR) $(ARFLAGS) $(LIB) $(OFILES)
-
-NUKEFILES+=$(LIB)
-.c.$O:
- $(CC) $(CFLAGS) -I/usr/X11R6/include -I$(PREFIX)/include $*.c
-
-%.$O: %.c
- $(CC) $(CFLAGS) -I/usr/X11R6/include -I$(PREFIX)/include $*.c
-
-
-$(OFILES): $(HFILES)
-
-tgz:
- rm -rf $(NAME)-$(VERSION)
- mkdir $(NAME)-$(VERSION)
- cp Makefile Make.* README LICENSE NOTICE *.[ch137] rpm.spec bundle.ports $(TGZFILES) $(NAME)-$(VERSION)
- tar cf - $(NAME)-$(VERSION) | gzip >$(NAME)-$(VERSION).tgz
- rm -rf $(NAME)-$(VERSION)
-
-clean:
- rm -f $(OFILES) $(LIB)
-
-nuke:
- rm -f $(OFILES) *.tgz *.rpm $(NUKEFILES)
-
-rpm:
- make tgz
- cp $(NAME)-$(VERSION).tgz /usr/src/RPM/SOURCES
- rpm -ba rpm.spec
- cp /usr/src/RPM/SRPMS/$(NAME)-$(VERSION)-1.src.rpm .
- cp /usr/src/RPM/RPMS/i586/$(NAME)-$(VERSION)-1.i586.rpm .
- scp *.rpm rsc@amsterdam.lcs.mit.edu:public_html/software
-
-PORTDIR=/usr/ports/$(PORTPLACE)
+HFILES=\
+ $(9SRC)/include/frame.h\
+ $(9SRC)/include/draw.h\
-ports:
- make tgz
- rm -rf $(PORTDIR)
- mkdir $(PORTDIR)
- cp $(NAME)-$(VERSION).tgz /usr/ports/distfiles
- cat bundle.ports | (cd $(PORTDIR) && awk '$$1=="---" && $$3=="---" { ofile=$$2; next} {if(ofile) print >ofile}')
- (cd $(PORTDIR); make makesum)
- (cd $(PORTDIR); make)
- (cd $(PORTDIR); /usr/local/bin/portlint)
- rm -rf $(PORTDIR)/work
- shar `find $(PORTDIR)` > ports.shar
- (cd $(PORTDIR); tar cf - *) | gzip >$(NAME)-$(VERSION)-ports.tgz
- scp *.tgz rsc@amsterdam.lcs.mit.edu:public_html/software
+include $(9SRC)/Makesyslib
-.phony: all clean nuke install tgz rpm ports
diff --git a/src/libframe/Makefile.MID b/src/libframe/Makefile.MID
deleted file mode 100644
index f7d29ece..00000000
--- a/src/libframe/Makefile.MID
+++ /dev/null
@@ -1,21 +0,0 @@
-LIB=libframe.a
-VERSION=2.0
-PORTPLACE=devel/libframe
-NAME=libdraw
-
-OFILES=\
- frbox.$O\
- frdelete.$O\
- frdraw.$O\
- frinit.$O\
- frinsert.$O\
- frptofchar.$O\
- frselect.$O\
- frstr.$O\
- frutil.$O\
-
-all: $(LIB)
-
-install: $(LIB)
- install -c -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
- install -c -m 0644 frame.h $(PREFIX)/include/frame.h
diff --git a/src/libframe/frame.h b/src/libframe/frame.h
deleted file mode 100644
index 9b8194b7..00000000
--- a/src/libframe/frame.h
+++ /dev/null
@@ -1,85 +0,0 @@
-typedef struct Frbox Frbox;
-typedef struct Frame Frame;
-
-enum{
- BACK,
- HIGH,
- BORD,
- TEXT,
- HTEXT,
- NCOL
-};
-
-#define FRTICKW 3
-
-struct Frbox
-{
- long wid; /* in pixels */
- long nrune; /* <0 ==> negate and treat as break char */
- uchar *ptr;
- short bc; /* break char */
- short minwid;
-};
-
-struct Frame
-{
- Font *font; /* of chars in the frame */
- Display *display; /* on which frame appears */
- Image *b; /* on which frame appears */
- Image *cols[NCOL]; /* text and background colors */
- Rectangle r; /* in which text appears */
- Rectangle entire; /* of full frame */
- void (*scroll)(Frame*, int); /* scroll function provided by application */
- Frbox *box;
- ulong p0, p1; /* selection */
- ushort nbox, nalloc;
- ushort maxtab; /* max size of tab, in pixels */
- ushort nchars; /* # runes in frame */
- ushort nlines; /* # lines with text */
- ushort maxlines; /* total # lines in frame */
- ushort lastlinefull; /* last line fills frame */
- ushort modified; /* changed since frselect() */
- Image *tick; /* typing tick */
- Image *tickback; /* saved image under tick */
- int ticked; /* flag: is tick onscreen? */
-};
-
-ulong frcharofpt(Frame*, Point);
-Point frptofchar(Frame*, ulong);
-int frdelete(Frame*, ulong, ulong);
-void frinsert(Frame*, Rune*, Rune*, ulong);
-void frselect(Frame*, Mousectl*);
-void frselectpaint(Frame*, Point, Point, Image*);
-void frdrawsel(Frame*, Point, ulong, ulong, int);
-void frdrawsel0(Frame*, Point, ulong, ulong, Image*, Image*);
-void frinit(Frame*, Rectangle, Font*, Image*, Image**);
-void frsetrects(Frame*, Rectangle, Image*);
-void frclear(Frame*, int);
-
-uchar *_frallocstr(Frame*, unsigned);
-void _frinsure(Frame*, int, unsigned);
-Point _frdraw(Frame*, Point);
-void _frgrowbox(Frame*, int);
-void _frfreebox(Frame*, int, int);
-void _frmergebox(Frame*, int);
-void _frdelbox(Frame*, int, int);
-void _frsplitbox(Frame*, int, int);
-int _frfindbox(Frame*, int, ulong, ulong);
-void _frclosebox(Frame*, int, int);
-int _frcanfit(Frame*, Point, Frbox*);
-void _frcklinewrap(Frame*, Point*, Frbox*);
-void _frcklinewrap0(Frame*, Point*, Frbox*);
-void _fradvance(Frame*, Point*, Frbox*);
-int _frnewwid(Frame*, Point, Frbox*);
-int _frnewwid0(Frame*, Point, Frbox*);
-void _frclean(Frame*, Point, int, int);
-void _frredraw(Frame*, Point);
-void _fraddbox(Frame*, int, int);
-Point _frptofcharptb(Frame*, ulong, Point, int);
-Point _frptofcharnb(Frame*, ulong, int);
-int _frstrlen(Frame*, int);
-void frtick(Frame*, Point, int);
-void frinittick(Frame*);
-
-#define NRUNE(b) ((b)->nrune<0? 1 : (b)->nrune)
-#define NBYTE(b) strlen((char*)(b)->ptr)
diff --git a/src/libframe/mkfile b/src/libframe/mkfile
deleted file mode 100644
index bb99a25a..00000000
--- a/src/libframe/mkfile
+++ /dev/null
@@ -1 +0,0 @@
-<../libutf/mkfile