[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [build-improvements] Remove K&R cruft from src/lib
From: |
Gabriel Dos Reis |
Subject: |
[Axiom-developer] [build-improvements] Remove K&R cruft from src/lib |
Date: |
22 Nov 2006 06:06:48 -0600 |
While, I was looking at src/lib to gather unwritten assumptions made by
the C programs, my eyes were glazing over the antiquated K&R C style
declaration of functions. In 2006, we have no more reasons to write C
codes that way. Especially, none for Axiom. While I was there, I saw
various "broken" C codes, more on that latter.
-- Gaby
2006-11-21 Gabriel Dos Reis <address@hidden>
* bsdsignal.c.pamphlet: Remove K&R C style function declaration.
* cfuns-c.c.pamphlet: Likewise.
* cursor.c.pamphlet: Likewise.
* edin.c.pamphlet: Likewise.
* emupty.c.pamphlet: Likewise.
* fnct_key.c.pamphlet: Likewise.
* halloc.c.pamphlet: Likewise.
* hash.c.pamphlet: Likewise.
* openpty.c.pamphlet: Likewise.
* pixmap.c.pamphlet: Likewise.
* prt.c.pamphlet: Likewise.
* sockio-c.c.pamphlet: Likewise.
* spadcolors.c.pamphlet: Likewise.
* util.c.pamphlet: Likewise.
* wct.c.pamphlet: Likewise.
* XDither.c.pamphlet: Likewise.
* XShade.c.pamphlet: Likewise.
* XSpadFill.c.pamphlet: Likewise.
*** src/lib/XDither.c.pamphlet (revision 15245)
--- src/lib/XDither.c.pamphlet (local)
*************** unsigned int DITHERINIT = 0;
*** 92,102 ****
* high the bitmap is.
*/
int
- #ifdef _NO_PROTO
- dither_char_bitmap()
- #else
dither_char_bitmap(void)
- #endif
{
int bits_line;
int total_chars;
--- 92,98 ----
*************** dither_char_bitmap(void)
*** 110,124 ****
}
int
! #ifdef _NO_PROTO
! XInitDither(display, screen, gc, fg, bg)
! Display *display;
! int screen;
! GC gc;
! unsigned long fg, bg;
! #else
! XInitDither(Display *display, int screen, GC gc, unsigned long fg, unsigned
long bg)
! #endif
{
char *bits;
--- 106,113 ----
}
int
! XInitDither(Display *display, int screen, GC gc, unsigned long fg,
! unsigned long bg)
{
char *bits;
*************** XInitDither(Display *display, int screen
*** 171,184 ****
int
- #ifdef _NO_PROTO
- XChangeDither(display, gc, dither)
- Display *display;
- GC gc;
- int dither;
- #else
XChangeDither(Display *display, GC gc, int dither)
- #endif
{
if (!DITHERINIT) {
fprintf(stderr, "XChange Error: Init Not Called\n");
--- 160,166 ----
*************** XChangeDither(Display *display, GC gc, i
*** 194,209 ****
void
! #ifdef _NO_PROTO
! XDitherRectangle(display, drawable, gc, x, y, width, height)
! Display *display;
! Drawable drawable;
! GC gc;
! int x, y;
! unsigned int width, height;
! #else
! XDitherRectangle(Display *display, Drawable drawable, GC gc, int x,int y,
unsigned int width, unsigned int height)
! #endif
{
--- 176,183 ----
void
! XDitherRectangle(Display *display, Drawable drawable, GC gc, int x,
! int y, unsigned int width, unsigned int height)
{
*************** XDitherRectangle(Display *display, Drawa
*** 217,232 ****
void
! #ifdef _NO_PROTO
! XDitherRectangles(display, drawable, gc, rectangles, nrectangles)
! Display *display;
! Drawable drawable;
! GC gc;
! XRectangle *rectangles;
! int nrectangles;
! #else
! XDitherRectangles(Display *display, Drawable drawable, GC gc, XRectangle
*rectangles, int nrectangles)
! #endif
{
--- 191,198 ----
void
! XDitherRectangles(Display *display, Drawable drawable, GC gc,
! XRectangle *rectangles, int nrectangles)
{
*************** XDitherRectangles(Display *display, Draw
*** 241,258 ****
void
! #ifdef _NO_PROTO
! XDitherPolygon(display, drawable, gc, points, npoints, shape, mode)
! Display *display;
! Drawable drawable;
! GC gc;
! XPoint *points;
! int npoints;
! int shape;
! int mode;
! #else
! XDitherPolygon(Display * display, Drawable drawable, GC gc, XPoint *points,
int npoints, int shape, int mode)
! #endif
{
if (!DITHERINIT) {
fprintf(stderr, "XDither Error: Tried to fill before INIT called\n");
--- 207,214 ----
void
! XDitherPolygon(Display * display, Drawable drawable, GC gc,
! XPoint *points, int npoints, int shape, int mode)
{
if (!DITHERINIT) {
fprintf(stderr, "XDither Error: Tried to fill before INIT called\n");
*************** XDitherPolygon(Display * display, Drawab
*** 265,282 ****
}
void
- #ifdef _NO_PROTO
- XDitherArc(display, drawable, gc, x, y, width, height, angle1, angle2)
- Display *display;
- Drawable drawable;
- GC gc;
- int x, y;
- unsigned int width, height;
- int angle1, angle2;
- #else
XDitherArc(Display *display, Drawable drawable, GC gc, int x,int y,
! unsigned int width, unsigned int height, int angle1, int angle2)
! #endif
{
if (!DITHERINIT) {
--- 221,228 ----
}
void
XDitherArc(Display *display, Drawable drawable, GC gc, int x,int y,
! unsigned int width, unsigned int height, int angle1, int angle2)
{
if (!DITHERINIT) {
*************** XDitherArc(Display *display, Drawable dr
*** 289,304 ****
void
- #ifdef _NO_PROTO
- XDitherArcs(display, drawable, gc, arcs, narcs)
- Display *display;
- Drawable drawable;
- GC gc;
- XArc *arcs;
- int narcs;
- #else
XDitherArcs(Display *display,Drawable drawable, GC gc, XArc *arcs,int narcs)
- #endif
{
if (!DITHERINIT) {
--- 235,241 ----
*** src/lib/XShade.c.pamphlet (revision 15245)
--- src/lib/XShade.c.pamphlet (local)
*************** unsigned int INIT = 1;
*** 99,109 ****
* high the bitmap is.
*/
int
- #ifdef _NO_PROTO
- char_bitmap()
- #else
char_bitmap(void)
- #endif
{
int bits_line;
int total_chars;
--- 99,105 ----
*************** char_bitmap(void)
*** 117,129 ****
}
int
- #ifdef _NO_PROTO
- XInitShades(display, screen)
- Display *display;
- int screen;
- #else
XInitShades(Display *display, int screen)
- #endif
{
char *bits;
int count;
--- 113,119 ----
*************** XInitShades(Display *display, int screen
*** 157,169 ****
int
- #ifdef _NO_PROTO
- XChangeShade(display, shade)
- Display *display;
- int shade;
- #else
XChangeShade(Display *display, int shade)
- #endif
{
if (shade >= XShadeMax || shade < 0) {
fprintf(stderr, "Shade %d, out of range\n",shade);
--- 147,153 ----
*************** XChangeShade(Display *display, int shade
*** 174,185 ****
}
int
- #ifdef _NO_PROTO
- XQueryShades(shades)
- unsigned int *shades;
- #else
XQueryShades(unsigned int *shades)
- #endif
{
*shades = XShadeMax;
return 1;
--- 158,164 ----
*************** XQueryShades(unsigned int *shades)
*** 187,201 ****
void
! #ifdef _NO_PROTO
! XShadeRectangle(display, drawable, x, y, width, height)
! Display *display;
! Drawable drawable;
! int x, y;
! unsigned int width, height;
! #else
! XShadeRectangle(Display *display,Drawable drawable,int x,int y,unsigned int
width,unsigned int height)
! #endif
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
--- 166,173 ----
void
! XShadeRectangle(Display *display, Drawable drawable, int x,int y,
! unsigned int width, unsigned int height)
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
*************** XShadeRectangle(Display *display,Drawabl
*** 206,220 ****
void
! #ifdef _NO_PROTO
! XShadeRectangles(display, drawable, rectangles, nrectangles)
! Display *display;
! Drawable drawable;
! XRectangle *rectangles;
! int nrectangles;
! #else
! XShadeRectangles(Display *display,Drawable drawable,XRectangle
*rectangles,int nrectangles)
! #endif
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
--- 178,185 ----
void
! XShadeRectangles(Display *display, Drawable drawable,
! XRectangle *rectangles, int nrectangles)
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
*************** XShadeRectangles(Display *display,Drawab
*** 226,242 ****
void
! #ifdef _NO_PROTO
! XShadePolygon(display, drawable, points, npoints, shape, mode)
! Display *display;
! Drawable drawable;
! XPoint *points;
! int npoints;
! int shape;
! int mode;
! #else
! XShadePolygon(Display *display,Drawable drawable,XPoint * points, int
npoints,int shape, int mode)
! #endif
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
--- 191,198 ----
void
! XShadePolygon(Display *display, Drawable drawable, XPoint * points,
! int npoints, int shape, int mode)
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
*************** XShadePolygon(Display *display,Drawable
*** 248,263 ****
}
void
! #ifdef _NO_PROTO
! XShadeArc(display, drawable, x, y, width, height, angle1, angle2)
! Display *display;
! Drawable drawable;
! int x, y;
! unsigned int width, height;
! int angle1, angle2;
! #else
! XShadeArc(Display *display,Drawable drawable,int x,int y, unsigned int
width,unsigned int height,int angle1,int angle2)
! #endif
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
--- 204,211 ----
}
void
! XShadeArc(Display *display, Drawable drawable, int x, int y,
! unsigned int width, unsigned int height, int angle1, int angle2)
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
*************** XShadeArc(Display *display,Drawable draw
*** 269,283 ****
void
! #ifdef _NO_PROTO
! XShadeArcs(display, drawable, arcs, narcs)
! Display *display;
! Drawable drawable;
! XArc *arcs;
! int narcs;
! #else
! XShadeArcs(Display *display,Drawable drawable,XArc *arcs,int narcs)
! #endif
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
--- 217,223 ----
void
! XShadeArcs(Display *display, Drawable drawable, XArc *arcs, int narcs)
{
if (!INIT) {
fprintf(stderr, "XShade Error: Tried to fill before INIT called\n");
*** src/lib/XSpadFill.c.pamphlet (revision 15245)
--- src/lib/XSpadFill.c.pamphlet (local)
*************** extern int totalColors;
*** 97,111 ****
extern int maxGreyShade;
int
! #ifdef _NO_PROTO
! XInitSpadFill(dsply, scr, mapOfColors, hues, solid, dithered, shades)
! Display *dsply;
! int scr;
! Colormap *mapOfColors;
! int *hues, *solid, *dithered, *shades;
! #else
! XInitSpadFill(Display *dsply,int scr,Colormap * mapOfColors,int * hues, int
*solid,int * dithered,int * shades)
! #endif
{
int maxDither;
XColor BlackColor, WhiteColor;
--- 97,104 ----
extern int maxGreyShade;
int
! XInitSpadFill(Display *dsply, int scr, Colormap * mapOfColors, int * hues,
! int *solid, int * dithered, int * shades)
{
int maxDither;
XColor BlackColor, WhiteColor;
*************** XInitSpadFill(Display *dsply,int scr,Col
*** 189,215 ****
void
- #ifdef _NO_PROTO
- XSpadFillSetArcMode(dsply, mode)
- Display *dsply;
- int mode;
- #else
XSpadFillSetArcMode(Display *dsply, int mode)
- #endif
{
XSetArcMode(dsply, solidGC, mode);
XSetArcMode(dsply, stippleGC, mode);
}
GC
- #ifdef _NO_PROTO
- SpadFillGC(dsply, hue, theshade, fill_routine)
- Display *dsply;
- int hue, theshade;
- char *fill_routine;
- #else
SpadFillGC(Display *dsply,int hue, int theshade,char * fill_routine)
- #endif
{
int dither;
int color;
--- 182,195 ----
*************** SpadFillGC(Display *dsply,int hue, int
*** 263,274 ****
}
unsigned long
- #ifdef _NO_PROTO
- XSolidColor(hue, theshade)
- int hue , theshade;
- #else
XSolidColor(int hue, int theshade)
- #endif
{
if (hue >= totalHues)
return -1;
--- 243,249 ----
*************** XSolidColor(int hue, int theshade)
*** 278,293 ****
}
void
! #ifdef _NO_PROTO
! XSpadFillRectangle(dsply, drawable, x, y, width, height, hue, theshade)
! Display *dsply;
! Drawable drawable;
! int x, y;
! unsigned int width, height;
! int hue, theshade;
! #else
! XSpadFillRectangle(Display *dsply,Drawable drawable,int x,int y,unsigned int
width,unsigned int height,int hue, int theshade)
! #endif
{
XFillRectangle(dsply, drawable,
--- 253,261 ----
}
void
! XSpadFillRectangle(Display *dsply, Drawable drawable, int x, int y,
! unsigned int width, unsigned int height,
! int hue, int theshade)
{
XFillRectangle(dsply, drawable,
*************** XSpadFillRectangle(Display *dsply,Drawab
*** 298,313 ****
void
! #ifdef _NO_PROTO
! XSpadFillRectangles(dsply, drawable, rectangles, nrectangles, hue, theshade)
! Display *dsply;
! Drawable drawable;
! XRectangle *rectangles;
! int nrectangles;
! int hue, theshade;
! #else
! XSpadFillRectangles(Display *dsply,Drawable drawable,XRectangle *
rectangles,int nrectangles,int hue,int theshade)
! #endif
{
--- 266,274 ----
void
! XSpadFillRectangles(Display *dsply, Drawable drawable,
! XRectangle * rectangles, int nrectangles,
! int hue, int theshade)
{
*************** XSpadFillRectangles(Display *dsply,Drawa
*** 319,336 ****
void
! #ifdef _NO_PROTO
! XSpadFillPolygon(dsply, drawable, points, npoints, shape, mode, hue, theshade)
! Display *dsply;
! Drawable drawable;
! XPoint *points;
! int npoints;
! int shape;
! int mode;
! int hue, theshade;
! #else
! XSpadFillPolygon(Display *dsply, Drawable drawable,XPoint * points, int
npoints,int shape, int mode,int hue,int theshade)
! #endif
{
XFillPolygon(dsply, drawable,
SpadFillGC(dsply, hue, theshade,
"XSpadFillRectangle"),
--- 280,287 ----
void
! XSpadFillPolygon(Display *dsply, Drawable drawable, XPoint * points,
! int npoints, int shape, int mode, int hue, int theshade)
{
XFillPolygon(dsply, drawable,
SpadFillGC(dsply, hue, theshade,
"XSpadFillRectangle"),
*************** XSpadFillPolygon(Display *dsply, Drawabl
*** 339,355 ****
}
void
! #ifdef _NO_PROTO
! XSpadFillArc(dsply, drawable, x, y, width, height, angle1, angle2, hue,
theshade)
! Display *dsply;
! Drawable drawable;
! int x, y;
! unsigned int width, height;
! int angle1, angle2;
! int hue, theshade;
! #else
! XSpadFillArc(Display *dsply,Drawable drawable,int x,int y, unsigned int
width,unsigned int height, int angle1, int angle2,int hue,int theshade)
! #endif
{
XFillArc(dsply, drawable,
--- 290,298 ----
}
void
! XSpadFillArc(Display *dsply, Drawable drawable, int x, int y,
! unsigned int width, unsigned int height,
! int angle1, int angle2, int hue, int theshade)
{
XFillArc(dsply, drawable,
*************** XSpadFillArc(Display *dsply,Drawable dra
*** 359,374 ****
void
! #ifdef _NO_PROTO
! XSpadFillArcs(dsply, drawable, arcs, narcs, hue, theshade)
! Display *dsply;
! Drawable drawable;
! XArc *arcs;
! int narcs;
! int hue, theshade;
! #else
! XSpadFillArcs(Display *dsply,Drawable drawable,XArc * arcs,int narcs,int
hue,int theshade)
! #endif
{
XFillArcs(dsply, drawable,
SpadFillGC(dsply, hue, theshade, "XSpadFillArcs"),
--- 302,309 ----
void
! XSpadFillArcs(Display *dsply, Drawable drawable,XArc *arcs, int narcs,
! int hue, int theshade)
{
XFillArcs(dsply, drawable,
SpadFillGC(dsply, hue, theshade, "XSpadFillArcs"),
*** src/lib/bsdsignal.c.pamphlet (revision 15245)
--- src/lib/bsdsignal.c.pamphlet (local)
*************** of files are badly broken with respect t
*** 229,242 ****
SignalHandlerFunc
! #ifdef _NO_PROTO
! bsdSignal(sig,action,restartSystemCall)
! int sig;
! SignalHandlerFunc action;
! int restartSystemCall;
! #else
! bsdSignal(int sig,SignalHandlerFunc action,int restartSystemCall)
! #endif
{
#ifndef MSYSplatform
--- 229,235 ----
SignalHandlerFunc
! bsdSignal(int sig, SignalHandlerFunc action, int restartSystemCall)
{
#ifndef MSYSplatform
*** src/lib/cfuns-c.c.pamphlet (revision 15245)
--- src/lib/cfuns-c.c.pamphlet (local)
*************** of files are badly broken with respect t
*** 74,95 ****
int
- #ifdef _NO_PROTO
- CLgetpid()
- #else
CLgetpid(void)
- #endif
{
return getpid();
}
int
- #ifdef _NO_PROTO
- addtopath(dir)
- char *dir;
- #else
addtopath(char *dir)
- #endif
{
char *path, *newpath;
--- 74,86 ----
*************** addtopath(char *dir)
*** 113,124 ****
int
- #ifdef _NO_PROTO
- directoryp(path)
- char *path;
- #else
directoryp(char *path)
- #endif
{
struct stat buf;
int code;
--- 104,110 ----
*************** directoryp(char *path)
*** 133,144 ****
}
int
- #ifdef _NO_PROTO
- make_path_from_file(s, t)
- char *s, *t;
- #else
make_path_from_file(char *s, char *t)
- #endif
{
char *pos = "";
char *c;
--- 119,125 ----
*************** make_path_from_file(char *s, char *t)
*** 159,170 ****
}
int
- #ifdef _NO_PROTO
- writeablep(path)
- char *path;
- #else
writeablep(char *path)
- #endif
{
struct stat buf;
char newpath[100];
--- 140,146 ----
*************** writeablep(char *path)
*** 203,214 ****
int
- #ifdef _NO_PROTO
- readablep(path)
- char *path;
- #else
readablep(char *path)
- #endif
{
struct stat buf;
int code;
--- 179,185 ----
*************** readablep(char *path)
*** 231,242 ****
long
- #ifdef _NO_PROTO
- findString(file, string)
- char *file, *string;
- #else
findString(char *file, char *string)
- #endif
{
int nstring, charpos;
FILE *fn;
--- 202,208 ----
*************** findString(char *file, char *string)
*** 256,267 ****
}
int
- #ifdef _NO_PROTO
- copyEnvValue(varName, buffer)
- char *varName, *buffer;
- #else
copyEnvValue(char *varName, char *buffer)
- #endif
{
char *s;
--- 222,228 ----
*** src/lib/cursor.c.pamphlet (revision 15245)
--- src/lib/cursor.c.pamphlet (local)
*************** SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*** 67,78 ****
#include <sys/hft.h>
int
- #ifdef _NO_PROTO
- Cursor_shape(shape)
- int shape;
- #else
Cursor_shape(int shape)
- #endif
{
int hftfd;
char hftpath[16], s[100];
--- 67,73 ----
*************** Cursor_shape(int shape)
*** 151,162 ****
#else
int
- #ifdef _NO_PROTO
- Cursor_shape(shape)
- int shape;
- #else
Cursor_shape(int shape)
- #endif
{
return shape;
}
--- 146,152 ----
*** src/lib/edin.c.pamphlet (revision 15245)
--- src/lib/edin.c.pamphlet (local)
*************** int buff_pntr; /* pr
*** 102,112 ****
void
- #ifdef _NO_PROTO
- init_reader()
- #else
init_reader(void)
- #endif
{
char *termVal;
--- 102,108 ----
*************** init_reader(void)
*** 127,137 ****
void
- #ifdef _NO_PROTO
- do_reading()
- #else
do_reading(void)
- #endif
{
int ttt_read;
int done_completely;
--- 123,129 ----
*************** do_reading(void)
*** 506,516 ****
void
! #ifdef _NO_PROTO
! send_line_to_child()
! #else
! send_line_to_child(void )
! #endif
{
static char converted_buffer[MAXLINE];
int converted_num;
--- 498,504 ----
void
! send_line_to_child(void)
{
static char converted_buffer[MAXLINE];
int converted_num;
*************** send_line_to_child(void )
*** 551,564 ****
}
int
- #ifdef _NO_PROTO
- convert_buffer(target, source, source_flag, num)
- char *target, *source;
- int *source_flag;
- int num;
- #else
convert_buffer(char *target, char *source,int * source_flag, int num)
- #endif
{
int i, j;
--- 539,545 ----
*************** convert_buffer(char *target, char *sourc
*** 592,603 ****
void
- #ifdef _NO_PROTO
- insert_buff_printing(amount)
- int amount;
- #else
insert_buff_printing(int amount)
- #endif
{
int count;
--- 573,579 ----
*************** insert_buff_printing(int amount)
*** 654,665 ****
}
void
- #ifdef _NO_PROTO
- insert_buff_nonprinting(amount)
- int amount;
- #else
insert_buff_nonprinting(int amount)
- #endif
{
int count;
--- 630,636 ----
*************** insert_buff_nonprinting(int amount)
*** 765,775 ****
}
void
- #ifdef _NO_PROTO
- prev_buff()
- #else
prev_buff(void)
- #endif
{
/*
--- 736,742 ----
*************** prev_buff(void)
*** 801,811 ****
}
void
- #ifdef _NO_PROTO
- next_buff()
- #else
next_buff(void)
- #endif
{
/*
--- 768,774 ----
*************** next_buff(void)
*** 837,849 ****
void
- #ifdef _NO_PROTO
- forwardcopy(buff1, buff2, num)
- char *buff1, *buff2;
- int num;
- #else
forwardcopy(char *buff1,char * buff2,int num)
- #endif
{
int count;
--- 800,806 ----
*************** forwardcopy(char *buff1,char * buff2,int
*** 853,865 ****
void
- #ifdef _NO_PROTO
- forwardflag_cpy(buff1, buff2, num)
- int *buff1, *buff2;
- int num;
- #else
forwardflag_cpy(int *buff1,int * buff2,int num)
- #endif
{
int count;
--- 810,816 ----
*************** forwardflag_cpy(int *buff1,int * buff2,i
*** 868,879 ****
}
void
- #ifdef _NO_PROTO
- flagcpy(s, t)
- int *s, *t;
- #else
flagcpy(int *s,int *t)
- #endif
{
while (*t >= 0)
*s++ = *t++;
--- 819,825 ----
*************** flagcpy(int *s,int *t)
*** 881,903 ****
}
void
- #ifdef _NO_PROTO
- flagncpy(s, t, n)
- int *s, *t, n;
- #else
flagncpy(int *s,int *t,int n)
- #endif
{
while (n-- > 0)
*s++ = *t++;
}
void
- #ifdef _NO_PROTO
- insert_queue()
- #else
insert_queue(void)
- #endif
{
QueStruct *trace;
QueStruct *new;
--- 827,840 ----
*************** insert_queue(void)
*** 960,972 ****
void
- #ifdef _NO_PROTO
- init_flag(flags, num)
- int *flags;
- int num;
- #else
init_flag(int *flags, int num)
- #endif
{
int i;
--- 897,903 ----
*************** init_flag(int *flags, int num)
*** 975,987 ****
}
void
- #ifdef _NO_PROTO
- init_buff(flags, num)
- char *flags;
- int num;
- #else
init_buff(char *flags, int num)
- #endif
{
int i;
--- 906,912 ----
*************** init_buff(char *flags, int num)
*** 991,1001 ****
void
- #ifdef _NO_PROTO
- send_function_to_child()
- #else
send_function_to_child(void)
- #endif
{
/* Takes care of sending a line to the child, and resetting the
buffer for new input */
--- 916,922 ----
*************** send_function_to_child(void)
*** 1027,1038 ****
}
void
- #ifdef _NO_PROTO
- send_buff_to_child(chann)
- int chann;
- #else
send_buff_to_child(int chann)
- #endif
{
if (buff_pntr > 0)
write(chann, buff, buff_pntr);
--- 948,954 ----
*** src/lib/emupty.c.pamphlet (revision 15245)
--- src/lib/emupty.c.pamphlet (local)
*************** SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*** 62,74 ****
#include "sys/devinfo.h"
#include <sys/ioctl.h>
! emuhft(arg, tty, ptc, len)
! union {
! struct hfintro *hf;
! struct hfctlreq *re;
! char *c;
! } arg;
! int tty, ptc, len;
{
/* What does it do? */
/* 1. There are a number of ioctl's associated with the HFT terminal. */
--- 62,74 ----
#include "sys/devinfo.h"
#include <sys/ioctl.h>
! typedef union {
! struct hfintro *hf;
! struct hfctlreq *re;
! char *c;
! } Argument;
!
! emuhft(Argument arg, int tty, int ptc, int len)
{
/* What does it do? */
/* 1. There are a number of ioctl's associated with the HFT terminal. */
*************** emuhft(arg, tty, ptc, len)
*** 230,237 ****
#endif
! static int _ThatsAll_(x)
! int x;
{
return x;
}
--- 230,236 ----
#endif
! static int _ThatsAll_(int x)
{
return x;
}
*** src/lib/fnct_key.c.pamphlet (revision 15245)
--- src/lib/fnct_key.c.pamphlet (local)
*************** char editorfilename[100];
*** 114,124 ****
*/
void
! #ifdef _NO_PROTO
! set_editor_key()
! #else
! set_editor_key(void )
! #endif
{
int pid;
--- 114,120 ----
*/
void
! set_editor_key(void)
{
int pid;
*************** set_editor_key(void )
*** 133,148 ****
- void
- #ifdef _NO_PROTO
- define_function_keys()
- #else
- define_function_keys(void )
- #endif
/*** This routine id used to find the users function key mappings. It
simply searches the users HOME directory for a file called ".clef".
If found it gets the key bindings from within
*****/
{
char *HOME, path[1024], string[1024];
int key;
--- 129,141 ----
/*** This routine id used to find the users function key mappings. It
simply searches the users HOME directory for a file called ".clef".
If found it gets the key bindings from within
*****/
+
+ void
+ define_function_keys(void)
{
char *HOME, path[1024], string[1024];
int key;
*************** define_function_keys(void )
*** 216,228 ****
#define defof(c) ((c == 'F' || c == 'D' || c == 'E')?(1):(0))
int
- #ifdef _NO_PROTO
- get_key(fd, ty)
- int fd;
- char *ty;
- #else
get_key(int fd,char * ty)
- #endif
{
/*
--- 209,215 ----
*************** get_key(int fd,char * ty)
*** 248,260 ****
}
int
- #ifdef _NO_PROTO
- get_str(fd, string)
- int fd;
- char *string;
- #else
get_str(int fd,char * string)
- #endif
{
/** Gets the key mapping being bound **/
char c;
--- 235,241 ----
*************** get_str(int fd,char * string)
*** 275,297 ****
}
void
- #ifdef _NO_PROTO
- null_fnct(sig)
- int sig;
- #else
null_fnct(int sig)
- #endif
{
return;
}
void
- #ifdef _NO_PROTO
- handle_function_key(key, chann)
- int key, chann;
- #else
handle_function_key(int key,int chann)
- #endif
{
/** this procedure simply adds the string specified by the function key
to the buffer ****/
--- 256,268 ----
*** src/lib/halloc.c.pamphlet (revision 15245)
--- src/lib/halloc.c.pamphlet (local)
*************** SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*** 59,71 ****
/* allocate memory and bomb if none left (hyperTeX alloc) */
char *
- #ifdef _NO_PROTO
- halloc(bytes, msg)
- int bytes;
- char *msg;
- #else
halloc(int bytes,char * msg)
- #endif
{
static char buf[200];
char *result;
--- 59,65 ----
*** src/lib/hash.c.pamphlet (revision 15245)
--- src/lib/hash.c.pamphlet (local)
*************** SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*** 62,76 ****
/* initialize a hash table */
void
! #ifndef _NO_PROTO
! hash_init(HashTable *table, int size, EqualFunction equal, HashcodeFunction
hash_code)
! #else
! hash_init(table,size,equal,hash_code)
! HashTable *table;
! int size;
! EqualFunction equal;
! HashcodeFunction hash_code;
! #endif
{
int i;
--- 62,69 ----
/* initialize a hash table */
void
! hash_init(HashTable *table, int size, EqualFunction equal,
! HashcodeFunction hash_code)
{
int i;
*************** HashcodeFunction hash_code;
*** 85,97 ****
}
void
- #ifndef _NO_PROTO
free_hash(HashTable *table, FreeFunction free_fun)
- #else
- free_hash(table,free_fun)
- HashTable *table;
- FreeFunction free_fun;
- #endif
{
if (table) {
int i;
--- 78,84 ----
*************** FreeFunction free_fun;
*** 114,127 ****
/* insert an entry into a hash table */
void
- #ifndef _NO_PROTO
hash_insert(HashTable *table, char *data, char *key)
- #else
- hash_insert(table,data,key)
- HashTable *table;
- char *data;
- char *key;
- #endif
{
HashEntry *entry = (HashEntry *) halloc(sizeof(HashEntry), "HashEntry");
int code;
--- 101,107 ----
*************** char *key;
*** 138,150 ****
}
char *
- #ifndef _NO_PROTO
hash_find(HashTable *table, char *key)
- #else
- hash_find(table,key)
- HashTable *table;
- char *key;
- #endif
{
HashEntry *entry;
int code = table->hash_code(key, table->size) % table->size;
--- 118,124 ----
*************** char *key;
*** 156,169 ****
}
char *
- #ifndef _NO_PROTO
hash_replace(HashTable *table, char *data, char *key)
- #else
- hash_replace(table,data,key)
- HashTable *table;
- char *data;
- char *key;
- #endif
{
HashEntry *entry;
int code = table->hash_code(key, table->size) % table->size;
--- 130,136 ----
*************** char *key;
*** 177,189 ****
}
void
- #ifndef _NO_PROTO
hash_delete(HashTable *table, char *key)
- #else
- hash_delete(table,key)
- HashTable *table;
- char *key;
- #endif
{
HashEntry **entry;
int code = table->hash_code(key, table->size) % table->size;
--- 144,150 ----
*************** char *key;
*** 197,209 ****
}
void
- #ifndef _NO_PROTO
hash_map(HashTable *table, MappableFunction func)
- #else
- hash_map(table,func)
- HashTable *table;
- MappableFunction func;
- #endif
{
int i;
HashEntry *e;
--- 158,164 ----
*************** MappableFunction func;
*** 216,227 ****
}
HashEntry *
- #ifndef _NO_PROTO
hash_copy_entry(HashEntry *e)
- #else
- hash_copy_entry(e)
- HashEntry *e;
- #endif
{
HashEntry *ne;
--- 171,177 ----
*************** HashEntry *e;
*** 236,247 ****
/* copy a hash table */
HashTable *
- #ifndef _NO_PROTO
hash_copy_table(HashTable *table)
- #else
- hash_copy_table(table)
- HashTable *table;
- #endif
{
HashTable *nt = (HashTable *) halloc(sizeof(HashTable), "copy hash
table");
int i;
--- 186,192 ----
*************** HashTable *table;
*** 259,271 ****
/* hash code function for strings */
int
- #ifndef _NO_PROTO
string_hash(char *s, int size)
- #else
- string_hash(s,size)
- char *s;
- int size;
- #endif
{
int c = 0;
char *p =s;
--- 204,210 ----
*************** int size;
*** 279,302 ****
/* test strings for equality */
int
- #ifndef _NO_PROTO
string_equal(char *s1, char *s2)
- #else
- string_equal(s1,s2)
- char *s1,*s2;
- #endif
{
return (strcmp(s1, s2) == 0);
}
/* make a fresh copy of the given string */
char *
- #ifndef _NO_PROTO
alloc_string(char *str)
- #else
- alloc_string(str)
- char *str;
- #endif
{
char * result;
result = halloc(strlen(str)+1,"String");
--- 218,231 ----
*** src/lib/openpty.c.pamphlet (revision 15245)
--- src/lib/openpty.c.pamphlet (local)
*************** SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*** 94,108 ****
int
- #ifdef _NO_PROTO
- ptyopen(controller, server, controllerPath, serverPath)
- int *controller;
- int *server;
- char *controllerPath, *serverPath;
- #else
ptyopen(int *controller,int * server, char *controllerPath,char * serverPath)
- #endif
-
{
#if defined(SUNplatform) || defined (HP9platform) || defined(RTplatform)
||defined(AIX370platform) || defined(BSDplatform)
int looking = 1, i;
--- 94,100 ----
*************** extern char* ptsname(int);
*** 203,214 ****
void
- #ifdef _NO_PROTO
- makeNextPtyNames(cont, serv)
- char *cont, *serv;
- #else
makeNextPtyNames(char *cont,char * serv)
- #endif
{
#ifdef AIX370platform
static int channelNo = 0;
--- 195,201 ----
*** src/lib/pixmap.c.pamphlet (revision 15245)
--- src/lib/pixmap.c.pamphlet (local)
*************** On the [[MAC OSX]] platform they defined
*** 14,25 ****
is only used in this file we simply rename it to [[zzopen]].
<<mac zopen redefinition 1>>=
FILE *
- #ifdef _NO_PROTO
- zzopen(file, mode)
- char *file, *mode;
- #else
zzopen(char *file,char * mode)
- #endif
@
<<mac zopen redefinition 2>>=
file = zzopen(filename, "r");
--- 14,20 ----
*************** SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*** 87,98 ****
/* returns true if the file exists */
int
- #ifdef _NO_PROTO
- file_exists(file)
- char *file;
- #else
file_exists(char *file)
- #endif
{
FILE *f;
--- 82,88 ----
*************** file_exists(char *file)
*** 142,156 ****
********************************************************************/
void
! #ifdef _NO_PROTO
! write_pixmap_file(dsp, scr, fn, wid, x, y, width, height)
! Display *dsp;
! char *fn;
! Window wid; /* this is originally a Pixmap */
! int scr, x, y, width, height;
! #else
! write_pixmap_file(Display *dsp, int scr, char *fn, Window wid, int x, int y,
int width,int height)
! #endif
{
XImage *xi;
FILE *file;
--- 132,140 ----
********************************************************************/
void
! write_pixmap_file(Display *dsp, int scr, char *fn,
! Window wid /* the original pixmap/,
! int x, int y, int width,int height)
{
XImage *xi;
FILE *file;
*************** write_pixmap_file(Display *dsp, int scr,
*** 221,236 ****
********************************************************************/
int
! #ifdef _NO_PROTO
! read_pixmap_file(display, screen, filename, xi, width, height)
! Display *display;
! int screen;
! char *filename;
! XImage **xi;
! int *width, *height;
! #else
! read_pixmap_file(Display *display, int screen, char *filename,XImage **xi,
int *width, int *height)
! #endif
{
FILE *file;
int wi, h, num, num_colors, read_this_time, offset;
--- 205,212 ----
********************************************************************/
int
! read_pixmap_file(Display *display, int screen, char *filename,
! XImage **xi, int *width, int *height)
{
FILE *file;
int wi, h, num, num_colors, read_this_time, offset;
*************** read_pixmap_file(Display *display, int s
*** 315,330 ****
#include "xpm.h"
int
! #ifdef _NO_PROTO
! read_pixmap_file(display, screen, filename, xi, width, height)
! Display *display;
! int screen;
! char *filename;
! XImage **xi;
! int *width, *height;
! #else
! read_pixmap_file(Display *display, int screen, char *filename,XImage **xi,
int *width, int *height)
! #endif
{
XpmAttributes attr;
XImage *xireturn;
--- 291,298 ----
#include "xpm.h"
int
! read_pixmap_file(Display *display, int screen, char *filename,
! XImage **xi, int *width, int *height)
{
XpmAttributes attr;
XImage *xireturn;
*************** read_pixmap_file(Display *display, int s
*** 359,373 ****
void
! #ifdef _NO_PROTO
! write_pixmap_file(dsp, scr, fn, wid, x, y, width, height)
! Display *dsp;
! char *fn;
! Window wid; /* this is originally a Pixmap */
! int scr, x, y, width, height;
! #else
! write_pixmap_file(Display *dsp, int scr, char *fn, Window wid, int x, int y,
int width,int height)
! #endif
{
XImage *xi;
int status;
--- 327,335 ----
void
! write_pixmap_file(Display *dsp, int scr, char *fn,
! Window wid /* the original pixmap/,
! int x, int y, int width,int height)
{
XImage *xi;
int status;
*** src/lib/prt.c.pamphlet (revision 15245)
--- src/lib/prt.c.pamphlet (local)
*************** SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*** 57,68 ****
#include "edin.H1"
void
- #ifdef _NO_PROTO
- myputchar(c)
- char c;
- #else
myputchar(char c)
- #endif
{
if (ECHOIT)
putchar(c);
--- 57,63 ----
*************** myputchar(char c)
*** 70,80 ****
}
void
- #ifdef _NO_PROTO
- clear_buff()
- #else
clear_buff(void)
- #endif
{
int count;
--- 65,71 ----
*************** clear_buff(void)
*** 99,109 ****
void
- #ifdef _NO_PROTO
- move_end()
- #else
move_end(void)
- #endif
{
/** Moves cursor to the end of the line ***/
--- 90,96 ----
*************** move_end(void)
*** 119,129 ****
}
void
- #ifdef _NO_PROTO
- move_home()
- #else
move_home(void)
- #endif
{
/*** Moves the cursor to the front of the line ***/
--- 106,112 ----
*************** move_home(void)
*** 141,151 ****
}
void
- #ifdef _NO_PROTO
- move_fore_word()
- #else
move_fore_word(void)
- #endif
{
/** move the cursor to the next blank space **/
if (curr_pntr != buff_pntr) {
--- 124,130 ----
*************** move_fore_word(void)
*** 163,173 ****
}
void
- #ifdef _NO_PROTO
- move_back_word()
- #else
move_back_word(void)
- #endif
{
/*** moves the cursor to the last blank space ***/
if (curr_pntr > 0) {
--- 142,148 ----
*************** move_back_word(void)
*** 186,196 ****
}
void
- #ifdef _NO_PROTO
- delete_current_char()
- #else
delete_current_char(void)
- #endif
{
/** deletes the char currently above the current_pntr, if it can be **/
if (curr_pntr != buff_pntr) {
--- 161,167 ----
*************** delete_current_char(void)
*** 226,236 ****
}
void
- #ifdef _NO_PROTO
- delete_to_end_of_line()
- #else
delete_to_end_of_line(void)
- #endif
{
int count;
--- 197,203 ----
*************** delete_to_end_of_line(void)
*** 254,264 ****
}
void
- #ifdef _NO_PROTO
- delete_line()
- #else
delete_line(void)
- #endif
{
int count;
--- 221,227 ----
*************** delete_line(void)
*** 290,302 ****
}
void
- #ifdef _NO_PROTO
- printbuff(start, num)
- int start;
- int num;
- #else
printbuff(int start,int num)
- #endif
{
int trace;
--- 253,259 ----
*************** printbuff(int start,int num)
*** 307,318 ****
}
void
- #ifdef _NO_PROTO
- del_print(start, num)
- int start, num;
- #else
del_print(int start, int num)
- #endif
{
int count;
--- 264,270 ----
*************** del_print(int start, int num)
*** 331,343 ****
void
- #ifdef _NO_PROTO
- ins_print(start, num)
- int start;
- int num;
- #else
ins_print(int start,int num)
- #endif
{
int count;
--- 283,289 ----
*************** ins_print(int start,int num)
*** 352,362 ****
}
void
- #ifdef _NO_PROTO
- reprint(start)
- #else
reprint(int start)
- #endif
{
/** simply reprints a single character **/
if (buff[start] == '\0')
--- 298,304 ----
*************** reprint(int start)
*** 369,380 ****
}
void
- #ifdef _NO_PROTO
- back_up(num_chars)
- int num_chars;
- #else
back_up(int num_chars)
- #endif
{
int cnt;
--- 311,317 ----
*************** back_up(int num_chars)
*** 389,400 ****
}
void
- #ifdef _NO_PROTO
- back_it_up(num_chars)
- int num_chars;
- #else
back_it_up(int num_chars)
- #endif
{
int cnt;
--- 326,332 ----
*************** back_it_up(int num_chars)
*** 405,415 ****
void
- #ifdef _NO_PROTO
- print_whole_buff()
- #else
print_whole_buff(void)
- #endif
{
int trace;
--- 337,343 ----
*************** print_whole_buff(void)
*** 420,430 ****
}
void
- #ifdef _NO_PROTO
- move_ahead()
- #else
move_ahead(void)
- #endif
{
/*** simply moves the pointer ahead a single word ***/
if (curr_pntr == buff_pntr) {
--- 348,354 ----
*************** move_ahead(void)
*** 440,450 ****
}
void
- #ifdef _NO_PROTO
- move_back()
- #else
move_back(void)
- #endif
{
/** simply moves the cursor back one position **/
if (curr_pntr == 0) {
--- 364,370 ----
*************** move_back(void)
*** 462,472 ****
}
void
- #ifdef _NO_PROTO
- back_over_current_char()
- #else
back_over_current_char(void)
- #endif
{
/*** simply backs over the character behind the cursor ***/
if (curr_pntr == 0) {
--- 382,388 ----
*** src/lib/sockio-c.c.pamphlet (revision 15245)
--- src/lib/sockio-c.c.pamphlet (local)
*************** int still_reading = 0;
*** 105,130 ****
#include "sockio-c.H1"
void
- #ifdef _NO_PROTO
- sigpipe_handler(sig)
- int sig;
- #else
sigpipe_handler(int sig)
- #endif
{
socket_closed = 1;
}
int
- #ifdef _NO_PROTO
- wait_for_client_read(sock, buf, buf_size, msg)
- Sock *sock;
- char *buf;
- int buf_size;
- char *msg;
- #else
wait_for_client_read(Sock *sock,char *buf,int buf_size,char *msg)
- #endif
{
int ret_val;
switch(sock->purpose) {
--- 105,117 ----
*************** wait_for_client_read(Sock *sock,char *bu
*** 141,155 ****
}
int
- #ifdef _NO_PROTO
- wait_for_client_write(sock, buf, buf_size, msg)
- Sock *sock;
- char *buf;
- int buf_size;
- char *msg;
- #else
wait_for_client_write(Sock *sock,char *buf,int buf_size,char *msg)
- #endif
{
int ret_val;
switch(sock->purpose) {
--- 128,134 ----
*************** wait_for_client_write(Sock *sock,char *b
*** 166,180 ****
}
int
- #ifdef _NO_PROTO
- sread(sock, buf, buf_size, msg)
- Sock *sock;
- char *buf;
- int buf_size;
- char *msg;
- #else
sread(Sock *sock,char *buf,int buf_size,char *msg)
- #endif
{
int ret_val;
char err_msg[256];
--- 145,151 ----
*************** sread(Sock *sock,char *buf,int buf_size,
*** 199,213 ****
}
int
- #ifdef _NO_PROTO
- swrite(sock, buf, buf_size, msg)
- Sock *sock;
- char *buf;
- int buf_size;
- char *msg;
- #else
swrite(Sock *sock,char *buf,int buf_size,char *msg)
- #endif
{
int ret_val;
char err_msg[256];
--- 170,176 ----
*************** swrite(Sock *sock,char *buf,int buf_size
*** 233,246 ****
}
int
- #ifdef _NO_PROTO
- sselect(n, rd, wr, ex, timeout)
- int n;
- fd_set *rd, *wr, *ex;
- void *timeout;
- #else
sselect(int n,fd_set *rd, fd_set *wr, fd_set *ex, void *timeout)
- #endif
{
int ret_val;
do {
--- 196,202 ----
*************** sselect(int n,fd_set *rd, fd_set *wr,
*** 250,264 ****
}
int
- #ifdef _NO_PROTO
- fill_buf(sock, buf, len, msg)
- Sock *sock;
- char *buf;
- int len;
- char *msg;
- #else
fill_buf(Sock *sock,char *buf, int len, char *msg)
- #endif
{
int bytes = 0, ret_val;
while(bytes < len) {
--- 206,212 ----
*************** fill_buf(Sock *sock,char *buf, int len,
*** 270,281 ****
}
int
- #ifdef _NO_PROTO
- get_int(sock)
- Sock *sock;
- #else
get_int(Sock *sock)
- #endif
{
int val = -1, len;
len = fill_buf(sock, (char *)&val, sizeof(int), "integer");
--- 218,224 ----
*************** get_int(Sock *sock)
*** 292,303 ****
}
int
- #ifdef _NO_PROTO
- sock_get_int(purpose)
- int purpose;
- #else
sock_get_int(int purpose)
- #endif
{
if (accept_if_needed(purpose) != -1)
return get_int(purpose_table[purpose]);
--- 235,241 ----
*************** sock_get_int(int purpose)
*** 305,317 ****
}
int
- #ifdef _NO_PROTO
- get_ints(sock, vals, num)
- Sock *sock;
- int *vals, num;
- #else
get_ints(Sock *sock, int *vals, int num)
- #endif
{
int i;
for(i=0; i<num; i++)
--- 243,249 ----
*************** get_ints(Sock *sock, int *vals, int num)
*** 320,331 ****
}
int
- #ifdef _NO_PROTO
- sock_get_ints(purpose, vals, num)
- int purpose, *vals, num;
- #else
sock_get_ints(int purpose, int *vals, int num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return get_ints(purpose_table[purpose], vals, num);
--- 252,258 ----
*************** sock_get_ints(int purpose, int *vals, in
*** 333,345 ****
}
int
- #ifdef _NO_PROTO
- send_int(sock, val)
- Sock *sock;
- int val;
- #else
send_int(Sock *sock,int val)
- #endif
{
int ret_val;
ret_val = swrite(sock, (char *)&val, sizeof(int), NULL);
--- 260,266 ----
*************** send_int(Sock *sock,int val)
*** 350,361 ****
}
int
- #ifdef _NO_PROTO
- sock_send_int(purpose, val)
- int purpose, val;
- #else
sock_send_int(int purpose,int val)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_int(purpose_table[purpose], val);
--- 271,277 ----
*************** sock_send_int(int purpose,int val)
*** 363,375 ****
}
int
- #ifdef _NO_PROTO
- send_ints(sock, vals, num)
- Sock *sock;
- int *vals, num;
- #else
send_ints(Sock *sock, int *vals, int num)
- #endif
{
int i;
for(i=0; i<num; i++)
--- 279,285 ----
*************** send_ints(Sock *sock, int *vals, int num
*** 379,390 ****
}
int
- #ifdef _NO_PROTO
- sock_send_ints(purpose, vals, num)
- int purpose, *vals, num;
- #else
sock_send_ints(int purpose, int *vals, int num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_ints(purpose_table[purpose], vals, num);
--- 289,295 ----
*************** sock_send_ints(int purpose, int *vals, i
*** 392,405 ****
}
int
- #ifdef _NO_PROTO
- send_string_len(sock, str, len)
- Sock *sock;
- char *str;
- int len;
- #else
send_string_len(Sock *sock,char *str,int len)
- #endif
{
int val;
if (len > 1023) {
--- 297,303 ----
*************** send_string_len(Sock *sock,char *str,int
*** 424,436 ****
}
int
- #ifdef _NO_PROTO
- send_string(sock, str)
- Sock *sock;
- char *str;
- #else
send_string(Sock *sock, char *str)
- #endif
{
int val, len = strlen(str);
send_int(sock, len+1);
--- 322,328 ----
*************** send_string(Sock *sock, char *str)
*** 443,455 ****
int
- #ifdef _NO_PROTO
- sock_send_string(purpose, str)
- int purpose;
- char *str;
- #else
sock_send_string(int purpose, char *str)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_string(purpose_table[purpose], str);
--- 335,341 ----
*************** sock_send_string(int purpose, char *str)
*** 457,470 ****
}
int
- #ifdef _NO_PROTO
- sock_send_string_len(purpose, str, len)
- int purpose;
- char *str;
- int len;
- #else
sock_send_string_len(int purpose, char * str, int len)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_string_len(purpose_table[purpose], str, len);
--- 343,349 ----
*************** sock_send_string_len(int purpose, char *
*** 472,485 ****
}
int
- #ifdef _NO_PROTO
- send_strings(sock, vals, num)
- Sock *sock;
- char **vals;
- int num;
- #else
send_strings(Sock *sock, char ** vals, int num)
- #endif
{
int i;
for(i=0; i<num; i++)
--- 351,357 ----
*************** send_strings(Sock *sock, char ** vals, i
*** 489,502 ****
}
int
- #ifdef _NO_PROTO
- sock_send_strings(purpose, vals, num)
- int purpose;
- char **vals;
- int num;
- #else
sock_send_strings(int purpose, char **vals, int num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_strings(purpose_table[purpose], vals, num);
--- 361,367 ----
*************** sock_send_strings(int purpose, char **va
*** 504,515 ****
}
char *
- #ifdef _NO_PROTO
- get_string(sock)
- Sock *sock;
- #else
get_string(Sock *sock)
- #endif
{
int val, len;
char *buf;
--- 369,375 ----
*************** get_string(Sock *sock)
*** 528,539 ****
}
char *
- #ifdef _NO_PROTO
- sock_get_string(purpose)
- int purpose;
- #else
sock_get_string(int purpose)
- #endif
{
if (accept_if_needed(purpose) != -1)
return get_string(purpose_table[purpose]);
--- 388,394 ----
*************** sock_get_string(int purpose)
*** 542,555 ****
char *
- #ifdef _NO_PROTO
- get_string_buf(sock, buf, buf_len)
- Sock *sock;
- char *buf;
- int buf_len;
- #else
get_string_buf(Sock *sock, char *buf, int buf_len)
- #endif
{
int val;
if(!str_len) str_len = get_int(sock);
--- 397,403 ----
*************** get_string_buf(Sock *sock, char *buf, in
*** 570,583 ****
}
char *
- #ifdef _NO_PROTO
- sock_get_string_buf(purpose, buf, buf_len)
- int purpose;
- char *buf;
- int buf_len;
- #else
sock_get_string_buf(int purpose, char * buf, int buf_len)
- #endif
{
if (accept_if_needed(purpose) != -1)
return get_string_buf(purpose_table[purpose], buf, buf_len);
--- 418,424 ----
*************** sock_get_string_buf(int purpose, char *
*** 585,598 ****
}
int
- #ifdef _NO_PROTO
- get_strings(sock, vals, num)
- Sock *sock;
- char **vals;
- int num;
- #else
get_strings(Sock *sock,char **vals,int num)
- #endif
{
int i;
for(i=0; i<num; i++)
--- 426,432 ----
*************** get_strings(Sock *sock,char **vals,int n
*** 601,614 ****
}
int
- #ifdef _NO_PROTO
- sock_get_strings(purpose, vals, num)
- int purpose;
- char **vals;
- int num;
- #else
sock_get_strings(int purpose, char ** vals, int num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return get_strings(purpose_table[purpose], vals, num);
--- 435,441 ----
*************** sock_get_strings(int purpose, char ** va
*** 616,628 ****
}
int
- #ifdef _NO_PROTO
- send_float(sock, num)
- Sock *sock;
- double num;
- #else
send_float(Sock *sock, double num)
- #endif
{
int val;
val = swrite(sock, (char *)&num, sizeof(double), NULL);
--- 443,449 ----
*************** send_float(Sock *sock, double num)
*** 633,645 ****
}
int
- #ifdef _NO_PROTO
- sock_send_float(purpose, num)
- int purpose;
- double num;
- #else
sock_send_float(int purpose, double num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_float(purpose_table[purpose], num);
--- 454,460 ----
*************** sock_send_float(int purpose, double num)
*** 647,660 ****
}
int
- #ifdef _NO_PROTO
- send_sfloats(sock, vals, num)
- Sock *sock;
- float *vals;
- int num;
- #else
send_sfloats(Sock *sock, float *vals,int num)
- #endif
{
int i;
for(i=0; i<num; i++)
--- 462,468 ----
*************** send_sfloats(Sock *sock, float *vals,int
*** 664,677 ****
}
int
- #ifdef _NO_PROTO
- sock_send_sfloats(purpose, vals, num)
- int purpose;
- float *vals;
- int num;
- #else
sock_send_sfloats(int purpose, float * vals, int num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_sfloats(purpose_table[purpose], vals, num);
--- 472,478 ----
*************** sock_send_sfloats(int purpose, float * v
*** 679,692 ****
}
int
- #ifdef _NO_PROTO
- send_floats(sock, vals, num)
- Sock *sock;
- double *vals;
- int num;
- #else
send_floats(Sock *sock, double *vals, int num)
- #endif
{
int i;
for(i=0; i<num; i++)
--- 480,486 ----
*************** send_floats(Sock *sock, double *vals, in
*** 696,709 ****
}
int
- #ifdef _NO_PROTO
- sock_send_floats(purpose, vals, num)
- int purpose;
- double *vals;
- int num;
- #else
sock_send_floats(int purpose, double *vals, int num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_floats(purpose_table[purpose], vals, num);
--- 490,496 ----
*************** sock_send_floats(int purpose, double *v
*** 711,722 ****
}
double
- #ifdef _NO_PROTO
- get_float(sock)
- Sock *sock;
- #else
get_float(Sock *sock)
- #endif
{
int val;
double num = -1.0;
--- 498,504 ----
*************** get_float(Sock *sock)
*** 728,739 ****
}
double
- #ifdef _NO_PROTO
- sock_get_float(purpose)
- int purpose;
- #else
sock_get_float(int purpose)
- #endif
{
if (accept_if_needed(purpose) != -1)
return get_float(purpose_table[purpose]);
--- 510,516 ----
*************** sock_get_float(int purpose)
*** 741,754 ****
}
int
- #ifdef _NO_PROTO
- get_sfloats(sock, vals, num)
- Sock *sock;
- float *vals;
- int num;
- #else
get_sfloats(Sock *sock, float *vals, int num)
- #endif
{
int i;
for(i=0; i<num; i++)
--- 518,524 ----
*************** get_sfloats(Sock *sock, float *vals, int
*** 758,771 ****
int
- #ifdef _NO_PROTO
- sock_get_sfloats(purpose, vals, num)
- int purpose;
- float *vals;
- int num;
- #else
sock_get_sfloats(int purpose,float * vals, int num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return get_sfloats(purpose_table[purpose], vals, num);
--- 528,534 ----
*************** sock_get_sfloats(int purpose,float * val
*** 773,786 ****
}
int
- #ifdef _NO_PROTO
- get_floats(sock, vals, num)
- Sock *sock;
- double *vals;
- int num;
- #else
get_floats(Sock *sock,double *vals,int num)
- #endif
{
int i;
for(i=0; i<num; i++)
--- 536,542 ----
*************** get_floats(Sock *sock,double *vals,int n
*** 790,803 ****
int
- #ifdef _NO_PROTO
- sock_get_floats(purpose, vals, num)
- int purpose;
- double *vals;
- int num;
- #else
sock_get_floats(int purpose, double *vals, int num)
- #endif
{
if (accept_if_needed(purpose) != -1)
return get_floats(purpose_table[purpose], vals, num);
--- 546,552 ----
*************** sock_get_floats(int purpose, double *val
*** 805,817 ****
}
int
- #ifdef _NO_PROTO
- wait_for_client_kill(sock, sig)
- Sock *sock;
- int sig;
- #else
wait_for_client_kill(Sock *sock, int sig)
- #endif
{
int ret_val;
switch(sock->purpose) {
--- 554,560 ----
*************** wait_for_client_kill(Sock *sock, int sig
*** 829,840 ****
int
- #ifdef _NO_PROTO
- sock_get_remote_fd(purpose)
- int purpose;
- #else
sock_get_remote_fd(int purpose)
- #endif
{
if (accept_if_needed(purpose) != -1)
return purpose_table[purpose]->remote_fd;
--- 572,578 ----
*************** sock_get_remote_fd(int purpose)
*** 842,854 ****
}
int
- #ifdef _NO_PROTO
- send_signal(sock, sig)
- Sock *sock;
- int sig;
- #else
send_signal(Sock *sock, int sig)
- #endif
{
int ret_val;
ret_val = kill(sock->pid, sig);
--- 580,586 ----
*************** send_signal(Sock *sock, int sig)
*** 863,874 ****
}
int
- #ifdef _NO_PROTO
- sock_send_signal(purpose, sig)
- int purpose, sig;
- #else
sock_send_signal(int purpose,int sig)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_signal(purpose_table[purpose], sig);
--- 595,601 ----
*************** sock_send_signal(int purpose,int sig)
*** 876,898 ****
}
int
- #ifdef _NO_PROTO
- send_wakeup(sock)
- Sock *sock;
- #else
send_wakeup(Sock *sock)
- #endif
{
return send_signal(sock, SIGUSR1);
}
int
- #ifdef _NO_PROTO
- sock_send_wakeup(purpose)
- int purpose;
- #else
sock_send_wakeup(int purpose)
- #endif
{
if (accept_if_needed(purpose) != -1)
return send_wakeup(purpose_table[purpose]);
--- 603,615 ----
*************** sock_send_wakeup(int purpose)
*** 900,913 ****
}
Sock *
- #ifdef _NO_PROTO
- connect_to_local_server_new(server_name, purpose, time_out)
- char *server_name;
- int purpose;
- int time_out;
- #else
connect_to_local_server_new(char *server_name, int purpose, int time_out)
- #endif
{
int max_con=(time_out == 0 ? 1000000 : time_out), i, code=-1;
Sock *sock;
--- 617,623 ----
*************** connect_to_local_server_new(char *server
*** 953,966 ****
}
Sock *
- #ifdef _NO_PROTO
- connect_to_local_server(server_name, purpose, time_out)
- char *server_name;
- int purpose;
- int time_out;
- #else
connect_to_local_server(char *server_name, int purpose, int time_out)
- #endif
{
int max_con=(time_out == 0 ? 1000000 : time_out), i, code=-1;
Sock *sock;
--- 663,669 ----
*************** connect_to_local_server(char *server_nam
*** 1012,1023 ****
/* act as terminal session for sock connected to stdin and stdout of another
process */
void
- #ifdef _NO_PROTO
- remote_stdio(sock)
- Sock *sock;
- #else
remote_stdio(Sock *sock)
- #endif
{
char buf[1024];
fd_set rd;
--- 715,721 ----
*************** remote_stdio(Sock *sock)
*** 1057,1067 ****
/* initialize the table of dedicated sockets */
void
- #ifdef _NO_PROTO
- init_purpose_table()
- #else
init_purpose_table(void)
- #endif
{
int i;
for(i=0; i<TotalMaxPurposes; i++) {
--- 755,761 ----
*************** init_purpose_table(void)
*** 1071,1094 ****
int
! #ifdef _NO_PROTO
! make_server_number()
! #else
! make_server_number(void )
! #endif
{
spad_server_number = getpid();
return spad_server_number;
}
void
- #ifdef _NO_PROTO
- close_socket(socket_num, name)
- int socket_num;
- char *name;
- #else
close_socket(int socket_num, char *name)
- #endif
{
close(socket_num);
#ifndef RTplatform
--- 765,778 ----
int
! make_server_number(void)
{
spad_server_number = getpid();
return spad_server_number;
}
void
close_socket(int socket_num, char *name)
{
close(socket_num);
#ifndef RTplatform
*************** close_socket(int socket_num, char *name)
*** 1097,1108 ****
}
int
- #ifdef _NO_PROTO
- make_server_name(name, base)
- char *name, *base;
- #else
make_server_name(char *name,char * base)
- #endif
{
char *num;
if (spad_server_number != -1) {
--- 781,787 ----
*************** make_server_name(char *name,char * base)
*** 1123,1134 ****
/* client Spad server sockets. Two sockets are created: server[0]
is the internet server socket, and server[1] is a UNIX domain socket. */
int
- #ifdef _NO_PROTO
- open_server(server_name)
- char *server_name;
- #else
open_server(char *server_name)
- #endif
{
char *s, name[256];
--- 802,808 ----
*************** open_server(char *server_name)
*** 1192,1203 ****
}
int
- #ifdef _NO_PROTO
- accept_connection(sock)
- Sock *sock;
- #else
accept_connection(Sock *sock)
- #endif
{
int client;
for(client=0; client<MaxClients && clients[client].socket != 0; client++);
--- 866,872 ----
*************** accept_connection(Sock *sock)
*** 1218,1229 ****
/* reads a the socket purpose declaration for classification */
void
- #ifdef _NO_PROTO
- get_socket_type(sock)
- Sock *sock;
- #else
get_socket_type(Sock *sock)
- #endif
{
sock->pid = get_int(sock);
sock->purpose = get_int(sock);
--- 887,893 ----
*************** get_socket_type(Sock *sock)
*** 1245,1256 ****
}
int
- #ifdef _NO_PROTO
- sock_accept_connection(purpose)
- int purpose;
- #else
sock_accept_connection(int purpose)
- #endif
{
fd_set rd;
int ret_val, i, p;
--- 909,915 ----
*************** sock_accept_connection(int purpose)
*** 1273,1284 ****
/* direct stdin and stdout from the given socket */
void
- #ifdef _NO_PROTO
- redirect_stdio(sock)
- Sock *sock;
- #else
redirect_stdio(Sock *sock)
- #endif
{
int fd;
/* setbuf(stdout, NULL); */
--- 932,938 ----
*************** redirect_stdio(Sock *sock)
*** 1297,1307 ****
}
void
- #ifdef _NO_PROTO
- init_socks()
- #else
init_socks(void)
- #endif
{
int i;
FD_ZERO(&socket_mask);
--- 951,957 ----
*************** init_socks(void)
*** 1314,1324 ****
/* Socket I/O selection called from the BOOT serverLoop function */
int
- #ifdef _NO_PROTO
- server_switch()
- #else
server_switch(void)
- #endif
{
int ret_val, i, cmd = 0;
fd_set rd, wr, ex, fds_mask;
--- 964,970 ----
*************** server_switch(void)
*** 1364,1374 ****
}
void
- #ifdef _NO_PROTO
- flush_stdout()
- #else
flush_stdout(void)
- #endif
{
static FILE *fp = NULL;
if (fp == NULL) {
--- 1010,1016 ----
*************** flush_stdout(void)
*** 1382,1393 ****
}
void
- #ifdef _NO_PROTO
- print_line(s)
- char *s;
- #else
print_line(char *s)
- #endif
{
printf("%s\n", s);
}
--- 1024,1030 ----
*************** typedef union {
*** 1399,1409 ****
} DoubleFloat;
double
- #ifdef _NO_PROTO
- plus_infinity()
- #else
plus_infinity(void )
- #endif
{
static int init = 0;
static DoubleFloat pinf;
--- 1036,1042 ----
*************** plus_infinity(void )
*** 1416,1426 ****
}
double
- #ifdef _NO_PROTO
- minus_infinity()
- #else
minus_infinity(void)
- #endif
{
static int init = 0;
static DoubleFloat minf;
--- 1049,1055 ----
*************** minus_infinity(void)
*** 1433,1443 ****
}
double
- #ifdef _NO_PROTO
- NANQ()
- #else
NANQ(void)
- #endif
{
static int init = 0;
static DoubleFloat nanq;
--- 1062,1068 ----
*** src/lib/spadcolors.c.pamphlet (revision 15245)
--- src/lib/spadcolors.c.pamphlet (local)
*************** static unsigned long pixels[smoothCon
*** 77,90 ****
- #ifdef _NO_PROTO
- RGB
- HSVtoRGB(hsv)
- HSV hsv;
- #else
RGB
HSVtoRGB(HSV hsv)
- #endif
{
RGB rgb;
float h, f, p, q, t;
--- 77,84 ----
*************** HSVtoRGB(HSV hsv)
*** 143,156 ****
}
}
- #ifdef _NO_PROTO
- float
- value(n1, n2, hue)
- float n1, n2, hue;
- #else
float
value(float n1, float n2, float hue)
- #endif
{
float v;
--- 137,144 ----
*************** value(float n1, float n2, float hue)
*** 177,188 ****
RGB
- #ifdef _NO_PROTO
- HLStoRGB(hls)
- HLS hls;
- #else
HLStoRGB(HLS hls)
- #endif
{
RGB rgb;
float m1, m2;
--- 165,171 ----
*************** HLStoRGB(HLS hls)
*** 230,246 ****
******************************************************/
int
- #ifdef _NO_PROTO
- makeColors(dsply, scrn, colorMap, colorIndex, total_Shades)
- Display *dsply;
- int scrn;
- Colormap *colorMap;
- unsigned long **colorIndex;
- int *total_Shades;
- #else
makeColors(Display *dsply, int scrn, Colormap *colorMap,
unsigned long **colorIndex, int *total_Shades)
- #endif
{
int h, s;
--- 213,220 ----
*************** makeColors(Display *dsply, int scrn, Col
*** 356,369 ****
***********************************************************************/
int
- #ifdef _NO_PROTO
- makePermVector(dsply, scrn, permIndex)
- Display *dsply;
- int scrn;
- unsigned long **permIndex;
- #else
makePermVector(Display *dsply, int scrn, unsigned long **permIndex)
- #endif
{
static int firstTime = yes;
unsigned long *spadColorsToo;
--- 330,336 ----
*************** makePermVector(Display *dsply, int scrn,
*** 427,440 ****
int
- #ifdef _NO_PROTO
- makeNewColorMap(dsply, colorMap, smoothHue)
- Display *dsply;
- Colormap colorMap;
- int smoothHue;
- #else
makeNewColorMap(Display *dsply, Colormap colorMap, int smoothHue)
- #endif
{
--- 394,400 ----
*************** makeNewColorMap(Display *dsply, Colormap
*** 491,503 ****
******************************************************/
unsigned long
- #ifdef _NO_PROTO
- XPixelColor(num)
- int num;
- #else
XPixelColor(int num)
- #endif
-
{
if (num < 0)
num = 0;
--- 451,457 ----
*************** XPixelColor(int num)
*** 520,533 ****
void
- #ifdef _NO_PROTO
- FreePixels(dsply, colorMap, num)
- Display *dsply;
- Colormap colorMap;
- int num;
- #else
FreePixels(Display *dsply, Colormap colorMap, int num)
- #endif
{
XFreeColors(dsply, colorMap, pixels, num, 0);
--- 474,480 ----
*************** FreePixels(Display *dsply, Colormap colo
*** 557,570 ****
int
- #ifdef _NO_PROTO
- AllocCells(dsply, colorMap, smoothHue)
- Display *dsply;
- Colormap colorMap;
- int smoothHue;
- #else
AllocCells(Display *dsply, Colormap colorMap, int smoothHue)
- #endif
@
This routine used to have the following code block. However this
code block makes no sense. To see why you need to know that an
--- 504,510 ----
*** src/lib/util.c.pamphlet (revision 15245)
--- src/lib/util.c.pamphlet (local)
*************** of files are badly broken with respect t
*** 42,54 ****
int
- #ifdef _NO_PROTO
- checker(code, lineNumber, errorStr)
- int code, lineNumber;
- char *errorStr;
- #else
checker(int code, int lineNumber, char *errorStr)
- #endif
{
if (code < 0) {
fprintf(stderr, "Error occured during %s\n", errorStr);
--- 42,48 ----
*************** checker(int code, int lineNumber, char *
*** 63,76 ****
char *
- #ifdef _NO_PROTO
- getmemWithLine(nbytes, str, lineNum)
- char *str;
- int nbytes;
- int lineNum;
- #else
getmemWithLine(int nbytes, char *str, int lineNum)
- #endif
{
char *p;
--- 57,63 ----
*************** getmemWithLine(int nbytes, char *str, in
*** 84,98 ****
char *
- #ifdef _NO_PROTO
- saymemWithLine(str, num, size, lineNum)
- char *str;
- int num, size;
- int lineNum;
- #else
saymemWithLine(char *str, int num, int size, int lineNum)
- #endif
-
{
char *p;
--- 71,77 ----
*************** myfree(void *p, int size)
*** 118,130 ****
XPoint
- #ifdef _NO_PROTO
- getWindowPositionXY(display, w)
- Display *display;
- Window w;
- #else
getWindowPositionXY(Display *display, Window w)
- #endif
{
XPoint position;
Window rootW, parentW, *childrenWs, tmpW;
--- 97,103 ----
*************** getWindowPositionXY(Display *display, Wi
*** 152,164 ****
XPoint
- #ifdef _NO_PROTO
- getWindowSizeXY(display, w)
- Display *display;
- Window w;
- #else
getWindowSizeXY(Display *display,Window w)
- #endif
{
XPoint size;
Window rootW, parentW, *childrenWs, tmpW;
--- 125,131 ----
*** src/lib/wct.c.pamphlet (revision 15245)
--- src/lib/wct.c.pamphlet (local)
*************** static char curr_prefix[MAX_PREFIX];
*** 72,83 ****
static Wct *pHeadwct;
time_t
- #ifdef _NO_PROTO
- ftime(path)
- char *path;
- #else
ftime(char *path)
- #endif
{
int rc;
struct stat stbuf;
--- 72,78 ----
*************** ftime(char *path)
*** 90,101 ****
}
off_t
- #ifdef _NO_PROTO
- fsize(path)
- char *path;
- #else
fsize(char *path)
- #endif
{
int rc;
struct stat stbuf;
--- 85,91 ----
*************** fsize(char *path)
*** 114,126 ****
Wix *
- #ifdef _NO_PROTO
- scanWct(pwct, prefix)
- Wct *pwct;
- char *prefix;
- #else
scanWct(Wct *pwct, char *prefix)
- #endif
{
long fmod;
int preflen, i, wc;
--- 104,110 ----
*************** scanWct(Wct *pwct, char *prefix)
*** 154,164 ****
}
Wix *
- #ifdef _NO_PROTO
- rescanWct()
- #else
rescanWct(void)
- #endif
{
Wct *pwct, *start_pwct;
int preflen, start_word, i, wc;
--- 138,144 ----
*************** rescanWct(void)
*** 236,247 ****
* Summarize a table.
*/
void
- #ifdef _NO_PROTO
- skimWct(pwct)
- Wct *pwct;
- #else
skimWct(Wct *pwct)
- #endif
{
while (pwct) {
#ifdef PINFO
--- 216,222 ----
*************** skimWct(Wct *pwct)
*** 252,263 ****
}
void
- #ifdef _NO_PROTO
- skim1Wct(pwct)
- Wct *pwct;
- #else
skim1Wct(Wct *pwct)
- #endif
{
#define NHEAD 13
#define NTAIL 7
--- 227,233 ----
*************** skim1Wct(Wct *pwct)
*** 284,295 ****
}
void
- #ifdef _NO_PROTO
- printTime(clock)
- long *clock;
- #else
printTime(long *clock)
- #endif
{
struct tm *tm;
--- 254,260 ----
*************** printTime(long *clock)
*** 300,312 ****
}
int
- #ifdef _NO_PROTO
- skimString(s, slen, nhead, ntail)
- char *s;
- int slen, nhead, ntail;
- #else
skimString(char *s, int slen,int nhead,int ntail)
- #endif
{
int spos, tlen, i, cc;
--- 265,271 ----
*************** skimString(char *s, int slen,int nhead,
*** 330,341 ****
}
int
- #ifdef _NO_PROTO
- prChar(c)
- int c;
- #else
prChar(int c)
- #endif
{
if (c == '\n')
return printf("\\n");
--- 289,295 ----
*************** prChar(int c)
*** 354,365 ****
}
Wct *
- #ifdef _NO_PROTO
- reread1Wct(pwct)
- Wct *pwct;
- #else
reread1Wct(Wct *pwct)
- #endif
{
int fd, rc;
--- 308,314 ----
*************** reread1Wct(Wct *pwct)
*** 387,398 ****
}
Wct *
- #ifdef _NO_PROTO
- read1Wct(fname)
- char *fname;
- #else
read1Wct(char *fname)
- #endif
{
Wct *pwct;
--- 336,342 ----
*************** read1Wct(char *fname)
*** 411,422 ****
}
Wct *
- #ifdef _NO_PROTO
- nconcWct(pwct, qwct)
- Wct *pwct, *qwct;
- #else
nconcWct(Wct *pwct,Wct * qwct)
- #endif
{
Wct *p0 = pwct;
--- 355,361 ----
*************** nconcWct(Wct *pwct,Wct * qwct)
*** 431,442 ****
}
void
- #ifdef _NO_PROTO
- sortWct(pwct)
- Wct *pwct;
- #else
sortWct(Wct *pwct)
- #endif
{
while (pwct) {
sort1Wct(pwct);
--- 370,376 ----
*************** sortWct(Wct *pwct)
*** 445,468 ****
}
void
- #ifdef _NO_PROTO
- sort1Wct(pwct)
- Wct *pwct;
- #else
sort1Wct(Wct *pwct)
- #endif
{
qsort((char *) pwct->wordv, pwct->wordc,
sizeof(*(pwct->wordv)), mystrcmp);
}
int
- #ifdef _NO_PROTO
- mystrcmp(s1, s2)
- const void *s1, *s2;
- #else
mystrcmp(const void *s1,const void * s2)
- #endif
{
return strcmp(*(char **)s1, *(char **)s2);
}
--- 379,392 ----
*************** mystrcmp(const void *s1,const void * s2)
*** 472,483 ****
*/
void
- #ifdef _NO_PROTO
- burstWct(pwct)
- Wct *pwct;
- #else
burstWct(Wct *pwct)
- #endif
{
while (pwct) {
burst1Wct(pwct);
--- 396,402 ----
*************** burstWct(Wct *pwct)
*** 486,497 ****
}
void
- #ifdef _NO_PROTO
- burst1Wct(pwct)
- Wct *pwct;
- #else
burst1Wct(Wct *pwct)
- #endif
{
char *s, **wv;
int i, j, inword = 0;
--- 405,411 ----
*************** burst1Wct(Wct *pwct)
*** 527,538 ****
}
Wct *
- #ifdef _NO_PROTO
- intern1Wct(fname)
- char *fname;
- #else
intern1Wct(char *fname)
- #endif
{
Wct *pwct;
--- 441,447 ----
*************** intern1Wct(char *fname)
*** 542,577 ****
}
void
- #ifdef _NO_PROTO
- reintern1Wct(pwct)
- Wct *pwct;
- #else
reintern1Wct(Wct *pwct)
- #endif
{
reread1Wct(pwct);
burst1Wct(pwct);
}
void
- #ifdef _NO_PROTO
- sfatal(s)
- char *s;
- #else
sfatal(char *s)
- #endif
{
fatal("%s", s);
}
void
- #ifdef _NO_PROTO
- fatal(fmt, s)
- char *fmt;
- char *s;
- #else
fatal(char *fmt,char * s)
- #endif
{
static char fbuf[256];
--- 451,470 ----
*************** fatal(char *fmt,char * s)
*** 585,606 ****
/* load up the wct database */
void
- #ifdef _NO_PROTO
- load_wct_file(fname)
- char *fname;
- #else
load_wct_file(char *fname)
- #endif
{
pwct = nconcWct(intern1Wct(fname), pwct);
}
void
- #ifdef _NO_PROTO
- skim_wct()
- #else
skim_wct(void)
- #endif
{
skimWct(pwct);
}
--- 478,490 ----
*************** skim_wct(void)
*** 613,623 ****
void
- #ifdef _NO_PROTO
- rescan_wct()
- #else
rescan_wct(void)
- #endif
{
int b = curr_pntr - 1;
int old_len;
--- 497,503 ----
*************** rescan_wct(void)
*** 745,755 ****
}
void
- #ifdef _NO_PROTO
- find_wct()
- #else
find_wct(void)
- #endif
{
char search_buff[100];
--- 625,631 ----
- [Axiom-developer] [build-improvements] Remove K&R cruft from src/lib,
Gabriel Dos Reis <=