This commit is contained in:
rsc 2003-09-30 19:05:50 +00:00
parent 2df2758496
commit 522b0689c3
180 changed files with 245 additions and 6144 deletions

View file

@ -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

View file

@ -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

View file

@ -1,6 +0,0 @@
CC=cc
CFLAGS=-O -c -Ae -I.
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O

View file

@ -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

View file

@ -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

View file

@ -1,6 +0,0 @@
CC=cc
CFLAGS+=-g -c -I.
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O

View file

@ -1,2 +0,0 @@
include Make.SunOS-sun4u-$(CC)
NAN=nan64.$O

View file

@ -1,6 +0,0 @@
CC=cc
CFLAGS+=-g -c -I. -O
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O

View file

@ -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

View file

@ -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)
HFILES=\
$(9SRC)/include/frame.h\
$(9SRC)/include/draw.h\
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)
include $(9SRC)/Makesyslib
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)
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
.phony: all clean nuke install tgz rpm ports

View file

@ -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

View file

@ -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)

View file

@ -1 +0,0 @@
<../libutf/mkfile