From 6cbeff63c5f18ab4752342de7ae83a35118ebc38 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Wed, 24 Jun 2009 07:02:11 +0000 Subject: use ANSI C function declarations and prototypes git-svn-id: svn://tug.org/texlive/trunk@13938 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ChangeLog | 3 + Build/source/texk/web2c/alephdir/ChangeLog | 5 + Build/source/texk/web2c/alephdir/aleph.c | 50 +- Build/source/texk/web2c/alephdir/alephbis.c | 4 +- Build/source/texk/web2c/config.h | 8 +- Build/source/texk/web2c/cpascal.h | 2 +- Build/source/texk/web2c/ctiedir/ChangeLog | 2 + Build/source/texk/web2c/ctiedir/ctie-k.c | 1166 ------------------------ Build/source/texk/web2c/lib/ChangeLog | 7 + Build/source/texk/web2c/lib/basechsuffix.c | 4 +- Build/source/texk/web2c/lib/chartostring.c | 2 +- Build/source/texk/web2c/lib/coredump.c | 2 +- Build/source/texk/web2c/lib/eofeoln.c | 6 +- Build/source/texk/web2c/lib/fprintreal.c | 2 +- Build/source/texk/web2c/lib/input2int.c | 4 +- Build/source/texk/web2c/lib/inputint.c | 2 +- Build/source/texk/web2c/lib/main.c | 9 +- Build/source/texk/web2c/lib/openclose.c | 16 +- Build/source/texk/web2c/lib/printversion.c | 8 +- Build/source/texk/web2c/lib/texmfmp.c | 234 +++-- Build/source/texk/web2c/lib/uexit.c | 2 +- Build/source/texk/web2c/lib/usage.c | 4 +- Build/source/texk/web2c/lib/win32main.c | 6 +- Build/source/texk/web2c/lib/zround.c | 2 +- Build/source/texk/web2c/luatexdir/ChangeLog | 4 + Build/source/texk/web2c/luatexdir/lua/luatex.c | 8 +- Build/source/texk/web2c/texmfmp.h | 76 +- Build/source/texk/web2c/web2c/Makefile.am | 9 +- Build/source/texk/web2c/web2c/Makefile.in | 17 +- Build/source/texk/web2c/web2c/native/config.h | 119 --- Build/source/texk/web2c/window/ChangeLog | 6 + Build/source/texk/web2c/window/epsf.c | 20 +- Build/source/texk/web2c/window/hp2627.c | 20 +- Build/source/texk/web2c/window/mftalk.c | 26 +- Build/source/texk/web2c/window/next.c | 22 +- Build/source/texk/web2c/window/regis.c | 20 +- Build/source/texk/web2c/window/suntools.c | 20 +- Build/source/texk/web2c/window/tek.c | 24 +- Build/source/texk/web2c/window/uniterm.c | 24 +- Build/source/texk/web2c/window/win32.c | 21 +- 40 files changed, 371 insertions(+), 1615 deletions(-) delete mode 100644 Build/source/texk/web2c/ctiedir/ctie-k.c delete mode 100644 Build/source/texk/web2c/web2c/native/config.h (limited to 'Build/source/texk/web2c') diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 83f2c142783..44b129d7d16 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -2,6 +2,9 @@ * config.h: #include , not . + * config.h, cpascal.h, texmfmp.h: drop P?C, P?H, use ANSI C + function declarations. + 2009-06-15 Peter Breitenlohner * configure.ac: when Metafont is not built, use diff --git a/Build/source/texk/web2c/alephdir/ChangeLog b/Build/source/texk/web2c/alephdir/ChangeLog index 832942dffd7..94121282c0b 100644 --- a/Build/source/texk/web2c/alephdir/ChangeLog +++ b/Build/source/texk/web2c/alephdir/ChangeLog @@ -1,3 +1,8 @@ +2009-06-23 Peter Breitenlohner + + * aleph.c, alephbis.c: drop P?C, P?H, use ANSI C function + declarations. + 2009-02-26 Karl Berry * alephextra-rc2.h (BANNER, COPYRIGHT_HOLDER, BUG_ADDRESS): diff --git a/Build/source/texk/web2c/alephdir/aleph.c b/Build/source/texk/web2c/alephdir/aleph.c index af0fb3a0124..88bd9ca85fe 100644 --- a/Build/source/texk/web2c/alephdir/aleph.c +++ b/Build/source/texk/web2c/alephdir/aleph.c @@ -45,7 +45,7 @@ btestin(void) } int -getfilemode P2C(FILE *, f, int, def) +getfilemode (FILE *f, int def) { int c,m; if ((def==0)||(feof(f))) m=0; @@ -95,7 +95,7 @@ getfilemode P2C(FILE *, f, int, def) } int -getc_two_LE P1C(FILE *, f) +getc_two_LE (FILE *f) { register int i,j; i = getc(f); @@ -106,14 +106,14 @@ getc_two_LE P1C(FILE *, f) } void -ungetc_two_LE P2C(int, c, FILE *, f) +ungetc_two_LE (int c, FILE *f) { ungetc((c>>8), f); ungetc((c&0377), f); } int -getc_two P1C(FILE *, f) +getc_two (FILE *f) { register int i,j; i = getc(f); @@ -124,7 +124,7 @@ getc_two P1C(FILE *, f) } void -ungetc_two P2C(int, c, FILE *, f) +ungetc_two (int c, FILE *f) { ungetc((c&0377), f); ungetc((c>>8), f); @@ -133,7 +133,7 @@ ungetc_two P2C(int, c, FILE *, f) extern boolean zpnewinputln (); boolean -newinputln P4C(FILE *,f, halfword,themode, halfword,translation, boolean,bypass) +newinputln (FILE *f, halfword themode, halfword translation, boolean bypass) { return zpnewinputln((alphafile)f, (halfword)themode, @@ -142,7 +142,7 @@ newinputln P4C(FILE *,f, halfword,themode, halfword,translation, boolean,bypass) } boolean -new_input_line P2C(FILE *, f, halfword, themode) +new_input_line (FILE *f, halfword themode) { register int i=EOF; @@ -197,7 +197,7 @@ extern memoryword ziniteqtbentry () ; hashword hashtable[HASHTABLESIZE]; void -inithhashtable P1H(void) +inithhashtable (void) { int i; for (i=0; ip==p) return runner; @@ -223,7 +223,7 @@ createeqtbpos P1C(int, p) } memoryword * -createeqtbptr P1C(int, p) +createeqtbptr (int p) { hashword *runner= &(hashtable[p%HASHTABLESIZE]); if (runner->p==p) return (&(runner->mw)); @@ -239,7 +239,7 @@ createeqtbptr P1C(int, p) } hashword * -createxeqlevel P1C(int, p) +createxeqlevel (int p) { hashword *runner= &(hashtable[p%HASHTABLESIZE]); if (runner->p==p) return runner; @@ -256,7 +256,7 @@ createxeqlevel P1C(int, p) } hashword * -createhashpos P1C(int, p) +createhashpos (int p) { hashword *runner= &(hashtable[p%HASHTABLESIZE]); if (runner->p==p) return runner; @@ -273,7 +273,7 @@ createhashpos P1C(int, p) } void -dumphhashtable P1H(void) +dumphhashtable (void) { int i; hashword *runner; @@ -292,7 +292,7 @@ dumphhashtable P1H(void) } void -undumphhashtable P1H(void) +undumphhashtable (void) { int i,j; hashword *runner; @@ -321,7 +321,7 @@ undumphhashtable P1H(void) } void -odateandtime P4C(int,timecode, int,daycode, int,monthcode, int,yearcode) +odateandtime (int timecode, int daycode, int monthcode, int yearcode) { integer tc,dc,mc,yc; dateandtime(tc,dc,mc,yc); @@ -335,7 +335,7 @@ memoryword **fonttables; static int font_entries = 0; void -allocatefonttable P2C(int, font_number, int, font_size) +allocatefonttable (int font_number, int font_size) { int i; if (font_entries==0) { @@ -356,15 +356,14 @@ allocatefonttable P2C(int, font_number, int, font_size) } void -dumpfonttable P2C(int, font_number, int, words) +dumpfonttable (int font_number, int words) { fonttables[font_number][0].cint=words; dumpthings(fonttables[font_number][0], fonttables[font_number][0].cint+1); } void -undumpfonttable(font_number) -int font_number; +undumpfonttable(int font_number) { memoryword sizeword; if (font_entries==0) { @@ -386,7 +385,7 @@ memoryword **fontsorttables; static int fontsort_entries = 0; void -allocatefontsorttable P2C(int, fontsort_number, int, fontsort_size) +allocatefontsorttable (int fontsort_number, int fontsort_size) { int i; if (fontsort_entries==0) { @@ -407,7 +406,7 @@ allocatefontsorttable P2C(int, fontsort_number, int, fontsort_size) } void -dumpfontsorttable P2C(int, fontsort_number, int, words) +dumpfontsorttable (int fontsort_number, int words) { fontsorttables[fontsort_number][0].cint=words; dumpthings(fontsorttables[fontsort_number][0], @@ -415,8 +414,7 @@ dumpfontsorttable P2C(int, fontsort_number, int, words) } void -undumpfontsorttable(fontsort_number) -int fontsort_number; +undumpfontsorttable(int fontsort_number) { memoryword sizeword; if (fontsort_entries==0) { @@ -438,7 +436,7 @@ int **ocptables; static int ocp_entries = 0; void -allocateocptable P2C(int, ocp_number, int, ocp_size) +allocateocptable (int ocp_number, int ocp_size) { int i; if (ocp_entries==0) { @@ -457,13 +455,13 @@ allocateocptable P2C(int, ocp_number, int, ocp_size) } void -dumpocptable P1C(int, ocp_number) +dumpocptable (int ocp_number) { dumpthings(ocptables[ocp_number][0], ocptables[ocp_number][0]+1); } void -undumpocptable P1C(int, ocp_number) +undumpocptable (int ocp_number) { int sizeword; if (ocp_entries==0) { diff --git a/Build/source/texk/web2c/alephdir/alephbis.c b/Build/source/texk/web2c/alephdir/alephbis.c index c74eb33206a..f2398bbf291 100644 --- a/Build/source/texk/web2c/alephdir/alephbis.c +++ b/Build/source/texk/web2c/alephdir/alephbis.c @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if 1 void -runexternalocp P1C(string, external_ocp_name) +runexternalocp (string external_ocp_name) { char *in_file_name; char *out_file_name; @@ -211,7 +211,7 @@ end_of_while: #else void -runexternalocp P1C(string, external_ocp_name) +runexternalocp (string external_ocp_name) { int outpipes[2], inpipes[2]; char *outbuf; diff --git a/Build/source/texk/web2c/config.h b/Build/source/texk/web2c/config.h index b97a6144c2c..52e8bec92f4 100644 --- a/Build/source/texk/web2c/config.h +++ b/Build/source/texk/web2c/config.h @@ -105,15 +105,15 @@ typedef off_t longinteger; /* strtol.c */ #ifndef HAVE_STRTOL -extern long strtol P3H(const char *, char **, int); +extern long strtol (const char *, char **, int); #endif /* From uexit.c. This is here because the lib/ and web2c/ routines themselves can use it, but they don't need cpascal.h. */ -extern void uexit P1H(int status); +extern void uexit (int status); /* usage.c */ -extern void usage P1H(const_string progname); -extern void usagehelp P2H(const_string *message, const_string bug_email); +extern void usage (const_string progname); +extern void usagehelp (const_string *message, const_string bug_email); #endif /* not WEB2C_CONFIG_H */ diff --git a/Build/source/texk/web2c/cpascal.h b/Build/source/texk/web2c/cpascal.h index 254666359de..bdafa3c2dd7 100644 --- a/Build/source/texk/web2c/cpascal.h +++ b/Build/source/texk/web2c/cpascal.h @@ -285,6 +285,6 @@ typedef struct option getoptstruct; /* Declarations for the routines we provide ourselves in lib/. */ #include "lib/lib.h" -extern int loadpoolstrings P1H(integer); +extern int loadpoolstrings (integer); #endif /* not CPASCAL_H */ diff --git a/Build/source/texk/web2c/ctiedir/ChangeLog b/Build/source/texk/web2c/ctiedir/ChangeLog index 046d4c8b73f..690c025ff37 100644 --- a/Build/source/texk/web2c/ctiedir/ChangeLog +++ b/Build/source/texk/web2c/ctiedir/ChangeLog @@ -2,6 +2,8 @@ * ctie-k.ch: drop P?C, P?H, use ANSI C function declarations. + * ctie-k.c (removed): obsolete, there still is ctie.c. + 2005-02-05 Olaf Weber * ctie.1: Correct header from TIE to CTIE. diff --git a/Build/source/texk/web2c/ctiedir/ctie-k.c b/Build/source/texk/web2c/ctiedir/ctie-k.c deleted file mode 100644 index bfa74483d5d..00000000000 --- a/Build/source/texk/web2c/ctiedir/ctie-k.c +++ /dev/null @@ -1,1166 +0,0 @@ -#define version_number "1.1" -#define banner "This is CTIE, Version 1.1" -#define copyright \ -"Copyright 2002,2003 Julian Gilbey. All rights reserved. There is no warranty.\n\ -Run with the --version option for other important information." \ - \ - -#define kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) \ - -#define buf_size 1024 -#define max_file_index 32 \ - -#define xisupper(c) (isupper(c) &&((unsigned char) c<0200) ) \ - \ - -#define spotless 0 -#define troublesome 1 -#define fatal 2 \ - -#define max_include_files 20 \ - -#define max_file_name_length 1024 \ - -#define too_long() {total_include_files--;free(new_inc) ; \ -err_print(i,"! Include file name too long") ;goto restart;} \ - -#define fatal_error(i,s,t) { \ -fprintf(stderr,"\n%s",s) ; \ -err_print(i,t) ; \ -history= fatal; \ -exit(wrap_up() ) ; \ -} \ - \ - -#define none (-1) \ - -/*2:*/ -#line 89 "./ctie.w" - -/*10:*/ -#line 172 "./ctie.w" - -#include - - -#line 126 "./ctie-k.ch" -/*:10*//*39:*/ -#line 715 "./ctie.w" - -#include - - -/*:39*//*72:*/ -#line 454 "./ctie-k.ch" - -#include - -/*:72*/ -#line 90 "./ctie.w" - -/*12:*/ -#line 211 "./ctie.w" - -#define search 0 -#define test 1 -#define reading 2 -#define ignore 3 -typedef int in_file_modes; -#define unknown 0 -#define master 1 -#define chf 2 -typedef int file_types; - - -/*:12*//*13:*/ -#line 229 "./ctie.w" - -#define normal 0 -#define pre 1 -#define post 2 -typedef int out_md_type; - - -/*:13*//*14:*/ -#line 239 "./ctie.w" - -typedef int file_index; - - -/*:14*//*15:*/ -#line 246 "./ctie.w" - -typedef struct _indsc{ -char file_name[max_file_name_length]; -long line; -FILE*the_file; -struct _indsc*parent; -}include_description; - - -/*:15*//*16:*/ -#line 259 "./ctie.w" - -typedef struct _idsc{ -string file_name; -char buffer[buf_size]; -in_file_modes mode; -long line; -file_types type_of_file; -include_description*current_include; -char*buffer_end; -char*limit; -char*loc; -FILE*the_file; -int dont_match; -}input_description; - - -/*:16*/ -#line 91 "./ctie.w" - -/*30:*/ -#line 584 "./ctie.w" - -#line 223 "./ctie-k.ch" -void err_print P2H(file_index,char*); -#line 586 "./ctie.w" - -/*:30*//*35:*/ -#line 673 "./ctie.w" - -#line 243 "./ctie-k.ch" -int wrap_up P1H(void); -#line 675 "./ctie.w" - -/*:35*//*37:*/ -#line 696 "./ctie.w" - -#line 249 "./ctie-k.ch" -void pfatal_error P2H(char*,char*); -#line 698 "./ctie.w" - -/*:37*//*69:*/ -#line 1232 "./ctie.w" - -#line 392 "./ctie-k.ch" -void usage_help P1H(void); -void print_version_and_exit P2H(string,string); -#line 1235 "./ctie.w" - - -/*:69*/ -#line 92 "./ctie.w" - -/*9:*/ -#line 162 "./ctie.w" - -int history= spotless; - - -/*:9*//*17:*/ -#line 286 "./ctie.w" - -int total_include_files= 0; - -/*:17*//*18:*/ -#line 292 "./ctie.w" - -file_index actual_input,test_input,no_ch; -file_types prod_chf= unknown; -out_md_type out_mode; - -/*:18*//*20:*/ -#line 309 "./ctie.w" - -input_description*input_organisation[max_file_index+1]; - - -/*:20*//*24:*/ -#line 406 "./ctie.w" - -boolean input_has_ended= false; - - -/*:24*//*41:*/ -#line 742 "./ctie.w" - -FILE*out_file; -string out_name; - - -#line 273 "./ctie-k.ch" -/*:41*//*68:*/ -#line 1217 "./ctie.w" - -string CTIEHELP[]= { -"Usage: ctie -[mc] outfile master changefile(s)", -" Create a new master file or change file from the given", -" master (C)WEB file and changefiles.", -" All filenames are taken literally; no suffixes are added.", -"", -"-m create a new master file from original (C)WEB and change file(s)", -"-c create a master change file for original (C)WEB file from changefile(s)", -"--help display this help and exit", -"--version display version information and exit", -NULL -}; - - -/*:68*//*73:*/ -#line 459 "./ctie-k.ch" - -string file_open_mode; -#line 1278 "./ctie.w" - - -/*:73*/ -#line 93 "./ctie.w" - -/*31:*/ -#line 589 "./ctie.w" - -#line 230 "./ctie-k.ch" -void err_print P2C(file_index,i,char*,s) - -#line 592 "./ctie.w" -{ -char*k,*l; -fprintf(stderr,*s=='!'?"\n%s":"%s",s); -if(i>=0)/*32:*/ -#line 611 "./ctie.w" - -{ -register input_description*inp_desc= input_organisation[i]; -register include_description*inc_desc= inp_desc->current_include; - -if(inc_desc!=NULL){ -fprintf(stderr,". (l. %ld of include file %s",inc_desc->line, -inc_desc->file_name); -fprintf(stderr," included from l. %ld of %s file %s)\n", -inp_desc->line, -inp_desc->type_of_file==master?"master":"change", -inp_desc->file_name); -} -else -fprintf(stderr,". (l. %ld of %s file %s)\n",inp_desc->line, -inp_desc->type_of_file==master?"master":"change", -inp_desc->file_name); -l= (inp_desc->loc>=inp_desc->limit?inp_desc->limit:inp_desc->loc); -if(l> inp_desc->buffer){ -for(k= inp_desc->buffer;kbuffer;klimit;k++) -putc(*k,stderr); -putc('\n',stderr); -} - - -/*:32*/ -#line 595 "./ctie.w" - -else putc('\n',stderr); -fflush(stderr); -history= troublesome; -} - -/*:31*//*38:*/ -#line 699 "./ctie.w" - -#line 256 "./ctie-k.ch" -void pfatal_error P2C(char*,s,char*,t) -#line 702 "./ctie.w" -{ -char*strerr= strerror(errno); - -fprintf(stderr,"\n%s%s",s,t); -if(strerr)fprintf(stderr," (%s)\n",strerr); -else fprintf(stderr,"\n"); -history= fatal; -exit(wrap_up()); -} - - -/*:38*/ -#line 94 "./ctie.w" - -/*21:*/ -#line 328 "./ctie.w" - -#line 143 "./ctie-k.ch" -boolean get_line P2C(file_index,i,boolean,do_includes) -#line 331 "./ctie.w" -{ -register input_description*inp_desc= input_organisation[i]; -register FILE*fp; - -if(inp_desc->mode==ignore)return false; - -restart: -if(inp_desc->current_include!=NULL){ -register include_description*inc_desc= inp_desc->current_include; - -fp= inc_desc->the_file; -/*26:*/ -#line 426 "./ctie.w" - -{ -register int c; -register char*k; - -if(feof(fp)) -/*27:*/ -#line 452 "./ctie.w" - -{ -include_description*temp= inc_desc->parent; - -fclose(fp); -free(inc_desc); -total_include_files--; -inp_desc->current_include= temp; -goto restart; -} - - -/*:27*/ -#line 432 "./ctie.w" - - -inp_desc->limit= k= inp_desc->buffer; -while(k<=inp_desc->buffer_end&&(c= getc(fp))!=EOF&&c!='\n') -if((*(k++)= c)!=' ')inp_desc->limit= k; -if(k> inp_desc->buffer_end) -if((c= getc(fp))!=EOF&&c!='\n'){ -ungetc(c,fp);inp_desc->loc= inp_desc->buffer; -err_print(i,"! Input line too long"); - -} -if(c==EOF&&inp_desc->limit==inp_desc->buffer) -/*27:*/ -#line 452 "./ctie.w" - -{ -include_description*temp= inc_desc->parent; - -fclose(fp); -free(inc_desc); -total_include_files--; -inp_desc->current_include= temp; -goto restart; -} - - -/*:27*/ -#line 444 "./ctie.w" - - -inc_desc->line++; -} - -/*:26*/ -#line 342 "./ctie.w" - -} -else{ -fp= inp_desc->the_file; -/*22:*/ -#line 366 "./ctie.w" - -{ -register int c; -register char*k; - -if(feof(fp)) -/*23:*/ -#line 394 "./ctie.w" - -{ -inp_desc->mode= ignore; -inp_desc->limit= NULL; -if(inp_desc->type_of_file==master)input_has_ended= true; -fclose(fp); -return false; -} - - -/*:23*/ -#line 372 "./ctie.w" - - -inp_desc->limit= k= inp_desc->buffer; -while(k<=inp_desc->buffer_end&&(c= getc(fp))!=EOF&&c!='\n') -if((*(k++)= c)!=' ')inp_desc->limit= k; -if(k> inp_desc->buffer_end) -if((c= getc(fp))!=EOF&&c!='\n'){ -ungetc(c,fp);inp_desc->loc= inp_desc->buffer; -err_print(i,"! Input line too long"); - -} -if(c==EOF&&inp_desc->limit==inp_desc->buffer) -/*23:*/ -#line 394 "./ctie.w" - -{ -inp_desc->mode= ignore; -inp_desc->limit= NULL; -if(inp_desc->type_of_file==master)input_has_ended= true; -fclose(fp); -return false; -} - - -/*:23*/ -#line 384 "./ctie.w" - - -/*25:*/ -#line 414 "./ctie.w" - -inp_desc->line++; -if(inp_desc->type_of_file==master&&inp_desc->line%100==0){ -if(inp_desc->line%500==0)printf("%ld",inp_desc->line); -else putchar('.'); -fflush(stdout); -} - - -/*:25*/ -#line 387 "./ctie.w" - -} - - -/*:22*/ -#line 346 "./ctie.w" - -} - -if(do_includes) -/*28:*/ -#line 467 "./ctie.w" - -{ -inp_desc->loc= inp_desc->buffer; -*inp_desc->limit= ' '; -if(*inp_desc->buffer=='@'&& -(inp_desc->buffer[1]=='i'||inp_desc->buffer[1]=='I')){ -inp_desc->loc= inp_desc->buffer+2; -*inp_desc->limit= '"'; -while(*inp_desc->loc==' '||*inp_desc->loc=='\t') -inp_desc->loc++; -if(inp_desc->loc>=inp_desc->limit){ -err_print(i,"! Include file name not given"); - -goto restart; -} -if(total_include_files>=max_include_files){ -err_print(i,"! Too many nested includes"); - -goto restart; -} -total_include_files++; -/*29:*/ -#line 507 "./ctie.w" - -{ -include_description*new_inc; -#line 166 "./ctie-k.ch" -char*file_name_end; -string fullname; -char*k; -#line 514 "./ctie.w" - -new_inc= (include_description*)malloc(sizeof(include_description)); -if(new_inc==NULL) -fatal_error(i,"! No memory for new include descriptor",""); -new_inc->line= 0; -k= new_inc->file_name; -file_name_end= k+max_file_name_length-1; - -if(*inp_desc->loc=='"'){ -inp_desc->loc++; -while(*inp_desc->loc!='"'&&k<=file_name_end) -*k++= *inp_desc->loc++; -if(inp_desc->loc==inp_desc->limit) -k= file_name_end+1; -}else -while(*inp_desc->loc!=' '&&*inp_desc->loc!='\t'&& -*inp_desc->loc!='"'&&k<=file_name_end)*k++= *inp_desc->loc++; -if(k> file_name_end)too_long(); - -*k= '\0'; -#line 174 "./ctie-k.ch" -fullname= kpse_find_cweb(new_inc->file_name); -if(fullname) -new_inc->the_file= fopen(fullname,"r"); -if(fullname!=NULL&&new_inc->the_file!=NULL){ -free(fullname); -#line 535 "./ctie.w" -new_inc->parent= inp_desc->current_include; -inp_desc->current_include= new_inc; -goto restart; -} -#line 563 "./ctie.w" -total_include_files--; -free(new_inc); -#line 212 "./ctie-k.ch" -if(fullname){ -free(fullname); -err_print(i,"! Cannot open include file"); -}else -err_print(i,"! Cannot find include file"); -#line 566 "./ctie.w" - -goto restart; -} - - - -/*:29*/ -#line 488 "./ctie.w" -; -} -} - - -/*:28*/ -#line 351 "./ctie.w" - -return true; -} - - -/*:21*//*34:*/ -#line 663 "./ctie.w" - -#line 237 "./ctie-k.ch" -int wrap_up P1H(void) -#line 665 "./ctie.w" -{ -/*36:*/ -#line 682 "./ctie.w" - -switch(history){ -case spotless: -printf("\n(No errors were found.)\n");break; -case troublesome: -printf("\n(Pardon me, but I think I spotted something wrong.)\n");break; -case fatal:printf("(That was a fatal error, my friend.)\n"); -} - - -/*:36*/ -#line 666 "./ctie.w" -; -if(history> spotless)return 1; -else return 0; -} - -/*:34*//*44:*/ -#line 791 "./ctie.w" - -#line 342 "./ctie-k.ch" -boolean lines_dont_match P2C(file_index,i,file_index,j) -#line 794 "./ctie.w" -{ -register input_description*iptr= input_organisation[i], -*jptr= input_organisation[j]; - -if(iptr->limit-iptr->buffer!=jptr->limit-jptr->buffer) -return true; -return strncmp(iptr->buffer,jptr->buffer,iptr->limit-iptr->buffer); -} - - -/*:44*//*45:*/ -#line 808 "./ctie.w" - -#line 349 "./ctie-k.ch" -void init_change_file P1C(file_index,i) -#line 811 "./ctie.w" -{ -register input_description*inp_desc= input_organisation[i]; -char ccode; - -inp_desc->limit= inp_desc->buffer; -/*46:*/ -#line 827 "./ctie.w" - -while(1){ -if(!get_line(i,false))return; -if(inp_desc->limitbuffer+2)continue; -if(inp_desc->buffer[0]!='@')continue; -ccode= inp_desc->buffer[1]; -if(xisupper(ccode))ccode= tolower(ccode); -if(ccode=='x')break; -if(ccode=='y'||ccode=='z'||ccode=='i'){ -inp_desc->loc= inp_desc->buffer+2; -err_print(i,"! Missing @x in change file"); - -} -} - -/*:46*/ -#line 816 "./ctie.w" - -/*47:*/ -#line 844 "./ctie.w" - -do{ -if(!get_line(i,true)){ -err_print(i,"! Change file ended after @x"); - -return; -} -}while(inp_desc->limit==inp_desc->buffer); - - -/*:47*/ -#line 817 "./ctie.w" - -inp_desc->dont_match= 0; -} - - -/*:45*//*48:*/ -#line 857 "./ctie.w" - -#line 356 "./ctie-k.ch" -void put_line P1C(file_index,j) -#line 860 "./ctie.w" -{ -char*ptr= input_organisation[j]->buffer; -char*lmt= input_organisation[j]->limit; - -while(ptrlimit==NULL){ -err_print(i,"! Change file ended without @z"); - -return true; -}else if(inp_desc->limit>=inp_desc->buffer+2) -if(inp_desc->buffer[0]=='@'&& -(inp_desc->buffer[1]=='Z'||inp_desc->buffer[1]=='z')) -return true; -return false; -} - - -/*:49*//*50:*/ -#line 893 "./ctie.w" - -#line 370 "./ctie-k.ch" -boolean e_of_ch_preamble P1C(file_index,i) -#line 896 "./ctie.w" -{ -register input_description*inp_desc= input_organisation[i]; - -if(inp_desc->limit>=inp_desc->buffer+2&&inp_desc->buffer[0]=='@') -if(inp_desc->buffer[1]=='Y'||inp_desc->buffer[1]=='y'){ -if(inp_desc->dont_match> 0){ -inp_desc->loc= inp_desc->buffer+2; -fprintf(stderr,"\n! Hmm... %d ",inp_desc->dont_match); -err_print(i,"of the preceding lines failed to match"); -} -return true; -} -return false; -} - - - -/*:50*//*61:*/ -#line 1105 "./ctie.w" - -#line 376 "./ctie-k.ch" -void usage_error P1H(void) -#line 1107 "./ctie.w" -{ -/*62:*/ -#line 1118 "./ctie.w" - -#line 382 "./ctie-k.ch" -{ -extern KPSEDLL string kpathsea_version_string; -printf("%s (%s)\n",banner,kpathsea_version_string); -} -#line 1120 "./ctie.w" -printf("%s\n",copyright); - - -/*:62*/ -#line 1108 "./ctie.w" -; -fprintf(stderr,"Usage: ctie -[mc] outfile master changefile(s)\n"); -fprintf(stderr,"Type ctie --help for more information\n"); -exit(1); -} - - -/*:61*/ -#line 95 "./ctie.w" - -/*3:*/ -#line 101 "./ctie.w" - -#line 32 "./ctie-k.ch" -int main P2C(int,argc,string*,argv) -#line 104 "./ctie.w" -{ -#line 38 "./ctie-k.ch" -/*5:*/ -#line 84 "./ctie-k.ch" - -kpse_set_program_name(argv[0],"ctie"); - -/*:5*/ -#line 38 "./ctie-k.ch" -; -/*19:*/ -#line 300 "./ctie.w" - -actual_input= 0; -out_mode= normal; - -/*:19*/ -#line 39 "./ctie-k.ch" -; -#line 106 "./ctie.w" -/*63:*/ -#line 1135 "./ctie.w" - -{ -if(argc> max_file_index+5-1)usage_error(); -no_ch= -1; -while(--argc> 0){ -argv++; -if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0) -/*66:*/ -#line 1202 "./ctie.w" - -usage_help(); - - - -/*:66*/ -#line 1142 "./ctie.w" -; -if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0) -/*67:*/ -#line 1208 "./ctie.w" - -{ -print_version_and_exit("CTIE",version_number); - -} - - -/*:67*/ -#line 1144 "./ctie.w" -; -if(**argv=='-')/*64:*/ -#line 1158 "./ctie.w" - -if(prod_chf!=unknown)usage_error(); -else -switch(*(*argv+1)){ -case'c':case'C':prod_chf= chf;break; -case'm':case'M':prod_chf= master;break; -default:usage_error(); -} - - -/*:64*/ -#line 1145 "./ctie.w" - -else/*65:*/ -#line 1172 "./ctie.w" - -{ -if(no_ch==(-1)){ -out_name= *argv; -}else{ -register input_description*inp_desc; - -inp_desc= (input_description*)malloc(sizeof(input_description)); -if(inp_desc==NULL) -fatal_error(-1,"! No memory for input descriptor",""); - -inp_desc->mode= search; -inp_desc->line= 0; -inp_desc->type_of_file= chf; -inp_desc->limit= inp_desc->buffer; -inp_desc->buffer[0]= ' '; -inp_desc->loc= inp_desc->buffer+1; -inp_desc->buffer_end= inp_desc->buffer+buf_size-2; -inp_desc->file_name= *argv; -inp_desc->current_include= NULL; -input_organisation[no_ch]= inp_desc; -} -no_ch++; -} - - -/*:65*/ -#line 1146 "./ctie.w" - -} -if(no_ch<=0||prod_chf==unknown)usage_error(); -} - - -/*:63*/ -#line 106 "./ctie.w" - -/*62:*/ -#line 1118 "./ctie.w" - -#line 382 "./ctie-k.ch" -{ -extern KPSEDLL string kpathsea_version_string; -printf("%s (%s)\n",banner,kpathsea_version_string); -} -#line 1120 "./ctie.w" -printf("%s\n",copyright); - - -/*:62*/ -#line 107 "./ctie.w" -; -/*42:*/ -#line 277 "./ctie-k.ch" - -{ -string fullname; - -fullname= kpse_find_cweb(input_organisation[0]->file_name); -if(fullname) -input_organisation[0]->the_file= fopen(fullname,"r"); - -if(fullname==NULL||input_organisation[0]->the_file==NULL){ -if(fullname){ -pfatal_error("! Cannot open master file ", -input_organisation[0]->file_name); -}else{ -fatal_error(-1,"! Cannot find master file ", -input_organisation[0]->file_name); -} -} -else free(fullname); - - -#line 759 "./ctie.w" -printf("(%s)\n",input_organisation[0]->file_name); -input_organisation[0]->type_of_file= master; -get_line(0,true); -} - - -/*:42*/ -#line 108 "./ctie.w" - -/*43:*/ -#line 313 "./ctie-k.ch" - -{ -file_index i; -string fullname; - -i= 1; -while(ifile_name); -if(fullname) -input_organisation[i]->the_file= fopen(fullname,"r"); - -if(fullname==NULL||input_organisation[i]->the_file==NULL){ -if(fullname){ -pfatal_error("! Cannot open change file ", -input_organisation[i]->file_name); -}else{ -fatal_error(-1,"! Cannot find change file ", -input_organisation[i]->file_name); -} -} -else free(fullname); - - -#line 780 "./ctie.w" -printf("(%s)\n",input_organisation[i]->file_name); -init_change_file(i); -i++; -} -} - - -/*:43*/ -#line 109 "./ctie.w" - -/*40:*/ -#line 729 "./ctie.w" - -{ -out_file= fopen(out_name,"w"); -if(out_file==NULL){ -pfatal_error("! Cannot open/create output file",""); - -} -} - - -/*:40*/ -#line 110 "./ctie.w" - -/*59:*/ -#line 1074 "./ctie.w" - -actual_input= 0; -input_has_ended= false; -while(input_has_ended==false||actual_input!=0) -/*51:*/ -#line 917 "./ctie.w" - -{ -file_index test_file; - -/*52:*/ -#line 934 "./ctie.w" - -{ -register input_description*inp_desc; -while(actual_input> 0&&e_of_ch_module(actual_input)){ -inp_desc= input_organisation[actual_input]; -if(inp_desc->type_of_file==master){ - -fatal_error(-1,"! This can't happen: change file is master file",""); - -} -inp_desc->mode= search; -init_change_file(actual_input); -while((input_organisation[actual_input]->mode!=reading -&&actual_input> 0)) -actual_input--; -} -} - - -/*:52*/ -#line 921 "./ctie.w" - -if(input_has_ended&&actual_input==0)break; -/*53:*/ -#line 960 "./ctie.w" - -test_input= none; -test_file= actual_input; -while(test_input==none&&test_filemode){ -case search: -if(lines_dont_match(actual_input,test_file)==false){ -input_organisation[test_file]->mode= test; -test_input= test_file; -} -break; -case test: -if(lines_dont_match(actual_input,test_file)){ - -input_organisation[test_file]->dont_match++; -} -test_input= test_file; -break; -case reading: -break; -case ignore: -break; -} -} - - -/*:53*/ -#line 923 "./ctie.w" - -/*54:*/ -#line 993 "./ctie.w" - -if(prod_chf==chf){ -while(1){ -/*55:*/ -#line 1007 "./ctie.w" - -if(out_mode==normal){ -if(test_input!=none){ -fprintf(out_file,"@x\n"); -out_mode= pre; -}else break; -} - - -/*:55*/ -#line 996 "./ctie.w" - -/*56:*/ -#line 1021 "./ctie.w" - -if(out_mode==pre){ -if(test_input==none){ -fprintf(out_file,"@y\n"); -out_mode= post; -}else{ -if(input_organisation[actual_input]->type_of_file==master) -put_line(actual_input); -break; -} -} - - -/*:56*/ -#line 997 "./ctie.w" - -/*57:*/ -#line 1040 "./ctie.w" - -if(out_mode==post){ -if(input_organisation[actual_input]->type_of_file==chf){ -if(test_input==none)put_line(actual_input); -break; -}else{ -fprintf(out_file,"@z\n\n"); -out_mode= normal; -} -} - - -/*:57*/ -#line 998 "./ctie.w" - -} -}else -if(test_input==none)put_line(actual_input); - - -/*:54*/ -#line 924 "./ctie.w" - -/*58:*/ -#line 1055 "./ctie.w" - -get_line(actual_input,true); -if(test_input!=none){ -get_line(test_input,true); -if(e_of_ch_preamble(test_input)==true){ -get_line(test_input,true); -input_organisation[test_input]->mode= reading; -actual_input= test_input; -test_input= none; -} -} - - -/*:58*/ -#line 925 "./ctie.w" - -} - - -/*:51*/ -#line 1078 "./ctie.w" - -if(out_mode==post) -fprintf(out_file,"@z\n"); - - -/*:59*/ -#line 111 "./ctie.w" - -/*60:*/ -#line 1087 "./ctie.w" - -{ -file_index i; - -for(i= 1;imode!=ignore){ -input_organisation[i]->loc= input_organisation[i]->buffer; -err_print(i,"! Change file entry did not match"); - -} -} -} - - -/*:60*/ -#line 112 "./ctie.w" - -exit(wrap_up()); -} - -#line 57 "./ctie-k.ch" -/*:3*/ -#line 96 "./ctie.w" - - -/*:2*//*70:*/ -#line 1237 "./ctie.w" - -#line 399 "./ctie-k.ch" -void usage_help P1H(void) -#line 1239 "./ctie.w" -{ -string*message= CTIEHELP; - -while(*message){ -fputs(*message,stdout); -putchar('\n'); -++message; -} -putchar('\n'); -exit(0); -} - - -/*:70*//*71:*/ -#line 1252 "./ctie.w" - -#line 416 "./ctie-k.ch" -void print_version_and_exit P2C(string,name,string,version) -{ -extern KPSEDLL string kpathsea_version_string; -printf("%s %s\n",name,version); -puts(kpathsea_version_string); - -puts("Copyright (C) 2002,2003 Julian Gilbey."); -puts("Kpathsea is copyright (C) 1999 Free Software Foundation, Inc."); - -puts("There is NO warranty. This is free software."); -puts("Redistribution of this software is covered by the terms of"); -puts("both the CTIE copyright and the GNU General Public Licence."); -puts("For more information about these matters, see the files"); -puts("named COPYING and the CTIE source."); -puts("Primary authors of CTIE: Julian Gilbey."); -puts("Kpathsea written by Karl Berry and others.\n"); - -exit(0); -} -#line 1265 "./ctie.w" - - -#line 450 "./ctie-k.ch" -/*:71*/ diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 256e7009e81..5a220838013 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,10 @@ +2009-06-23 Peter Breitenlohner + + * basechsuffix.c, chartostring.c, coredump.c, eofeoln.c, + fprintreal.c, input2int.c, inputint.c, main.c, openclose.c, + printversion.c, texmfmp.c, uexit.c, usage.c, win32main.c, + zround.c: drop P?C, P?H, use ANSI C function declarations. + 2009-06-10 Peter Breitenlohner * Makefile.am (AM_CFLAGS): enable compiler warnings. diff --git a/Build/source/texk/web2c/lib/basechsuffix.c b/Build/source/texk/web2c/lib/basechsuffix.c index 28f269dd7d3..8ca0e7cb117 100644 --- a/Build/source/texk/web2c/lib/basechsuffix.c +++ b/Build/source/texk/web2c/lib/basechsuffix.c @@ -13,8 +13,8 @@ In other words, we're implementing `basename NAME OLD`NEW. */ string -basenamechangesuffix P3C(const_string, name, const_string, old_suffix, - const_string, new_suffix) +basenamechangesuffix (const_string name, const_string old_suffix, + const_string new_suffix) { string answer; unsigned c; diff --git a/Build/source/texk/web2c/lib/chartostring.c b/Build/source/texk/web2c/lib/chartostring.c index ece5fe5e2f3..bd4253022cd 100644 --- a/Build/source/texk/web2c/lib/chartostring.c +++ b/Build/source/texk/web2c/lib/chartostring.c @@ -14,7 +14,7 @@ Written in 1994 by Karl Berry. Public domain. */ malloc overhead) here, but it doesn't matter. */ string -chartostring P1C(char, ch) +chartostring (char ch) { string str = (string)xmalloc (2); str[0] = ch; diff --git a/Build/source/texk/web2c/lib/coredump.c b/Build/source/texk/web2c/lib/coredump.c index b465969294c..c89d6732931 100644 --- a/Build/source/texk/web2c/lib/coredump.c +++ b/Build/source/texk/web2c/lib/coredump.c @@ -17,7 +17,7 @@ #include void -funny_core_dump P1H(void) +funny_core_dump (void) { #ifdef __EMX__ { diff --git a/Build/source/texk/web2c/lib/eofeoln.c b/Build/source/texk/web2c/lib/eofeoln.c index 6e1225575be..c584f5da138 100644 --- a/Build/source/texk/web2c/lib/eofeoln.c +++ b/Build/source/texk/web2c/lib/eofeoln.c @@ -8,7 +8,7 @@ Pascal's `eof' builtin. */ boolean -eof P1C(FILE *, file) +eof (FILE *file) { register int c; @@ -36,7 +36,7 @@ eof P1C(FILE *, file) /* Accept both CR and LF as end-of-line. */ boolean -eoln P1C(FILE*, file) +eoln (FILE *file) { register int c; @@ -55,7 +55,7 @@ eoln P1C(FILE*, file) /* Handle CRLF as a single end-of-line. */ void -readln P1C(FILE*, f) +readln (FILE *f) { int c; while ((c = getc (f)) != '\n' && c != '\r' && c != EOF) diff --git a/Build/source/texk/web2c/lib/fprintreal.c b/Build/source/texk/web2c/lib/fprintreal.c index e30261b9520..27424b3d470 100644 --- a/Build/source/texk/web2c/lib/fprintreal.c +++ b/Build/source/texk/web2c/lib/fprintreal.c @@ -5,7 +5,7 @@ #include "lib.h" void -fprintreal P4C(FILE*, f, double, r, int, n, int, m) +fprintreal (FILE *f, double r, int n, int m) { char fmt[50]; /* Surely enough, since N and M won't be more than 25 digits each! */ diff --git a/Build/source/texk/web2c/lib/input2int.c b/Build/source/texk/web2c/lib/input2int.c index 6bed88bf9e2..792fa6791f8 100644 --- a/Build/source/texk/web2c/lib/input2int.c +++ b/Build/source/texk/web2c/lib/input2int.c @@ -15,7 +15,7 @@ /* Read two integers from stdin. */ void -zinput2ints P2C(integer *, a, integer *, b) +zinput2ints (integer *a, integer *b) { int ch; @@ -33,7 +33,7 @@ zinput2ints P2C(integer *, a, integer *, b) /* Read three integers from stdin. */ void -zinput3ints P3C(integer *, a, integer *, b, integer *, c) +zinput3ints (integer *a, integer *b, integer *c) { int ch; diff --git a/Build/source/texk/web2c/lib/inputint.c b/Build/source/texk/web2c/lib/inputint.c index 3082c8a112f..7b2dd58704d 100644 --- a/Build/source/texk/web2c/lib/inputint.c +++ b/Build/source/texk/web2c/lib/inputint.c @@ -9,7 +9,7 @@ line. */ integer -inputint P1C(FILE *, f) +inputint (FILE *f) { char buffer[MAX_INT_LENGTH]; /* Long enough for anything reasonable. */ diff --git a/Build/source/texk/web2c/lib/main.c b/Build/source/texk/web2c/lib/main.c index 8341b979543..23af7a4fd12 100644 --- a/Build/source/texk/web2c/lib/main.c +++ b/Build/source/texk/web2c/lib/main.c @@ -8,17 +8,18 @@ char **argv; int argc; +extern void mainbody (void); + /* The entry point for all the programs except TeX and Metafont, which have more to do. We just have to set up the command line. web2c transforms Pascal's main block into a procedure `main_body'. */ - -int main P2C(int, ac, string *, av) +int +main (int ac, string* av) { #ifdef __EMX__ _wildcard (&ac, &av); _response (&ac, &av); #endif - extern void mainbody P1H(void); argc = ac; argv = av; @@ -30,7 +31,7 @@ int main P2C(int, ac, string *, av) /* Return the Nth (counted as in C) argument from the command line. */ string -cmdline P1C(int, n) +cmdline (int n) { if (n >= argc) { /* This error message should never happen, because the callers diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c index 72ca0d890dd..dab1b4ff43c 100644 --- a/Build/source/texk/web2c/lib/openclose.c +++ b/Build/source/texk/web2c/lib/openclose.c @@ -35,7 +35,7 @@ int texinputtype; /* Helpers for the filename recorder... */ /* Start the recorder */ static void -recorder_start() +recorder_start(void) { /* Alas, while we might want to use mkstemp it is not portable. So we have to be content with using a default name... */ @@ -61,7 +61,7 @@ recorder_start() /* Change the name of the recorder file. */ void -recorder_change_filename P1C(string, new_name) +recorder_change_filename (string new_name) { if (!recorder_file) return; @@ -72,7 +72,7 @@ recorder_change_filename P1C(string, new_name) /* helper for recorder_record_* */ static void -recorder_record_name P2C(string, prefix, const_string, nameoffile) +recorder_record_name (string prefix, const_string nameoffile) { if (recorder_enabled) { if (!recorder_file) @@ -84,14 +84,14 @@ recorder_record_name P2C(string, prefix, const_string, nameoffile) /* record an input file */ void -recorder_record_input P1C(const_string, nameoffile) +recorder_record_input (const_string nameoffile) { recorder_record_name ("INPUT", nameoffile); } /* record an output file */ void -recorder_record_output P1C(const_string, nameoffile) +recorder_record_output (const_string nameoffile) { recorder_record_name ("OUTPUT", nameoffile); } @@ -102,7 +102,7 @@ recorder_record_output P1C(const_string, nameoffile) the full filename opened, and `namelength' to its length. */ boolean -open_input P3C(FILE **, f_ptr, int, filefmt, const_string, fopen_mode) +open_input (FILE **f_ptr, int filefmt, const_string fopen_mode) { string fname = NULL; #ifdef FUNNY_CORE_DUMP @@ -221,7 +221,7 @@ open_input P3C(FILE **, f_ptr, int, filefmt, const_string, fopen_mode) necessary, and `namelength' to its length. */ boolean -open_output P2C(FILE **, f_ptr, const_string, fopen_mode) +open_output (FILE **f_ptr, const_string fopen_mode) { string fname; boolean absolute = kpse_absolute_p(nameoffile+1, false); @@ -263,7 +263,7 @@ open_output P2C(FILE **, f_ptr, const_string, fopen_mode) /* Close F. */ void -close_file P1C(FILE *, f) +close_file (FILE *f) { /* If F is null, just return. bad_pool might close a file that has never been opened. */ diff --git a/Build/source/texk/web2c/lib/printversion.c b/Build/source/texk/web2c/lib/printversion.c index f532c729d93..f181c52f107 100644 --- a/Build/source/texk/web2c/lib/printversion.c +++ b/Build/source/texk/web2c/lib/printversion.c @@ -17,10 +17,10 @@ This is PROGRAM, Version VERSION-NUMBER program, but tangle doesn't allow multiline string constants ... */ void -printversionandexit P4C(const_string, banner, - const_string, copyright_holder, - const_string, author, - char*, extra_info) +printversionandexit (const_string banner, + const_string copyright_holder, + const_string author, + char *extra_info) { extern string versionstring; /* from web2c/lib/version.c */ extern KPSEDLL string kpathsea_version_string;/* from kpathsea/version.c */ diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index 2f3207b3c14..7e2e6c73abe 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -520,19 +520,19 @@ string default_translate_filename; MAYBE_STATIC char *last_source_name; static int last_lineno; MAYBE_STATIC boolean srcspecialsoption = false; -MAYBE_STATIC void parse_src_specials_option P1H(const_string); +MAYBE_STATIC void parse_src_specials_option (const_string); /* The main body of the WEB is transformed into this procedure. */ -extern TEXDLL void mainbody P1H(void); +extern TEXDLL void mainbody (void); /* Parsing a first %&-line in the input file. */ -static void parse_first_line P1H(const_string); +static void parse_first_line (const_string); /* Parse option flags. */ -static void parse_options P2H(int, string *); +static void parse_options (int, string *); /* Try to figure out if we have been given a filename. */ -static string get_input_file_name P1H(void); +static string get_input_file_name (void); #if defined(Aleph) /* Declare this for Omega family, so they can parse the -8bit option, @@ -581,7 +581,7 @@ texmf_yesno(const_string var) happen in `topenin', then call the main body. */ void TEXDLL -maininit P2C(int, ac, string *, av) +maininit (int ac, string *av) { string main_input_file; @@ -770,7 +770,7 @@ maininit P2C(int, ac, string *, av) happen in `topenin', then call the main body. */ int -main P2C(int, ac, string *, av) +main (int ac, string *av) { #ifdef __EMX__ _wildcard (&ac, &av); @@ -802,7 +802,7 @@ main P2C(int, ac, string *, av) `last=first'. */ void -topenin P1H(void) +topenin (void) { int i; @@ -914,7 +914,7 @@ static struct sockaddr *ipc_addr; static int ipc_addr_len; static int -ipc_make_name P1H(void) +ipc_make_name (void) { if (ipc_addr_len == 0) { string s = getenv ("HOME"); @@ -934,14 +934,14 @@ ipc_make_name P1H(void) static int sock = -1; static int -ipc_is_open P1H(void) +ipc_is_open (void) { return sock >= 0; } static void -ipc_open_out P1H(void) { +ipc_open_out (void) { #ifdef IPC_DEBUG fputs ("tex: Opening socket for IPC output ...\n", stderr); #endif @@ -970,7 +970,7 @@ ipc_open_out P1H(void) { static void -ipc_close_out P1H(void) +ipc_close_out (void) { #ifdef IPC_DEBUG fputs ("tex: Closing output socket ...\n", stderr); @@ -983,7 +983,7 @@ ipc_close_out P1H(void) static void -ipc_snd P3C(int, n, int, is_eof, char *, data) +ipc_snd (int n, int is_eof, char *data) { struct { @@ -1022,7 +1022,7 @@ ipc_snd P3C(int, n, int, is_eof, char *, data) too_big_char = biggest_char + 1 = 65536 (omstr.ch).*/ void -ipcpage P1C(int, is_eof) +ipcpage (int is_eof) { static boolean begun = false; unsigned len = 0; @@ -1076,10 +1076,10 @@ ipcpage P1C(int, is_eof) can be parsed. */ static int -tcx_get_num P4C(int, upb, - unsigned, line_count, - string, start, - string *, post) +tcx_get_num (int upb, + unsigned line_count, + string start, + string *post) { int num = strtol (start, post, 0); assert (post && *post); @@ -1110,7 +1110,7 @@ tcx_get_num P4C(int, upb, /* FIXME: A new format ought to be introduced for these files. */ void -readtcxfile P1H(void) +readtcxfile (void) { string orig_filename; if (!find_suffix (translate_filename)) { @@ -1175,7 +1175,7 @@ readtcxfile P1H(void) #ifdef XeTeX /* XeTeX handles this differently, and allows odd quotes within names */ string -normalize_quotes P2C(const_string, name, const_string, mesg) +normalize_quotes (const_string name, const_string mesg) { int quote_char = 0; boolean must_quote = (strchr(name, ' ') != NULL); @@ -1222,7 +1222,7 @@ normalize_quotes P2C(const_string, name, const_string, mesg) /* Normalize quoting of filename -- that is, only quote if there is a space, and always use the quote-name-quote style. */ string -normalize_quotes P2C(const_string, name, const_string, mesg) +normalize_quotes (const_string name, const_string mesg) { boolean quoted = false; boolean must_quote = (strchr(name, ' ') != NULL); @@ -1252,7 +1252,7 @@ normalize_quotes P2C(const_string, name, const_string, mesg) /* Getting the input filename. */ string -get_input_file_name P1H(void) +get_input_file_name (void) { string input_file_name = NULL; @@ -1364,7 +1364,7 @@ static struct option long_options[] static void -parse_options P2C(int, argc, string *, argv) +parse_options (int argc, string *argv) { int g; /* `getopt' return code. */ int option_index; @@ -1533,7 +1533,7 @@ parse_options P2C(int, argc, string *, argv) #if defined(TeX) #if ! defined (luaTeX) void -parse_src_specials_option P1C(const_string, opt_list) +parse_src_specials_option (const_string opt_list) { char * toklist = xstrdup(opt_list); char * tok; @@ -1591,7 +1591,7 @@ parse_src_specials_option P1C(const_string, opt_list) Also call kpse_reset_program_name to ensure the correct paths for the format are used. */ static void -parse_first_line P1C(const_string, filename) +parse_first_line (const_string filename) { FILE *f = filename ? fopen (filename, FOPEN_R_MODE) : NULL; if (f) { @@ -1676,8 +1676,8 @@ static const_string ok_type_name[] = { }; static boolean -opennameok P4C(const_string, fname, const_string, check_var, - const_string, default_choice, ok_type, action) +opennameok (const_string fname, const_string check_var, + const_string default_choice, ok_type action) { /* We distinguish three cases: 'a' (any) allows any file to be opened. @@ -1760,13 +1760,13 @@ opennameok P4C(const_string, fname, const_string, check_var, return true; } -boolean openinnameok P1C(const_string, fname) +boolean openinnameok (const_string fname) { /* For input default to all. */ return opennameok (fname, "openin_any", "a", ok_reading); } -boolean openoutnameok P1C(const_string, fname) +boolean openoutnameok (const_string fname) { /* For output, default to paranoid. */ return opennameok (fname, "openout_any", "p", ok_writing); @@ -1786,7 +1786,7 @@ static FILE *pipes [] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; boolean -open_in_or_pipe P3C(FILE **, f_ptr, int, filefmt, const_string, fopen_mode) +open_in_or_pipe (FILE **f_ptr, int filefmt, const_string fopen_mode) { string fname = NULL; int i; /* iterator */ @@ -1825,7 +1825,7 @@ open_in_or_pipe P3C(FILE **, f_ptr, int, filefmt, const_string, fopen_mode) boolean -open_out_or_pipe P2C(FILE **, f_ptr, const_string, fopen_mode) +open_out_or_pipe (FILE **f_ptr, const_string fopen_mode) { string fname; int i; /* iterator */ @@ -1871,7 +1871,7 @@ open_out_or_pipe P2C(FILE **, f_ptr, const_string, fopen_mode) void -close_file_or_pipe P1C(FILE *, f) +close_file_or_pipe (FILE *f) { int i; /* iterator */ @@ -1909,7 +1909,7 @@ catch_interrupt (DWORD arg) } #else /* not WIN32 */ static RETSIGTYPE -catch_interrupt P1C (int, arg) +catch_interrupt (int arg) { interrupt = 1; #ifdef OS2 @@ -1927,8 +1927,8 @@ catch_interrupt P1C (int, arg) good a place as any. */ void -get_date_and_time P4C(integer *, minutes, integer *, day, - integer *, month, integer *, year) +get_date_and_time (integer *minutes, integer *day, + integer *month, integer *year) { time_t myclock = time ((time_t *) 0); struct tm *tmptr = localtime (&myclock); @@ -1959,7 +1959,7 @@ get_date_and_time P4C(integer *, minutes, integer *, day, #ifdef WIN32 SetConsoleCtrlHandler(catch_interrupt, TRUE); #else /* not WIN32 */ - RETSIGTYPE (*old_handler) P1H(int); + RETSIGTYPE (*old_handler) (int); old_handler = signal (SIGINT, catch_interrupt); if (old_handler != SIG_DFL) @@ -1973,7 +1973,7 @@ get_date_and_time P4C(integer *, minutes, integer *, day, Getting a high resolution time. */ void -get_seconds_and_micros P2C(integer *, seconds, integer *, micros) +get_seconds_and_micros (integer *seconds, integer *micros) { #if defined (HAVE_GETTIMEOFDAY) struct timeval tv; @@ -2020,7 +2020,7 @@ getrandomseed() #ifndef XeTeX /* for XeTeX, we have a replacement function in XeTeX_ext.c */ boolean -input_line P1C(FILE *, f) +input_line (FILE *f) { int i = EOF; @@ -2076,10 +2076,10 @@ static const_string edit_value = EDITOR; actual filename starts; FNLENGTH is how long the filename is. */ void -calledit P4C(packedASCIIcode *, filename, - poolpointer, fnstart, - integer, fnlength, - integer, linenumber) +calledit (packedASCIIcode *filename, + poolpointer fnstart, + integer fnlength, + integer linenumber) { char *temp, *command; char c; @@ -2184,7 +2184,7 @@ calledit P4C(packedASCIIcode *, filename, opposite-endianness of whatever they are now. */ static void -swap_items P3C(char *, p, int, nitems, int, size) +swap_items (char *p, int nitems, int size) { char temp; @@ -2254,9 +2254,9 @@ swap_items P3C(char *, p, int, nitems, int, size) void #ifdef XeTeX -do_dump P4C(char *, p, int, item_size, int, nitems, gzFile, out_file) +do_dump (char *p, int item_size, int nitems, gzFile out_file) #else -do_dump P4C(char *, p, int, item_size, int, nitems, FILE *, out_file) +do_dump (char *p, int item_size, int nitems, FILE *out_file) #endif { #if !defined (WORDS_BIGENDIAN) && !defined (NO_DUMP_SHARE) @@ -2286,9 +2286,9 @@ do_dump P4C(char *, p, int, item_size, int, nitems, FILE *, out_file) void #ifdef XeTeX -do_undump P4C(char *, p, int, item_size, int, nitems, gzFile, in_file) +do_undump (char *p, int item_size, int nitems, gzFile in_file) #else -do_undump P4C(char *, p, int, item_size, int, nitems, FILE *, in_file) +do_undump (char *p, int item_size, int nitems, FILE *in_file) #endif { #ifdef XeTeX @@ -2307,7 +2307,7 @@ do_undump P4C(char *, p, int, item_size, int, nitems, FILE *, in_file) DFLT to *VAR. */ void -setupboundvariable P3C(integer *, var, const_string, var_name, integer, dflt) +setupboundvariable (integer *var, const_string var_name, integer dflt) { string expansion = kpse_var_value (var_name); *var = dflt; @@ -2404,7 +2404,7 @@ getjobname(strnumber name) #if defined(TeX) int -compare_paths P2C(const_string, p1, const_string, p2) +compare_paths (const_string p1, const_string p2) { int ret; while ( @@ -2423,7 +2423,7 @@ compare_paths P2C(const_string, p1, const_string, p2) #ifdef XeTeX /* the string pool is UTF-16 but we want a UTF-8 string */ string -gettexstring P1C(strnumber, s) +gettexstring (strnumber s) { unsigned bytesToWrite = 0; poolpointer len, i, j; @@ -2468,7 +2468,7 @@ gettexstring P1C(strnumber, s) #else string -gettexstring P1C(strnumber, s) +gettexstring (strnumber s) { poolpointer len; string name; @@ -2494,15 +2494,14 @@ gettexstring P1C(strnumber, s) #endif /* not XeTeX */ boolean -isnewsource P2C(strnumber, srcfilename, int, lineno) +isnewsource (strnumber srcfilename, int lineno) { char *name = gettexstring(srcfilename); return (compare_paths(name, last_source_name) != 0 || lineno != last_lineno); } void -remembersourceinfo P2C(strnumber, srcfilename, - int, lineno) +remembersourceinfo (strnumber srcfilename, int lineno) { if (last_source_name) free(last_source_name); @@ -2511,8 +2510,7 @@ remembersourceinfo P2C(strnumber, srcfilename, } poolpointer -makesrcspecial P2C(strnumber, srcfilename, - int, lineno) +makesrcspecial (strnumber srcfilename, int lineno) { poolpointer oldpoolptr = poolptr; char *filename = gettexstring(srcfilename); @@ -2613,7 +2611,7 @@ connection with the use or performance of this software. #define TWEXP_28 (1.0/268435456.0) integer -ztakefraction P2C(integer, p, integer, q) /* Approximate p*q/2^28 */ +ztakefraction (integer p, integer q) /* Approximate p*q/2^28 */ { register double d; register integer i; d = (double)p * (double)q * TWEXP_28; @@ -2640,7 +2638,7 @@ ztakefraction P2C(integer, p, integer, q) /* Approximate p*q/2^28 */ } integer -ztakescaled P2C(integer, p, integer, q) /* Approximate p*q/2^16 */ +ztakescaled (integer p, integer q) /* Approximate p*q/2^16 */ { register double d; register integer i; d = (double)p * (double)q * TWEXP_16; @@ -2671,7 +2669,7 @@ ztakescaled P2C(integer, p, integer, q) /* Approximate p*q/2^16 */ and 8/1. No pair of integers less than 2^31 has such a ratio. */ integer -zmakefraction P2C(integer, p, integer, q) /* Approximate 2^28*p/q */ +zmakefraction (integer p, integer q) /* Approximate 2^28*p/q */ { register double d; register integer i; #ifdef DEBUG @@ -2699,7 +2697,7 @@ zmakefraction P2C(integer, p, integer, q) /* Approximate 2^28*p/q */ and 2^15/1. No pair of integers less than 2^31 has such a ratio. */ integer -zmakescaled P2C(integer, p, integer, q) /* Approximate 2^16*p/q */ +zmakescaled (integer p, integer q) /* Approximate 2^16*p/q */ { register double d; register integer i; #ifdef DEBUG @@ -2747,75 +2745,75 @@ zmakescaled P2C(integer, p, integer, q) /* Approximate 2^16*p/q */ #endif #ifdef AMIGAWIN -extern int mf_amiga_initscreen P1H(void); -extern void mf_amiga_updatescreen P1H(void); -extern void mf_amiga_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_amiga_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_amiga_initscreen (void); +extern void mf_amiga_updatescreen (void); +extern void mf_amiga_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_amiga_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef EPSFWIN -extern int mf_epsf_initscreen P1H(void); -extern void mf_epsf_updatescreen P1H(void); -extern void mf_epsf_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_epsf_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_epsf_initscreen (void); +extern void mf_epsf_updatescreen (void); +extern void mf_epsf_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_epsf_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef HP2627WIN -extern int mf_hp2627_initscreen P1H(void); -extern void mf_hp2627_updatescreen P1H(void); -extern void mf_hp2627_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_hp2627_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_hp2627_initscreen (void); +extern void mf_hp2627_updatescreen (void); +extern void mf_hp2627_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_hp2627_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef MFTALKWIN -extern int mf_mftalk_initscreen P1H(void); -extern void mf_mftalk_updatescreen P1H(void); -extern void mf_mftalk_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_mftalk_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_mftalk_initscreen (void); +extern void mf_mftalk_updatescreen (void); +extern void mf_mftalk_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_mftalk_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef NEXTWIN -extern int mf_next_initscreen P1H(void); -extern void mf_next_updatescreen P1H(void); -extern void mf_next_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_next_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_next_initscreen (void); +extern void mf_next_updatescreen (void); +extern void mf_next_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_next_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef REGISWIN -extern int mf_regis_initscreen P1H(void); -extern void mf_regis_updatescreen P1H(void); -extern void mf_regis_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_regis_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_regis_initscreen (void); +extern void mf_regis_updatescreen (void); +extern void mf_regis_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_regis_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef SUNWIN -extern int mf_sun_initscreen P1H(void); -extern void mf_sun_updatescreen P1H(void); -extern void mf_sun_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_sun_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_sun_initscreen (void); +extern void mf_sun_updatescreen (void); +extern void mf_sun_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_sun_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef TEKTRONIXWIN -extern int mf_tektronix_initscreen P1H(void); -extern void mf_tektronix_updatescreen P1H(void); -extern void mf_tektronix_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_tektronix_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_tektronix_initscreen (void); +extern void mf_tektronix_updatescreen (void); +extern void mf_tektronix_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_tektronix_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef UNITERMWIN -extern int mf_uniterm_initscreen P1H(void); -extern void mf_uniterm_updatescreen P1H(void); -extern void mf_uniterm_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_uniterm_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_uniterm_initscreen (void); +extern void mf_uniterm_updatescreen (void); +extern void mf_uniterm_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_uniterm_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef WIN32WIN -extern int mf_win32_initscreen P1H(void); -extern void mf_win32_updatescreen P1H(void); -extern void mf_win32_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_win32_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_win32_initscreen (void); +extern void mf_win32_updatescreen (void); +extern void mf_win32_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_win32_paintrow (screenrow, pixelcolor, transspec, screencol); #endif #ifdef X11WIN -extern int mf_x11_initscreen P1H(void); -extern void mf_x11_updatescreen P1H(void); -extern void mf_x11_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_x11_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_x11_initscreen (void); +extern void mf_x11_updatescreen (void); +extern void mf_x11_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_x11_paintrow (screenrow, pixelcolor, transspec, screencol); #endif -extern int mf_trap_initscreen P1H(void); -extern void mf_trap_updatescreen P1H(void); -extern void mf_trap_blankrectangle P4H(screencol, screencol, screenrow, screenrow); -extern void mf_trap_paintrow P4H(screenrow, pixelcolor, transspec, screencol); +extern int mf_trap_initscreen (void); +extern void mf_trap_updatescreen (void); +extern void mf_trap_blankrectangle (screencol, screencol, screenrow, screenrow); +extern void mf_trap_paintrow (screenrow, pixelcolor, transspec, screencol); /* This variable, `mfwsw', contains the dispatch tables for each @@ -2827,10 +2825,10 @@ extern void mf_trap_paintrow P4H(screenrow, pixelcolor, transspec, screencol); struct mfwin_sw { char *mfwsw_type; /* Name of terminal a la TERMCAP. */ - int (*mfwsw_initscreen) P1H(void); - void (*mfwsw_updatescrn) P1H(void); - void (*mfwsw_blankrect) P4H(screencol, screencol, screenrow, screenrow); - void (*mfwsw_paintrow) P4H(screenrow, pixelcolor, transspec, screencol); + int (*mfwsw_initscreen) (void); + void (*mfwsw_updatescrn) (void); + void (*mfwsw_blankrect) (screencol, screencol, screenrow, screenrow); + void (*mfwsw_paintrow) (screenrow, pixelcolor, transspec, screencol); } mfwsw[] = { #ifdef AMIGAWIN @@ -2902,7 +2900,7 @@ static struct mfwin_sw *mfwp; /* This returns true if we can do window operations, else false. */ boolean -initscreen P1H(void) +initscreen (void) { /* If MFTERM is set, use it. */ const_string tty_type = kpse_var_value ("MFTERM"); @@ -2968,7 +2966,7 @@ initscreen P1H(void) /* Make sure everything is visible. */ void -updatescreen P1H(void) +updatescreen (void) { if (mfwp->mfwsw_updatescrn) (*mfwp->mfwsw_updatescrn) (); @@ -2979,8 +2977,8 @@ updatescreen P1H(void) the background color. */ void -blankrectangle P4C(screencol, left, screencol, right, - screenrow, top, screenrow, bottom) +blankrectangle (screencol left, screencol right, + screenrow top, screenrow bottom) { if (mfwp->mfwsw_blankrect) (*mfwp->mfwsw_blankrect) (left, right, top, bottom); @@ -2992,8 +2990,8 @@ blankrectangle P4C(screencol, left, screencol, right, switch colors. This goes on for VECTOR_SIZE transitions. */ void -paintrow P4C(screenrow, row, pixelcolor, init_color, - transspec, transition_vector, screencol, vector_size) +paintrow (screenrow row, pixelcolor init_color, + transspec transition_vector, screencol vector_size) { if (mfwp->mfwsw_paintrow) (*mfwp->mfwsw_paintrow) (row, init_color, transition_vector, vector_size); diff --git a/Build/source/texk/web2c/lib/uexit.c b/Build/source/texk/web2c/lib/uexit.c index 21f34ded35f..744c298d413 100644 --- a/Build/source/texk/web2c/lib/uexit.c +++ b/Build/source/texk/web2c/lib/uexit.c @@ -5,7 +5,7 @@ #include "config.h" void -uexit P1C(int, unix_code) +uexit (int unix_code) { int final_code; diff --git a/Build/source/texk/web2c/lib/usage.c b/Build/source/texk/web2c/lib/usage.c index 194cc73c84d..8e1d416e71f 100644 --- a/Build/source/texk/web2c/lib/usage.c +++ b/Build/source/texk/web2c/lib/usage.c @@ -9,7 +9,7 @@ to be the program name. */ void -usage P1C(const_string, str) +usage (const_string str) { fprintf (stderr, "Try `%s --help' for more information.\n", str); uexit (1); @@ -22,7 +22,7 @@ usage P1C(const_string, str) limitations (sigh). */ void -usagehelp P2C(const_string*, message, const_string,bug_email) +usagehelp (const_string *message, const_string bug_email) { if (!bug_email) bug_email = "tex-k@mail.tug.org"; diff --git a/Build/source/texk/web2c/lib/win32main.c b/Build/source/texk/web2c/lib/win32main.c index aa1c1f865d7..0eb6385dd94 100644 --- a/Build/source/texk/web2c/lib/win32main.c +++ b/Build/source/texk/web2c/lib/win32main.c @@ -3,11 +3,11 @@ /* The entry point: set up for reading the command line, which will happen in `topenin', then call the main body. Public domain. */ -extern TEXDLL void mainbody P1H(void); -extern TEXDLL void maininit P2H(int, string *); +extern TEXDLL void mainbody (void); +extern TEXDLL void maininit (int, string *); int -main P2C(int, ac, string *, av) +main (int ac, string *av) { #ifdef __EMX__ _wildcard (&ac, &av); diff --git a/Build/source/texk/web2c/lib/zround.c b/Build/source/texk/web2c/lib/zround.c index ff951e13f03..a72626cb0a5 100644 --- a/Build/source/texk/web2c/lib/zround.c +++ b/Build/source/texk/web2c/lib/zround.c @@ -5,7 +5,7 @@ #include "lib.h" integer -zround P1C(double, r) +zround (double r) { integer i; diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 77a897de0b3..2a9a22339e1 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,7 @@ +2009-06-23 Peter Breitenlohner + + * lua/luatex.c: drop P?C, P?H, use ANSI C function declarations. + 2009-06-23 Peter Breitenlohner * font/writet1.c, image/epdf.c, utils/avlstuff.c: diff --git a/Build/source/texk/web2c/luatexdir/lua/luatex.c b/Build/source/texk/web2c/luatexdir/lua/luatex.c index e0e8d487dc8..9405e13b80b 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luatex.c +++ b/Build/source/texk/web2c/luatexdir/lua/luatex.c @@ -53,7 +53,7 @@ int **ocp_tables; static int ocp_entries = 0; void -allocate_ocp_table P2C(int, ocp_number, int, ocp_size) +allocate_ocp_table (int ocp_number, int ocp_size) { int i; if (ocp_entries == 0) { @@ -71,13 +71,13 @@ allocate_ocp_table P2C(int, ocp_number, int, ocp_size) } void -dump_ocp_table P1C(int, ocp_number) +dump_ocp_table (int ocp_number) { dump_things(ocp_tables[ocp_number][0], ocp_tables[ocp_number][0] + 1); } void -undump_ocp_table P1C(int, ocp_number) +undump_ocp_table (int ocp_number) { int sizeword; if (ocp_entries == 0) { @@ -95,7 +95,7 @@ undump_ocp_table P1C(int, ocp_number) void -run_external_ocp P1C(string, external_ocp_name) +run_external_ocp (string external_ocp_name) { char *in_file_name; char *out_file_name; diff --git a/Build/source/texk/web2c/texmfmp.h b/Build/source/texk/web2c/texmfmp.h index ce8a7795e92..e6adc96085b 100644 --- a/Build/source/texk/web2c/texmfmp.h +++ b/Build/source/texk/web2c/texmfmp.h @@ -101,14 +101,14 @@ typedef void* voidpointer; extern int tfmtemp, texinputtype; /* TeX, MF and MetaPost use this. */ -extern boolean openinnameok P1H(const_string); -extern boolean openoutnameok P1H(const_string); +extern boolean openinnameok (const_string); +extern boolean openoutnameok (const_string); /* pdfTeX uses these for pipe support */ #if defined(pdfTeX) -extern boolean open_in_or_pipe P3H(FILE **, int, const_string fopen_mode); -extern boolean open_out_or_pipe P2H(FILE **, const_string fopen_mode); -extern void close_file_or_pipe P1H(FILE *); +extern boolean open_in_or_pipe (FILE **, int, const_string fopen_mode); +extern boolean open_out_or_pipe (FILE **, const_string fopen_mode); +extern void close_file_or_pipe (FILE *); #endif /* Executing shell commands. */ @@ -119,7 +119,7 @@ extern int runsystem (char *cmd); /* All but the Omega family use this. */ #if !defined(Aleph) -extern void readtcxfile P1H(void); +extern void readtcxfile (void); extern string translate_filename; #define translatefilename translate_filename #endif @@ -149,7 +149,7 @@ typedef GLUERATIO_TYPE glueratio; #endif #ifdef IPC -extern void ipcpage P1H(int); +extern void ipcpage (int); #endif /* IPC */ #endif /* TeX */ @@ -175,24 +175,24 @@ extern void ipcpage P1H(int); /* Read a line of input as quickly as possible. */ #define inputln(stream, flag) input_line (stream) #ifdef XeTeX -extern boolean input_line P1H(UFILE *); +extern boolean input_line (UFILE *); #else -extern boolean input_line P1H(FILE *); +extern boolean input_line (FILE *); #endif /* This routine has to return four values. */ #define dateandtime(i,j,k,l) get_date_and_time (&(i), &(j), &(k), &(l)) -extern void get_date_and_time P4H(integer *, integer *, integer *, integer *); +extern void get_date_and_time (integer *, integer *, integer *, integer *); /* Get high-res time info. */ #define secondsandmicros(i,j) get_seconds_and_micros (&(i), &(j)) -extern void get_seconds_and_micros P2H(integer *, integer *); +extern void get_seconds_and_micros (integer *, integer *); /* This routine has to return a scaled value. */ -extern integer getrandomseed P1H(void); +extern integer getrandomseed (void); /* Copy command-line arguments into the buffer, despite the name. */ -extern void topenin P1H(void); +extern void topenin (void); /* Can't prototype this since it uses poolpointer and ASCIIcode, which are defined later in mfd.h, and mfd.h uses stuff from here. */ @@ -201,7 +201,7 @@ extern void topenin P1H(void); /* extern void calledit (); */ /* Set an array size from texmf.cnf. */ -extern void setupboundvariable P3H(integer *, const_string, integer); +extern void setupboundvariable (integer *, const_string, integer); /* These defines reroute the file i/o calls to the new pipe-enabled functions in texmfmp.c*/ @@ -252,12 +252,12 @@ extern void setupboundvariable P3H(integer *, const_string, integer); #endif #ifdef MP -extern boolean callmakempx P2H(string, string); +extern boolean callmakempx (string, string); #endif #ifdef MF -extern boolean initscreen P1H(void); -extern void updatescreen P1H(void); +extern boolean initscreen (void); +extern void updatescreen (void); /* Can't prototype these for same reason as `calledit' above. */ #if 0 /* Therefore the real declaration is found in the coerce.h files. */ extern void blankrectangle (/*screencol, screencol, screenrow, screenrow*/); @@ -308,11 +308,11 @@ extern void paintrow (/*screenrow, pixelcolor, transspec, screencol*/); /* We define the routines to do the actual work in texmf.c. */ #ifdef XeTeX -extern void do_dump P4H(char *, int, int, gzFile); -extern void do_undump P4H(char *, int, int, gzFile); +extern void do_dump (char *, int, int, gzFile); +extern void do_undump (char *, int, int, gzFile); #else -extern void do_dump P4H(char *, int, int, FILE *); -extern void do_undump P4H(char *, int, int, FILE *); +extern void do_dump (char *, int, int, FILE *); +extern void do_undump (char *, int, int, FILE *); #endif /* Use the above for all the other dumping and undumping. */ @@ -376,13 +376,13 @@ extern void do_undump P4H(char *, int, int, FILE *); extern int tfmtemp, texinputtype; /* TeX, MF and MetaPost use this. */ -extern boolean openinnameok P1H(const_string); -extern boolean openoutnameok P1H(const_string); +extern boolean openinnameok (const_string); +extern boolean openoutnameok (const_string); /* pdfTeX uses these for pipe support */ -extern boolean open_in_or_pipe P3H(FILE **, int, const_string fopen_mode); -extern boolean open_out_or_pipe P2H(FILE **, const_string fopen_mode); -extern void close_file_or_pipe P1H(FILE *); +extern boolean open_in_or_pipe (FILE **, int, const_string fopen_mode); +extern boolean open_out_or_pipe (FILE **, const_string fopen_mode); +extern void close_file_or_pipe (FILE *); /* Executing shell commands. */ extern void mk_shellcmdlist (char *); @@ -400,7 +400,7 @@ typedef GLUERATIO_TYPE glueratio; #endif #ifdef IPC -extern void ipcpage P1H(int); +extern void ipcpage (int); #endif /* IPC */ @@ -416,21 +416,21 @@ extern void ipcpage P1H(int); /* Read a line of input as quickly as possible. */ #define input_ln(stream, flag) input_line (stream) -extern boolean input_line P1H(FILE *); +extern boolean input_line (FILE *); /* This routine has to return four values. */ #define dateandtime(i,j,k,l) get_date_and_time (&(i), &(j), &(k), &(l)) -extern void get_date_and_time P4H(integer *, integer *, integer *, integer *); +extern void get_date_and_time (integer *, integer *, integer *, integer *); /* Get high-res time info. */ #define seconds_and_micros(i,j) get_seconds_and_micros (&(i), &(j)) -extern void get_seconds_and_micros P2H(integer *, integer *); +extern void get_seconds_and_micros (integer *, integer *); /* This routine has to return a scaled value. */ -extern integer getrandomseed P1H(void); +extern integer getrandomseed (void); /* Copy command-line arguments into the buffer, despite the name. */ -extern void topenin P1H(void); +extern void topenin (void); /* Can't prototype this since it uses poolpointer and ASCIIcode, which are defined later in mfd.h, and mfd.h uses stuff from here. */ @@ -439,7 +439,7 @@ extern void topenin P1H(void); /* extern void calledit (); */ /* Set an array size from texmf.cnf. */ -extern void setupboundvariable P3H(integer *, const_string, integer); +extern void setupboundvariable (integer *, const_string, integer); /* These defines reroute the file i/o calls to the new pipe-enabled functions in texmfmp.c*/ @@ -477,11 +477,11 @@ extern void setupboundvariable P3H(integer *, const_string, integer); #define w_open_out(f) zopen_w_output (&(f), FOPEN_WBIN_MODE) #define w_close zwclose -extern boolean zopen_w_input P3H(FILE **, int, const_string fopen_mode); -extern boolean zopen_w_output P2H(FILE **, const_string fopen_mode); -extern void do_zdump P4H(char *, int, int, FILE *); -extern void do_zundump P4H(char *, int, int, FILE *); -extern void zwclose P1H(FILE *); +extern boolean zopen_w_input (FILE **, int, const_string fopen_mode); +extern boolean zopen_w_output (FILE **, const_string fopen_mode); +extern void do_zdump (char *, int, int, FILE *); +extern void do_zundump (char *, int, int, FILE *); +extern void zwclose (FILE *); /* Like do_undump, but check each value against LOW and HIGH. The slowdown isn't significant, and this improves the chances of diff --git a/Build/source/texk/web2c/web2c/Makefile.am b/Build/source/texk/web2c/web2c/Makefile.am index f8c1b3ed4e2..b11c28fb2b8 100644 --- a/Build/source/texk/web2c/web2c/Makefile.am +++ b/Build/source/texk/web2c/web2c/Makefile.am @@ -11,7 +11,11 @@ AM_CFLAGS = $(WARNING_CFLAGS) noinst_PROGRAMS = web2c fixwrites splitup makecpool -## Include instead of +BUILT_SOURCES = native/config.h + +DISTCLEANFILES = native/config.h + +# Include instead of native/config.h: ../config.h sed -e 's,web2c/c-auto,kpathsea/c-auto,' $(srcdir)/../config.h >$@ @@ -28,14 +32,13 @@ dist_noinst_DATA = \ texmf.defines web2c_SOURCES = \ - native/config.h \ web2c-parser.y \ web2c-lexer.l \ kps.c \ main.c \ web2c.h -DISTCLEANFILES = web2c-parser.output +DISTCLEANFILES += web2c-parser.output fixwrites_SOURCES = \ fixwrites.c \ diff --git a/Build/source/texk/web2c/web2c/Makefile.in b/Build/source/texk/web2c/web2c/Makefile.in index 8f90e9c505c..756bb91856a 100644 --- a/Build/source/texk/web2c/web2c/Makefile.in +++ b/Build/source/texk/web2c/web2c/Makefile.in @@ -254,6 +254,8 @@ ACLOCAL_AMFLAGS = -I ../../../m4 INCLUDES = -Inative -I$(srcdir)/native -I$(srcdir)/.. -I$(srcdir)/../.. AM_YFLAGS = -d -v AM_CFLAGS = $(WARNING_CFLAGS) +BUILT_SOURCES = native/config.h +DISTCLEANFILES = native/config.h web2c-parser.output noinst_HEADERS = coerce.h dist_noinst_SCRIPTS = convert dist_noinst_DATA = \ @@ -265,14 +267,12 @@ dist_noinst_DATA = \ texmf.defines web2c_SOURCES = \ - native/config.h \ web2c-parser.y \ web2c-lexer.l \ kps.c \ main.c \ web2c.h -DISTCLEANFILES = web2c-parser.output fixwrites_SOURCES = \ fixwrites.c \ kps.c @@ -287,7 +287,8 @@ makecpool_SOURCES = \ nodist_noinst_DATA = stamp-web2c stamp-fixwrites stamp-splitup stamp-makecpool CLEANFILES = $(nodist_noinst_DATA) EXTRA_DIST = convert.bat -all: all-am +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y @@ -618,10 +619,12 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) $(HEADERS) installdirs: -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -651,6 +654,7 @@ maintainer-clean-generic: -rm -f web2c-lexer.c -rm -f web2c-parser.c -rm -f web2c-parser.h + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ @@ -725,7 +729,7 @@ ps-am: uninstall-am: -.MAKE: install-am install-strip +.MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libtool clean-noinstPROGRAMS ctags dist \ @@ -744,6 +748,7 @@ uninstall-am: tags uninstall uninstall-am +# Include instead of native/config.h: ../config.h sed -e 's,web2c/c-auto,kpathsea/c-auto,' $(srcdir)/../config.h >$@ diff --git a/Build/source/texk/web2c/web2c/native/config.h b/Build/source/texk/web2c/web2c/native/config.h deleted file mode 100644 index 50020e30518..00000000000 --- a/Build/source/texk/web2c/web2c/native/config.h +++ /dev/null @@ -1,119 +0,0 @@ -/* config.h: All .c files include this first. - -Copyright (C) 1995, 1996, 2006, 2007 Karl Berry. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, see -#include -#include - -/* How to open a binary file. */ -#include - -/* The smallest signed type: use `signed char' if ANSI C, `short' if - char is unsigned, otherwise `char'. */ -#ifndef SCHAR_TYPE -#if __STDC__ -#define SCHAR_TYPE signed char -#else /* not __STDC */ -#ifdef __CHAR_UNSIGNED__ -#define SCHAR_TYPE short -#else -#define SCHAR_TYPE char -#endif -#endif /* not __STDC__ */ -#endif /* not SCHAR_TYPE */ -typedef SCHAR_TYPE schar; - -/* The type `integer' must be a signed integer capable of holding at - least the range of numbers (-2^31)..(2^31-1). If your compiler goes - to great lengths to make programs fail, you might have to change this - definition. If this changes, you may have to modify - web2c/fixwrites.c, since it generates code to do integer output using - "%ld", and casts all integral values to be printed to `long'. - - If you define your own INTEGER_TYPE, you have to define your own - INTEGER_MAX and INTEGER_MIN, too. */ -#ifndef INTEGER_TYPE - -#if SIZEOF_LONG > 4 && !defined (NO_DUMP_SHARE) -/* If we have 64-bit longs and want to share format files (with 32-bit - machines), use `int'. */ -#define INTEGER_IS_INT -#endif - -#ifdef INTEGER_IS_INT -#define INTEGER_TYPE int -#define INTEGER_MAX INT_MAX -#define INTEGER_MIN INT_MIN -#else -#define INTEGER_TYPE long -#define INTEGER_MAX LONG_MAX -#define INTEGER_MIN LONG_MIN -#endif /* not INTEGER_IS_INT */ - -#endif /* not INTEGER_TYPE */ - -typedef INTEGER_TYPE integer; - -/* We need a type that's at least off_t wide */ -typedef off_t longinteger; - - -/* I don't want to write a configure test for remove when all Unix - machines have unlink. But, for the sake of non-Unix machines that - support ANSI C... */ -#if !defined (unix) && !defined (__unix__) && defined (__STDC__) && !defined (unlink) -#define unlink remove -#endif - -/* Window support on the Amiga is just for the Amiga. */ -#ifdef AMIGA -#define AMIGAWIN -#endif - -/* Window support for WIN32 machines. */ -#ifdef WIN32 -#define WIN32WIN -#endif - -/* strtol.c */ -#ifndef HAVE_STRTOL -extern long strtol P3H(const char *, char **, int); -#endif - -/* From uexit.c. This is here because the lib/ and web2c/ routines - themselves can use it, but they don't need cpascal.h. */ -extern void uexit P1H(int status); - -/* usage.c */ -extern void usage P1H(const_string progname); -extern void usagehelp P2H(const_string *message, const_string bug_email); - -#endif /* not WEB2C_CONFIG_H */ diff --git a/Build/source/texk/web2c/window/ChangeLog b/Build/source/texk/web2c/window/ChangeLog index 8140985601c..ddf330f51ad 100644 --- a/Build/source/texk/web2c/window/ChangeLog +++ b/Build/source/texk/web2c/window/ChangeLog @@ -1,3 +1,9 @@ +2009-06-23 Peter Breitenlohner + + * epsf.c, hp2627.c, mftalk.c, next.c, regis.c, suntools.c, + tek.c, uniterm.c, win32.c: drop P?C, P?H, use ANSI C function + declarations. + 2009-06-12 Peter Breitenlohner * Makefile.am (AM_CFLAGS): enable compiler warnings. diff --git a/Build/source/texk/web2c/window/epsf.c b/Build/source/texk/web2c/window/epsf.c index 05211a59970..238e2c2bf85 100644 --- a/Build/source/texk/web2c/window/epsf.c +++ b/Build/source/texk/web2c/window/epsf.c @@ -77,7 +77,7 @@ mf_epsf_header () } boolean -mf_epsf_initscreen P1H(void) +mf_epsf_initscreen (void) { if (getenv ("MFEPSF") != (char *) NULL) { @@ -101,16 +101,16 @@ mf_epsf_initscreen P1H(void) } void -mf_epsf_updatescreen P1H(void) +mf_epsf_updatescreen (void) { fflush (psout); } void -mf_epsf_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +mf_epsf_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { int i; @@ -140,10 +140,10 @@ mf_epsf_blankrectangle P4C(screencol, left, void -mf_epsf_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, transition_vector, - screencol, vector_size) +mf_epsf_paintrow (screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size) { int col; int color; diff --git a/Build/source/texk/web2c/window/hp2627.c b/Build/source/texk/web2c/window/hp2627.c index 2734bb36a02..a9505644cb6 100644 --- a/Build/source/texk/web2c/window/hp2627.c +++ b/Build/source/texk/web2c/window/hp2627.c @@ -68,7 +68,7 @@ static char mf_hp2627_pencolors[2] = { * sense status or something masochistic like that) */ -int mf_hp2627_initscreen() +int mf_hp2627_initscreen(void) { (void) fflush(stdout); /* make sure pascal-level output flushed */ (void) write(fileno(stdout), HP2627_INITSTRING, HP2627_INITSTRINGLEN); @@ -84,7 +84,7 @@ int mf_hp2627_initscreen() * but why not?) */ -void mf_hp2627_updatescreen() +void mf_hp2627_updatescreen(void) { (void) fflush(stdout); } @@ -96,10 +96,10 @@ void mf_hp2627_updatescreen() * to background color */ -void mf_hp2627_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +void mf_hp2627_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { char sprbuf[128]; @@ -163,10 +163,10 @@ void mf_hp2627_blankrectangle P4C(screencol, left, oldx = x; \ oldy = y; -void mf_hp2627_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, transition_vector, - screencol, vector_size) +void mf_hp2627_paintrow (screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size) { register color; char outbuf[512*6]; /* enough to hold an alternate color */ diff --git a/Build/source/texk/web2c/window/mftalk.c b/Build/source/texk/web2c/window/mftalk.c index 25554e05831..34d920c3098 100644 --- a/Build/source/texk/web2c/window/mftalk.c +++ b/Build/source/texk/web2c/window/mftalk.c @@ -61,8 +61,8 @@ extern int write (int, const void *, size_t); #define fatal(func, cond) do { if (cond) FATAL_PERROR ("perror"); } while (0) -static RETSIGTYPE child_died P1H(int sig); -static string app_type P2H(char *prog, int *app); +static RETSIGTYPE child_died (int sig); +static string app_type (char *prog, int *app); static int pid = -1; /* Process ID of our child. */ static int win = -1; /* Write handle to the `window'. */ @@ -71,7 +71,7 @@ static RETSIGTYPE (*old) (); /* Old signal handler. */ boolean -mf_mftalk_initscreen P1H(void) +mf_mftalk_initscreen (void) { int app; /* Client application type. */ char *prog, *name; /* Client program name. */ @@ -166,7 +166,7 @@ mf_mftalk_initscreen P1H(void) void -mf_mftalk_updatescreen P1H(void) +mf_mftalk_updatescreen (void) { buf[0] = MF_FLUSH; write (win, buf, sizeof (int)); @@ -174,10 +174,10 @@ mf_mftalk_updatescreen P1H(void) void -mf_mftalk_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +mf_mftalk_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { buf[0] = MF_RECT; buf[1] = MF_WHITE; @@ -191,10 +191,10 @@ mf_mftalk_blankrectangle P4C(screencol, left, void -mf_mftalk_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, transition_vector, - screencol, vector_size) +mf_mftalk_paintrow (screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size) { buf[0] = MF_LINE; buf[1] = init_color == 0 ? MF_WHITE : MF_BLACK; @@ -208,7 +208,7 @@ mf_mftalk_paintrow P4C(screenrow, row, static string -app_type P2C(string, prog, int *, app) +app_type (string prog, int *app) { #ifdef OS2 int res, app; diff --git a/Build/source/texk/web2c/window/next.c b/Build/source/texk/web2c/window/next.c index c3f6d4203e6..e270d643184 100644 --- a/Build/source/texk/web2c/window/next.c +++ b/Build/source/texk/web2c/window/next.c @@ -38,7 +38,7 @@ char outstring[1024]; /* the longest string pushed though a pipe */ #undef read #endif -int mf_next_initscreen() +int mf_next_initscreen(void) { int i; void mf_next_closescreen(); @@ -93,7 +93,7 @@ int mf_next_initscreen() * does nothing * */ -void mf_next_updatescreen() +void mf_next_updatescreen(void) { } /* @@ -101,10 +101,10 @@ void mf_next_updatescreen() * * blank out a port of the screen. */ -void mf_next_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +void mf_next_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { if(left==0 && top==nextheight && right==nextwidth && bottom==0 ) { @@ -127,10 +127,10 @@ void mf_next_blankrectangle P4C(screencol, left, * transition specified by "transition_vector", switch colors, * and continue for "vector_size" transitions. */ -void mf_next_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, transition_vector, - screencol, vector_size) +void mf_next_paintrow (screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size) { int i,whereami; if(init_color) { @@ -164,7 +164,7 @@ void mf_next_paintrow P4C(screenrow, row, } /* this isn't part of the online display routines. We need it to kill DrawingServant. This is called during exit */ -void mf_next_closescreen() +void mf_next_closescreen(void) { if(nextscreenlooksOK) { sprintf(outstring,"DSquit"); diff --git a/Build/source/texk/web2c/window/regis.c b/Build/source/texk/web2c/window/regis.c index c23abce4ce4..6d8c66d32ce 100644 --- a/Build/source/texk/web2c/window/regis.c +++ b/Build/source/texk/web2c/window/regis.c @@ -29,7 +29,7 @@ on a black background; undefined is the opposite */ * We always return true. */ -int mf_regis_initscreen() +int mf_regis_initscreen(void) { #ifdef WRITEWHITE printf("%cPpS(I0)W(I3)S(E)%c",ESCAPE,ESCAPE); @@ -43,7 +43,7 @@ int mf_regis_initscreen() * procedure updatescreen; * */ -void mf_regis_updatescreen() +void mf_regis_updatescreen(void) { } /* void blankrectangle(int left,int right,int top,int bottom); @@ -57,10 +57,10 @@ void mf_regis_updatescreen() * Write both or no planes: W(I3) * Return to alpha mode: \ */ -void mf_regis_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +void mf_regis_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { printf( #ifdef WRITEWHITE @@ -79,10 +79,10 @@ void mf_regis_blankrectangle P4C(screencol, left, * transition specified by "transition_vector", switch colors, * and continue for "vector_size" transitions. */ -void mf_regis_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, transition_vector, - screencol, vector_size) +void mf_regis_paintrow (screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size) { int i; if(init_color) { diff --git a/Build/source/texk/web2c/window/suntools.c b/Build/source/texk/web2c/window/suntools.c index b0cf48f0af1..b15f22c6f08 100644 --- a/Build/source/texk/web2c/window/suntools.c +++ b/Build/source/texk/web2c/window/suntools.c @@ -85,7 +85,7 @@ Pixwin *pw; */ int -mf_sun_initscreen() +mf_sun_initscreen(void) { frame = window_create(NULL,FRAME, FRAME_LABEL, "METAFONT", @@ -126,7 +126,7 @@ mf_sun_initscreen() */ void -mf_sun_updatescreen() +mf_sun_updatescreen(void) { (void)notify_dispatch(); /* if (destroy_ready != 0) return; */ @@ -148,10 +148,10 @@ mf_sun_updatescreen() */ void -mf_sun_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +mf_sun_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { pw_writebackground(pw, left, top, right-left+1, bottom-top+1, PIX_CLR); @@ -164,10 +164,10 @@ mf_sun_blankrectangle P4C(screencol, left, */ void -mf_sun_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, transition_vector, - screencol, vector_size) +mf_sun_paintrow (screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size) { register col; register color; diff --git a/Build/source/texk/web2c/window/tek.c b/Build/source/texk/web2c/window/tek.c index 78dbae26bd6..9b517d62319 100644 --- a/Build/source/texk/web2c/window/tek.c +++ b/Build/source/texk/web2c/window/tek.c @@ -33,7 +33,8 @@ char zero_array[WIDTHINBYTES]; * We always return true. */ -int mf_tektronix_initscreen() +int +mf_tektronix_initscreen(void) { bzero(zero_array, sizeof(zero_array)); return 1; @@ -44,7 +45,8 @@ int mf_tektronix_initscreen() * * Print out the screen bitmap. */ -void mf_tektronix_updatescreen() +void +mf_tektronix_updatescreen(void) { int r, c, startc, makingline; @@ -92,10 +94,11 @@ void mf_tektronix_updatescreen() * * Blanks out a port of the screen. */ -void mf_tektronix_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +void +mf_tektronix_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { int r, c; @@ -118,10 +121,11 @@ void mf_tektronix_blankrectangle P4C(screencol, left, * transition specified by "transition_vector", switch colors, * and continue for "vector_size" transitions. */ -void mf_tektronix_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, transition_vector, - screencol, vector_size) +void +mf_tektronix_paintrow (screenrow row, + pixelcolor init_color, + transspec transition_vector, + screencol vector_size) { int k = 0; int c = transition_vector[0]; diff --git a/Build/source/texk/web2c/window/uniterm.c b/Build/source/texk/web2c/window/uniterm.c index 197bff77367..dd54a892f99 100644 --- a/Build/source/texk/web2c/window/uniterm.c +++ b/Build/source/texk/web2c/window/uniterm.c @@ -103,23 +103,26 @@ register unsigned x, y; * ESC FF - clear graphics&alpha screen. */ #define ALPHA_CLS(); (putchar('\33'), putchar('\14')) -int mf_uniterm_initscreen() +int +mf_uniterm_initscreen(void) { ALPHA_CLS(); TEXT_SCREEN(); return 1; } -void mf_uniterm_updatescreen() +void +mf_uniterm_updatescreen(void) { DARK(); VECTOR(0,HEIGHT-1); fflush(stdout); TEXT_SCREEN(); /* switch to text mode */ } -void mf_uniterm_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +void +mf_uniterm_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { if (top==0 && left==0 && bottom>=HEIGHT-1 && right>=WIDTH-1) { ALPHA_CLS(); @@ -133,10 +136,11 @@ void mf_uniterm_blankrectangle P4C(screencol, left, BLOCK(0); /* back to (black) linedraw mode */ INK(1); /* black ink */ } -void mf_uniterm_paintrow P4C(screenrow, row, - pixelcolor, init_color, - register transspec, transition_vector, - register screencol, vector_size) +void +mf_uniterm_paintrow (screenrow row, + pixelcolor init_color, + register transspec transition_vector, + register screencol vector_size) { register int blank = !init_color; #if 0 diff --git a/Build/source/texk/web2c/window/win32.c b/Build/source/texk/web2c/window/win32.c index 1e85d8ba861..9a777ea8b50 100644 --- a/Build/source/texk/web2c/window/win32.c +++ b/Build/source/texk/web2c/window/win32.c @@ -51,7 +51,7 @@ void __cdecl InitGui(void*); LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam); int -mf_win32_initscreen() +mf_win32_initscreen(void) { int ret; if ((ret = _beginthread(InitGui, 0, NULL)) == -1) { @@ -142,7 +142,7 @@ void __cdecl InitGui(void *param) buffer) */ void -mf_win32_updatescreen() +mf_win32_updatescreen(void) { RECT r; r.left = 0; @@ -161,10 +161,11 @@ mf_win32_updatescreen() reset the foreground to black because we always set it at the beginning of paintrow (below). */ -void mf_win32_blankrectangle P4C(screencol, left, - screencol, right, - screenrow, top, - screenrow, bottom) +void +mf_win32_blankrectangle (screencol left, + screencol right, + screenrow top, + screenrow bottom) { RECT r; r.left = left; @@ -182,10 +183,10 @@ void mf_win32_blankrectangle P4C(screencol, left, able to do something here with drawing many lines. */ void -mf_win32_paintrow P4C(screenrow, row, - pixelcolor, init_color, - transspec, tvect, - register screencol, vector_size) +mf_win32_paintrow (screenrow row, + pixelcolor init_color, + transspec tvect, + register screencol vector_size) { register int col; HGDIOBJ CurrentPen; -- cgit v1.2.3