working demo

This commit is contained in:
anon 2023-03-13 10:35:02 +01:00
parent 43d1c4a1ce
commit fd8bdecb53
6 changed files with 1846 additions and 1817 deletions

BIN
FIGlib-test Executable file

Binary file not shown.

3637
FIGlib.h

File diff suppressed because it is too large Load Diff

@ -54,7 +54,8 @@ DEFAULTFONTFILE = standard
VERSION = 2.2.5
DIST = figlet-$(VERSION)
OBJS = figlet.o zipio.o crc.o inflate.o utf8.o
LIBOBJS = zipio.o crc.o inflate.o utf8.o
OBJS = $(LIBOBJS) figlet.o
BINS = figlet chkfont figlist showfigfonts
MANUAL = figlet.6 chkfont.6 figlist.6 showfigfonts.6
DFILES = Makefile Makefile.tc $(MANUAL) $(OBJS:.o=.c) chkfont.c getopt.c \
@ -70,6 +71,11 @@ all: $(BINS)
figlet: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS)
figlib: $(LIBOBJS)
$(CC) -shared -o libfiglib.so $(LIBOBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -I /home/anon/Swap/figlet/ -L /home/anon/Swap/figlet/ \
tests/FIGlib.c -o FIGlib-test -lfiglib
chkfont: chkfont.o
$(LD) $(LDFLAGS) -o $@ chkfont.o

@ -16,11 +16,9 @@ int argc;
char *argv[];
{
inchr c,c2;
int i;
int last_was_eol_flag;
Myargc = argc;
Myargv = argv;
fig_init(argc, argv);
getparams();
readcontrolfiles();
readfont();
@ -58,7 +56,11 @@ char *argv[];
if ((c>'\0' && c<' ' && c!='\n') || c==127) continue;
f(c);
}
if (outlinelen!=0) {
printline();
}
return 0;
}

BIN
libfiglib.so Executable file

Binary file not shown.

@ -7,8 +7,14 @@ char *argv[];
{
//fontinfo fi;
//readfont(&fi);
fig_init();
fontdirname = "fonts/";
readcontrolfiles();
readfont();
inchrline = "test";
linealloc();
fs("Hello ");
fs("World!");
printline();
return 0;
}