diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-06-24 07:02:11 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-06-24 07:02:11 +0000 |
commit | 6cbeff63c5f18ab4752342de7ae83a35118ebc38 (patch) | |
tree | e3becf02bc3d160206e1370760b38fd6a3c03609 /Build/source/texk/web2c/window | |
parent | 4257aa8b08cf9d60fbf6dd3d5da0afae5e4308ba (diff) |
use ANSI C function declarations and prototypes
git-svn-id: svn://tug.org/texlive/trunk@13938 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/window')
-rw-r--r-- | Build/source/texk/web2c/window/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/epsf.c | 20 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/hp2627.c | 20 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/mftalk.c | 26 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/next.c | 22 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/regis.c | 20 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/suntools.c | 20 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/tek.c | 24 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/uniterm.c | 24 | ||||
-rw-r--r-- | Build/source/texk/web2c/window/win32.c | 21 |
10 files changed, 109 insertions, 94 deletions
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 <peb@mppmu.mpg.de> + + * 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 <peb@mppmu.mpg.de> * 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: <ESC>\ */ -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; |