Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.

This commit is contained in:
Tim Peters 2000-07-09 03:09:57 +00:00
parent 4be47c0f76
commit dbd9ba6a6c
53 changed files with 295 additions and 303 deletions

View file

@ -26,8 +26,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#include "parser.h"
/* Forward references */
static void fixdfa Py_PROTO((grammar *, dfa *));
static void fixstate Py_PROTO((grammar *, state *));
static void fixdfa(grammar *, dfa *);
static void fixstate(grammar *, state *);
void
PyGrammar_AddAccelerators(g)

View file

@ -17,7 +17,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
extern int Py_DebugFlag;
/* Forward */
static void calcfirstset Py_PROTO((grammar *, dfa *));
static void calcfirstset(grammar *, dfa *);
void
addfirstsets(g)

View file

@ -142,7 +142,7 @@ findlabel(ll, type, str)
}
/* Forward */
static void translabel Py_PROTO((grammar *, label *));
static void translabel(grammar *, label *);
void
translatelabels(g)

View file

@ -22,7 +22,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#include "intrcheck.h"
/* Copied here from ceval.h -- can't include that file. */
int Py_AddPendingCall Py_PROTO((int (*func) Py_PROTO((ANY *)), ANY *arg));
int Py_AddPendingCall(int (*func)(ANY *), ANY *arg);
#ifdef QUICKWIN
@ -152,7 +152,7 @@ intcatcher(sig)
int sig; /* Not used by required by interface */
#endif /* _M_IX86 */
{
extern void Py_Exit Py_PROTO((int));
extern void Py_Exit(int);
static char message[] =
"python: to interrupt a truly hanging Python program, interrupt once more.\n";
switch (interrupted++) {

View file

@ -15,8 +15,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#include "node.h"
/* Forward */
static void list1node Py_PROTO((FILE *, node *));
static void listnode Py_PROTO((FILE *, node *));
static void list1node(FILE *, node *);
static void listnode(FILE *, node *);
void
PyNode_ListTree(n)

View file

@ -118,7 +118,7 @@ PyOS_StdioReadline(prompt)
Note: Python expects in return a buffer allocated with PyMem_Malloc. */
char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *));
char *(*PyOS_ReadlineFunctionPointer)(char *);
/* Interface used by tokenizer.c and bltinmodule.c */

View file

@ -64,7 +64,7 @@ PyNode_AddChild(n1, type, str, lineno)
}
/* Forward */
static void freechildren Py_PROTO((node *));
static void freechildren(node *);
void

View file

@ -33,7 +33,7 @@ extern int Py_DebugFlag;
/* STACK DATA TYPE */
static void s_reset Py_PROTO((stack *));
static void s_reset(stack *);
static void
s_reset(s)
@ -44,7 +44,7 @@ s_reset(s)
#define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK])
static int s_push Py_PROTO((stack *, dfa *, node *));
static int s_push(stack *, dfa *, node *);
static int
s_push(s, d, parent)
@ -66,7 +66,7 @@ s_push(s, d, parent)
#ifdef Py_DEBUG
static void s_pop Py_PROTO((stack *));
static void s_pop(stack *);
static void
s_pop(s)
@ -122,7 +122,7 @@ PyParser_Delete(ps)
/* PARSER STACK OPERATIONS */
static int shift Py_PROTO((stack *, int, char *, int, int));
static int shift(stack *, int, char *, int, int);
static int
shift(s, type, str, newstate, lineno)
@ -141,7 +141,7 @@ shift(s, type, str, newstate, lineno)
return 0;
}
static int push Py_PROTO((stack *, int, dfa *, int, int));
static int push(stack *, int, dfa *, int, int);
static int
push(s, type, d, newstate, lineno)
@ -165,7 +165,7 @@ push(s, type, d, newstate, lineno)
/* PARSER PROPER */
static int classify Py_PROTO((grammar *, int, char *));
static int classify(grammar *, int, char *);
static int
classify(g, type, str)

View file

@ -36,11 +36,10 @@ typedef struct {
node *p_tree; /* Top of parse tree */
} parser_state;
parser_state *PyParser_New Py_PROTO((grammar *g, int start));
void PyParser_Delete Py_PROTO((parser_state *ps));
int PyParser_AddToken
Py_PROTO((parser_state *ps, int type, char *str, int lineno));
void PyGrammar_AddAccelerators Py_PROTO((grammar *g));
parser_state *PyParser_New(grammar *g, int start);
void PyParser_Delete(parser_state *ps);
int PyParser_AddToken(parser_state *ps, int type, char *str, int lineno);
void PyGrammar_AddAccelerators(grammar *g);
#ifdef __cplusplus
}

View file

@ -22,8 +22,7 @@ int Py_TabcheckFlag;
/* Forward */
static node *parsetok Py_PROTO((struct tok_state *, grammar *, int,
perrdetail *));
static node *parsetok(struct tok_state *, grammar *, int, perrdetail *);
/* Parse input coming from a string. Return error code, print some errors. */

View file

@ -45,14 +45,14 @@ typedef struct _nfa {
} nfa;
/* Forward */
static void compile_rhs Py_PROTO((labellist *ll,
nfa *nf, node *n, int *pa, int *pb));
static void compile_alt Py_PROTO((labellist *ll,
nfa *nf, node *n, int *pa, int *pb));
static void compile_item Py_PROTO((labellist *ll,
nfa *nf, node *n, int *pa, int *pb));
static void compile_atom Py_PROTO((labellist *ll,
nfa *nf, node *n, int *pa, int *pb));
static void compile_rhs(labellist *ll,
nfa *nf, node *n, int *pa, int *pb);
static void compile_alt(labellist *ll,
nfa *nf, node *n, int *pa, int *pb);
static void compile_item(labellist *ll,
nfa *nf, node *n, int *pa, int *pb);
static void compile_atom(labellist *ll,
nfa *nf, node *n, int *pa, int *pb);
static int
addnfastate(nf)
@ -111,7 +111,7 @@ typedef struct _nfagrammar {
} nfagrammar;
/* Forward */
static void compile_rule Py_PROTO((nfagrammar *gr, node *n));
static void compile_rule(nfagrammar *gr, node *n);
static nfagrammar *
newnfagrammar()
@ -420,10 +420,10 @@ typedef struct _ss_dfa {
} ss_dfa;
/* Forward */
static void printssdfa Py_PROTO((int xx_nstates, ss_state *xx_state, int nbits,
labellist *ll, char *msg));
static void simplify Py_PROTO((int xx_nstates, ss_state *xx_state));
static void convert Py_PROTO((dfa *d, int xx_nstates, ss_state *xx_state));
static void printssdfa(int xx_nstates, ss_state *xx_state, int nbits,
labellist *ll, char *msg);
static void simplify(int xx_nstates, ss_state *xx_state);
static void convert(dfa *d, int xx_nstates, ss_state *xx_state);
static void
makedfa(gr, nf, d)

View file

@ -16,10 +16,10 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* Parser generator interface */
extern grammar *meta_grammar Py_PROTO((void));
extern grammar *meta_grammar(void);
struct _node;
extern grammar *pgen Py_PROTO((struct _node *));
extern grammar *pgen(struct _node *);
#ifdef __cplusplus
}

View file

@ -32,10 +32,10 @@ int Py_DebugFlag;
int Py_VerboseFlag;
/* Forward */
grammar *getgrammar Py_PROTO((char *filename));
grammar *getgrammar(char *filename);
#ifdef THINK_C
int main Py_PROTO((int, char **));
char *askfile Py_PROTO((void));
int main(int, char **);
char *askfile(void);
#endif
void

View file

@ -14,10 +14,10 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#include "grammar.h"
/* Forward */
static void printarcs Py_PROTO((int, dfa *, FILE *));
static void printstates Py_PROTO((grammar *, FILE *));
static void printdfas Py_PROTO((grammar *, FILE *));
static void printlabels Py_PROTO((grammar *, FILE *));
static void printarcs(int, dfa *, FILE *);
static void printstates(grammar *, FILE *);
static void printdfas(grammar *, FILE *);
static void printlabels(grammar *, FILE *);
void
printgrammar(g, fp)

View file

@ -17,7 +17,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#include "tokenizer.h"
#include "errcode.h"
extern char *PyOS_Readline Py_PROTO((char *));
extern char *PyOS_Readline(char *);
/* Return malloc'ed string including trailing \n;
empty malloc'ed string for EOF;
NULL if interrupted */
@ -34,9 +34,9 @@ extern char *PyOS_Readline Py_PROTO((char *));
#endif
/* Forward */
static struct tok_state *tok_new Py_PROTO((void));
static int tok_nextc Py_PROTO((struct tok_state *tok));
static void tok_backup Py_PROTO((struct tok_state *tok, int c));
static struct tok_state *tok_new(void);
static int tok_nextc(struct tok_state *tok);
static void tok_backup(struct tok_state *tok, int c);
/* Token names */

View file

@ -49,11 +49,10 @@ struct tok_state {
int altindstack[MAXINDENT]; /* Stack of alternate indents */
};
extern struct tok_state *PyTokenizer_FromString Py_PROTO((char *));
extern struct tok_state *PyTokenizer_FromFile
Py_PROTO((FILE *, char *, char *));
extern void PyTokenizer_Free Py_PROTO((struct tok_state *));
extern int PyTokenizer_Get Py_PROTO((struct tok_state *, char **, char **));
extern struct tok_state *PyTokenizer_FromString(char *);
extern struct tok_state *PyTokenizer_FromFile(FILE *, char *, char *);
extern void PyTokenizer_Free(struct tok_state *);
extern int PyTokenizer_Get(struct tok_state *, char **, char **);
#ifdef __cplusplus
}