static void gen_substrings P((char *, char *, int, int));
static char * insert_substrings P((char *, struct arg_store *, int));
-int
-gettok()
+int gettok(void)
{
int ch;
}
}
-static int
-gettok_nosub()
+static int gettok_nosub(void)
{ int rv; dont_subst++; rv=get_onetok(SKIP_SPACE); dont_subst--; return rv; }
static int
-get_onetok(keep)
-int keep;
+get_onetok(int keep)
{
char * p;
int state;
return ch;
}
-static int
-pgetc()
+static int pgetc(void)
{
int ch, ch1;
}
/* This function handles the first and second translation phases of Ansi-C */
-static int
-chget()
+static int chget(void)
{
int ch, ch1;
for(;;) {
}
}
-static void
-unchget(ch)
+static void unchget(int ch)
{
#if CPP_DEBUG
fprintf(stderr, "\b", ch);
if( ch == '\n' ) c_lineno--;
}
-static int
-chget_raw()
+static int chget_raw(void)
#if CPP_DEBUG
{
int ch;
return ch;
}
-static int
-realchget()
+static int realchget(void)
#endif
{
int ch;
}
}
-static int
-do_preproc()
+static int do_preproc(void)
{
int val, no_match=0;
return 0;
}
-static int
-do_proc_copy_hashline()
+static int do_proc_copy_hashline(void)
{
int off, ch;
return TK_COPY;
}
-static void
-do_proc_include()
+static void do_proc_include(void)
{
int ch, ch1;
char * p;
return;
}
-static void
-do_proc_define()
+static void do_proc_define(void)
{
int ch, ch1;
struct define_item * ptr, * old_value = 0;
while(ch != '\n') ch = pgetc();
}
-static void
-do_proc_undef()
+static void do_proc_undef(void)
{
int ch;
struct define_item * ptr;
}
}
-static int
-do_proc_if(type)
-int type;
+static int do_proc_if(int type)
{
int ch = 0;
if(if_false && if_hidden)
return 0;
}
-static void
-do_proc_else()
+static void do_proc_else(void)
{
if( if_hidden == 0 )
{
do_proc_tail();
}
-static void
-do_proc_endif()
+static void do_proc_endif(void)
{
if( if_hidden )
if_hidden--;
do_proc_tail();
}
-static void
-do_proc_tail()
+static void do_proc_tail(void)
{
int ch, flg=1;
while((ch = pgetc()) != '\n') if(ch > ' ')
}
}
-static int
-get_if_expression()
+static int get_if_expression(void)
{
int value = get_expression(0);
return value;
}
-static int_type
-get_expression(prio)
-int prio;
+static int_type get_expression(int prio)
{
int_type lvalue;
int_type rvalue;
return lvalue;
}
-static int_type
-get_exp_value()
+static int_type get_exp_value(void)
{
int_type value = 0;
int sign = 1;
return sign<0 ? -value: value;
}
-void
-gen_substrings(macname, data_str, arg_count, is_vararg)
-char * macname;
-char * data_str;
-int arg_count;
-int is_vararg;
+void gen_substrings(char *macname, char *data_str, int arg_count, int is_vararg)
{
char * mac_text = 0;
struct arg_store *arg_list;
#endif
}
-static char *
-insert_substrings(data_str, arg_list, arg_count)
-char * data_str;
-struct arg_store *arg_list;
-int arg_count;
+static char *insert_substrings(char *data_str, struct arg_store *arg_list, int arg_count)
{
int ac, ch;
char * p, * s;
int hashcount = 0;
static int hashvalue P((int namespace, char * word));
-void *
-read_entry(namespace, word)
-int namespace;
-char * word;
+void *read_entry(int namespace, char *word)
{
int hash_val;
struct hashentry * hashline;
return 0;
}
-char *
-set_entry(namespace, word, value)
-int namespace;
-char * word;
-void * value;
+char *set_entry(int namespace, char *word, void *value)
{
int hash_val, i;
struct hashentry * hashline, *prev;
return hashline->word;
}
-static int hashvalue(namespace, word)
-int namespace;
-char * word;
+static int hashvalue(int namespace, char *word)
{
int val = namespace;
char *p = word;
char * outfile = 0;
FILE * ofd = 0;
-int
-main(argc, argv)
-int argc;
-char ** argv;
+int main(int argc, char *argv[])
{
int ar, i;
char * p;
if (!curfile)
cfatal(Usage);
+#if 0
/* Define date and time macros. */
if (dialect != DI_KNR) {
time_t now;
sprintf(buf, "__DATE__=\"%.3s %.2s %.4s\"", timep + 4, timep + 8, timep + 20);
define_macro(buf);
}
+#endif
if (outfile) ofd = fopen(outfile, "w");
else ofd = stdout;
exit(exit_code);
}
-void
-undefine_macro(name)
-char * name;
+void undefine_macro(char * name)
{
struct define_item * ptr;
}
}
-void
-define_macro(name)
-char * name;
+void define_macro(char *name)
{
char * p;
char * value;
ptr->next = 0;
}
-FILE *
-open_include(fname, mode, checkrel)
-char * fname;
-char * mode;
-int checkrel;
+FILE *open_include(char *fname, char *mode, int checkrel)
{
FILE * fd = 0;
int i;
static int outpos = 0;
-void
-cmsg(mtype, str)
-char * mtype;
-char * str;
+void cmsg(char *mtype, char *str)
{
if (c_fname && (*c_fname || c_lineno))
fprintf(stderr, "%s:%d: ", c_fname, c_lineno);
fprintf(stderr, "%s\n", str);
}
-void
-cfatal(str)
-char * str;
+void cfatal(char *str)
{
cmsg("CPP-FATAL error", str);
exit(255);
}
-void
-cerror(str)
-char * str;
+void cerror(char * str)
{
exit_code = 1;
cmsg("error", str);
}
-void
-cwarn(str)
-char * str;
+void cwarn(char * str)
{
cmsg("warning", str);
}
-void
-pr_indent(count)
-int count;
+void pr_indent(int count)
{
if(count>10) count=10;
while(count>0) {fprintf(ofd, "\t"); count--; }
}
-void
-hash_line()
+void hash_line(void)
{
if( strcmp(last_name, c_fname) != 0 ) last_line = -1;
if( c_lineno != last_line || last_line <= 0 )
}
}
-void
-print_toks_cpp()
+void print_toks_cpp(void)
{
int i;
int indent=0;
outpos = 0;
}
-void
-print_toks_raw()
+void print_toks_raw(void)
{
int i;
long val;
}
}
-char *
-token_txn(token)
-int token;
+char *token_txn(int token)
{
char * s = "UNKNOWN";
static char buf[17];
__inline
#endif
static unsigned int
-hash1 (str, len)
- register const char *str;
- register unsigned int len;
+hash1 (const char *str, unsigned int len)
{
static unsigned char asso_values[] =
{
__inline
#endif
struct token_trans *
-is_ctok (str, len)
- register const char *str;
- register unsigned int len;
+is_ctok (const char *str, unsigned int len)
{
static struct token_trans wordlist[] =
{
__inline
#endif
static unsigned int
-hash2 (str, len)
- register const char *str;
- register unsigned int len;
+hash2 (const char *str, unsigned int len)
{
static unsigned char asso_values[] =
{
__inline
#endif
struct token_trans *
-is_ckey (str, len)
- register const char *str;
- register unsigned int len;
+is_ckey (const char *str, unsigned int len)
{
static struct token_trans wordlist[] =
{