Assume __STDC__, remove non-__STDC__ code.

This commit is contained in:
alfred 2002-05-28 19:23:47 +00:00
parent a7dd0de84a
commit 197cf7d2ba
6 changed files with 3 additions and 112 deletions

View File

@ -540,14 +540,6 @@ char *more_above_str, *more_below_str;
char *chinese_cmd, *nochinese_cmd;
#ifndef __STDC__
#ifndef HAS_STDLIB
extern char *malloc();
extern char *realloc();
extern char *getenv();
FILE *fopen(); /* declaration for open function */
#endif /* HAS_STDLIB */
#endif /* __STDC__ */
int
main(argc, argv) /* beginning of main program */

View File

@ -73,11 +73,7 @@ statis const char rcsid[] =
#include <stdlib.h>
#endif
#if defined(__STDC__)
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#ifdef HAS_UNISTD
#include <unistd.h>
@ -663,30 +659,13 @@ static char nc_scrolling_ability = FALSE;
#ifdef CAP
#if __STDC__ || defined(__cplusplus)
#define P_(s) s
#else
#define P_(s) ()
#endif /* __STDC__ */
int tc_Get_int P_((int));
void CAP_PARSE P_((void));
void Find_term P_((void));
#undef P_
int tc_Get_int(int);
void CAP_PARSE(void);
void Find_term(void);
#endif /* CAP */
#ifndef __STDC__
#ifndef HAS_STDLIB
extern char *fgets();
extern char *malloc();
extern char *getenv();
FILE *fopen(); /* declaration for open function */
#endif /* HAS_STDLIB */
#endif /* __STDC__ */
#ifdef SIGWINCH
/*
@ -2828,33 +2807,15 @@ WINDOW *window;
}
}
#ifndef __STDC__
void
wprintw(va_alist)
va_dcl
#else /* __STDC__ */
void
wprintw(WINDOW *window, const char *format, ...)
#endif /* __STDC__ */
{
#ifndef __STDC__
WINDOW *window;
char *format;
va_list ap;
#else
va_list ap;
#endif
int value;
char *fpoint;
char *wtemp;
#ifndef __STDC__
va_start(ap);
window = va_arg(ap, WINDOW *);
format = va_arg(ap, char *);
#else /* __STDC__ */
va_start(ap, format);
#endif /* __STDC__ */
fpoint = (char *) format;
while (*fpoint != (char) NULL)
@ -2899,9 +2860,7 @@ wprintw(WINDOW *window, const char *format, ...)
else
waddch(window, *fpoint++);
}
#ifdef __STDC__
va_end(ap);
#endif /* __STDC__ */
}
void

View File

@ -534,28 +534,13 @@ trstat_write(struct printer *pp, tr_sendrecv sendrecv, size_t bytecnt,
#undef UPD_EOSTAT
}
#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
void
#ifdef __STDC__
fatal(const struct printer *pp, const char *msg, ...)
#else
fatal(pp, msg, va_alist)
const struct printer *pp;
char *msg;
va_dcl
#endif
{
va_list ap;
#ifdef __STDC__
va_start(ap, msg);
#else
va_start(ap);
#endif
/* this error message is being sent to the 'from_host' */
if (from_host != local_host)
(void)printf("%s: ", local_host);

View File

@ -1846,30 +1846,15 @@ setty(const struct printer *pp)
}
}
#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
static void
#ifdef __STDC__
pstatus(const struct printer *pp, const char *msg, ...)
#else
pstatus(pp, msg, va_alist)
const struct printer *pp;
char *msg;
va_dcl
#endif
{
int fd;
char *buf;
va_list ap;
#ifdef __STDC__
va_start(ap, msg);
#else
va_start(ap);
#endif
umask(0);
fd = open(pp->status_file, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE);

View File

@ -372,27 +372,13 @@ rcleanup(int signo __unused)
dfname[0] = '\0';
}
#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
static void
#ifdef __STDC__
frecverr(const char *msg, ...)
#else
frecverr(msg, va_alist)
char *msg;
va_dcl
#endif
{
va_list ap;
#ifdef __STDC__
va_start(ap, msg);
#else
va_start(ap);
#endif
syslog(LOG_ERR, "Error receiving job from %s:", from_host);
vsyslog(LOG_ERR, msg, ap);
va_end(ap);

View File

@ -406,30 +406,14 @@ dsort(a, b)
return (strcmp((*a)->fts_name, (*b)->fts_name));
}
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
void
#if __STDC__
output(int indent, int *offset, const char *fmt, ...)
#else
output(indent, offset, fmt, va_alist)
int indent;
int *offset;
char *fmt;
va_dcl
#endif
{
va_list ap;
char buf[1024];
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
(void)vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);