working demo
This commit is contained in:
parent
43d1c4a1ce
commit
fd8bdecb53
BIN
FIGlib-test
Executable file
BIN
FIGlib-test
Executable file
Binary file not shown.
8
Makefile
8
Makefile
@ -54,7 +54,8 @@ DEFAULTFONTFILE = standard
|
|||||||
|
|
||||||
VERSION = 2.2.5
|
VERSION = 2.2.5
|
||||||
DIST = figlet-$(VERSION)
|
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
|
BINS = figlet chkfont figlist showfigfonts
|
||||||
MANUAL = figlet.6 chkfont.6 figlist.6 showfigfonts.6
|
MANUAL = figlet.6 chkfont.6 figlist.6 showfigfonts.6
|
||||||
DFILES = Makefile Makefile.tc $(MANUAL) $(OBJS:.o=.c) chkfont.c getopt.c \
|
DFILES = Makefile Makefile.tc $(MANUAL) $(OBJS:.o=.c) chkfont.c getopt.c \
|
||||||
@ -70,6 +71,11 @@ all: $(BINS)
|
|||||||
figlet: $(OBJS)
|
figlet: $(OBJS)
|
||||||
$(LD) $(LDFLAGS) -o $@ $(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
|
chkfont: chkfont.o
|
||||||
$(LD) $(LDFLAGS) -o $@ chkfont.o
|
$(LD) $(LDFLAGS) -o $@ chkfont.o
|
||||||
|
|
||||||
|
10
figlet.c
10
figlet.c
@ -16,11 +16,9 @@ int argc;
|
|||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
inchr c,c2;
|
inchr c,c2;
|
||||||
int i;
|
|
||||||
int last_was_eol_flag;
|
int last_was_eol_flag;
|
||||||
|
|
||||||
Myargc = argc;
|
fig_init(argc, argv);
|
||||||
Myargv = argv;
|
|
||||||
getparams();
|
getparams();
|
||||||
readcontrolfiles();
|
readcontrolfiles();
|
||||||
readfont();
|
readfont();
|
||||||
@ -58,7 +56,11 @@ char *argv[];
|
|||||||
if ((c>'\0' && c<' ' && c!='\n') || c==127) continue;
|
if ((c>'\0' && c<' ' && c!='\n') || c==127) continue;
|
||||||
|
|
||||||
f(c);
|
f(c);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (outlinelen!=0) {
|
||||||
|
printline();
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
BIN
libfiglib.so
Executable file
BIN
libfiglib.so
Executable file
Binary file not shown.
@ -7,8 +7,14 @@ char *argv[];
|
|||||||
{
|
{
|
||||||
//fontinfo fi;
|
//fontinfo fi;
|
||||||
//readfont(&fi);
|
//readfont(&fi);
|
||||||
|
fig_init();
|
||||||
|
fontdirname = "fonts/";
|
||||||
|
readcontrolfiles();
|
||||||
readfont();
|
readfont();
|
||||||
inchrline = "test";
|
linealloc();
|
||||||
|
fs("Hello ");
|
||||||
|
fs("World!");
|
||||||
|
printline();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user