From 1c0bc9c51fdc8c3d2350cae1706f990b480bf0bd Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Tue, 8 May 2012 14:50:43 +0100 Subject: Revert Debian 2.2.2-1 patches --- chkfont.c | 63 ++++++++++++++++++++------------------------------------------- figlet.6 | 2 +- 2 files changed, 21 insertions(+), 44 deletions(-) diff --git a/chkfont.c b/chkfont.c index 0607511..8272207 100644 --- a/chkfont.c +++ b/chkfont.c @@ -1,14 +1,6 @@ #include #include #include -#ifdef __STDC__ -#include -#endif - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS (0) -#define EXIT_FAILURE (1) -#endif #define DATE "20 Feb 1996" #define VERSION "2.2" @@ -27,24 +19,18 @@ full o' bugs .... */ -/* Squashed some warnings and a double free(): Kenneth Davies Mar 14 2005 */ - /* #define CHECKBLANKS */ #define FONTFILESUFFIX ".flf" #define FONTFILEMAGICNUMBER "flf2" - -const char -posshardblanks[9] = { '!', '@', '#', '$', '%', '&', '*', '\177', '\0' }; +char posshardblanks[9] = { '!', '@', '#', '$', '%', '&', '*', 0x7f, 0 }; char *myname,*fontfilename; FILE *fontfile; char hardblank; -int charheight,upheight,old_layout; +int charheight,upheight,maxlen=0,old_layout; int spectagcnt; -char *fileline = NULL; -int currline; -int maxlinelength=0; -int maxlen=0; +char *fileline; +int maxlinelength=0,currline; int ec,wc; int incon_endmarkwarn,endmark_countwarn,nonincrwarn; @@ -52,8 +38,8 @@ int bigcodetagwarn,deutschcodetagwarn,asciicodetagwarn; int codetagcnt; int gone; -void -weregone(int really) +void weregone(really) +int really; { if (!really && 2*ec+wc<=40) { return; @@ -74,23 +60,23 @@ printf("------------------------------------------------------------------------ gone=1; } -char * -my_alloc(size_t size) +char *my_alloc(size) +int size; { char *ptr; ptr=(char *)malloc(size); if (ptr==NULL) { fprintf(stderr,"%s: Out of memory\n",myname); - exit(EXIT_FAILURE); /* Bail out now instead of not returning anything */ } else { return(ptr); } } -int -badsuffix(char *path, char *suffix) +int badsuffix(path,suffix) +char *path; +char *suffix; { char ucsuffix[10]; char *s; @@ -107,30 +93,22 @@ badsuffix(char *path, char *suffix) return 1; } -void -usageerr() +void usageerr() { fprintf(stderr,"chkfont by Glenn Chappell \n"); fprintf(stderr,"Version: %s, date: %s\n",VERSION,DATE); fprintf(stderr,"Checks figlet 2.0/2.1 font files for format errors.\n"); fprintf(stderr,"(Does not modify font files.)\n"); fprintf(stderr,"Usage: %s fontfile ...\n",myname); -exit(EXIT_FAILURE); +exit(1); } -void -readchar() +void readchar() { -int i,expected_width,k,diff,l; +int i,expected_width,k,len,newlen,diff,l; char endmark,expected_endmark; int leadblanks,minleadblanks,trailblanks,mintrailblanks; -int len, newlen; - - minleadblanks=0; - expected_endmark='\0'; - expected_width=0; - mintrailblanks=0; for (i=0;i0 && old_layout>=0) { } -void -checkit() +void checkit() { int i,k,cmtcount,numsread,ffrighttoleft,have_layout,layout; char magicnum[5],cha; @@ -246,7 +223,7 @@ else { fontfile=fopen(fontfilename,"r"); if (fontfile == NULL) { fprintf(stderr,"%s: Could not open file '%s'\n",myname,fontfilename); - exit(EXIT_FAILURE); + exit(1); } } @@ -281,7 +258,6 @@ numsread=sscanf(fileline,"%c %d %d %d %d %d %d %d %d", &hardblank,&charheight,&upheight,&maxlen,&old_layout,&cmtcount, &ffrighttoleft,&layout,&spectagcnt); free(fileline); -fileline = NULL; if (numsread<7) { ffrighttoleft=0; } @@ -460,8 +436,9 @@ weregone(1); if (gone) return; } -int -main(int argc, char *argv[]) +int main(argc,argv) +int argc; +char *argv[]; { int arg; diff --git a/figlet.6 b/figlet.6 index 8e183c0..fc6d8fd 100644 --- a/figlet.6 +++ b/figlet.6 @@ -1028,7 +1028,7 @@ Glenn Chappell did most of the work. You can e-mail him but he is not an e-mail fanatic; people who e-mail Glenn will probably get answers, but if you e-mail his best friend: -Ian Chai , who +Ian Chai , who .I is an e-mail fanatic, you'll get answers, endless conversation about the mysteries of life, invitations to join some 473 mailing lists and a -- cgit v1.2.3