diff options
author | Jim Blandy <jimb@red-bean.com> | 1996-10-14 01:33:50 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1996-10-14 01:33:50 +0000 |
commit | 1cc91f1b2937a230a2dc80dd25cc6003b7b8f2b5 (patch) | |
tree | 64ddce6a971f0e0ca6ddd41d9ac0f5b999122484 /libguile/gscm.c | |
parent | 1717856b4e8072b5aebab2324fcfba55bc504369 (diff) | |
download | guile-1cc91f1b2937a230a2dc80dd25cc6003b7b8f2b5.tar.gz |
* __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
chars.c, chars.h, continuations.c, continuations.h, debug.c,
debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
declare functions with prototypes. (Patch thanks to Marius
Vollmer.)
Diffstat (limited to 'libguile/gscm.c')
-rw-r--r-- | libguile/gscm.c | 136 |
1 files changed, 36 insertions, 100 deletions
diff --git a/libguile/gscm.c b/libguile/gscm.c index 994f10219..daf172730 100644 --- a/libguile/gscm.c +++ b/libguile/gscm.c @@ -71,15 +71,13 @@ extern char *getenv (); /* {Printing Objects to Strings} */ -#ifdef __STDC__ -static GSCM_status -gscm_portprint_obj (SCM port, SCM obj) -#else + +static GSCM_status gscm_portprint_obj SCM_P ((SCM port, SCM obj)); + static GSCM_status gscm_portprint_obj (port, obj) SCM port; SCM obj; -#endif { scm_prin1 (obj, port, 1); return GSCM_OK; @@ -94,14 +92,12 @@ struct seval_str_frame char * str; }; -#ifdef __STDC__ -static void -_seval_str_fn (void * vframe) -#else + +static void _seval_str_fn SCM_P ((void * vframe)); + static void _seval_str_fn (vframe) void * vframe; -#endif { struct seval_str_frame * frame; frame = (struct seval_str_frame *)vframe; @@ -110,15 +106,13 @@ _seval_str_fn (vframe) -#ifdef __STDC__ -static GSCM_status -gscm_strprint_obj (SCM * answer, SCM obj) -#else + +static GSCM_status gscm_strprint_obj SCM_P ((SCM * answer, SCM obj)); + static GSCM_status gscm_strprint_obj (answer, obj) SCM * answer; SCM obj; -#endif { SCM str; SCM port; @@ -133,15 +127,13 @@ gscm_strprint_obj (answer, obj) return stat; } -#ifdef __STDC__ -static GSCM_status -gscm_cstr (char ** answer, SCM obj) -#else + +static GSCM_status gscm_cstr SCM_P ((char ** answer, SCM obj)); + static GSCM_status gscm_cstr (answer, obj) char ** answer; SCM obj; -#endif { GSCM_status stat; @@ -158,14 +150,12 @@ gscm_cstr (answer, obj) /* {Invoking The Interpreter} */ -#ifdef __STDC__ -static SCM -gscm_silent_repl (SCM env) -#else + +static SCM gscm_silent_repl SCM_P ((SCM env)); + static SCM gscm_silent_repl (env) SCM env; -#endif { SCM source; SCM answer; @@ -182,17 +172,15 @@ typedef int setjmp_type; typedef long setjmp_type; #endif -#ifdef __STDC__ -static GSCM_status -_eval_port (SCM * answer, GSCM_top_level toplvl, SCM port, int printp) -#else + +static GSCM_status _eval_port SCM_P ((SCM * answer, GSCM_top_level toplvl, SCM port, int printp)); + static GSCM_status _eval_port (answer, toplvl, port, printp) SCM * answer; GSCM_top_level toplvl; SCM port; int printp; -#endif { SCM saved_inp; GSCM_status status; @@ -259,16 +247,14 @@ _eval_port (answer, toplvl, port, printp) return status; } -#ifdef __STDC__ -static GSCM_status -seval_str (SCM *answer, GSCM_top_level toplvl, char * str) -#else + +static GSCM_status seval_str SCM_P ((SCM *answer, GSCM_top_level toplvl, char * str)); + static GSCM_status seval_str (answer, toplvl, str) SCM *answer; GSCM_top_level toplvl; char * str; -#endif { SCM scheme_str; SCM port; @@ -281,16 +267,12 @@ seval_str (answer, toplvl, str) } -#ifdef __STDC__ -GSCM_status -gscm_seval_str (SCM *answer, GSCM_top_level toplvl, char * str) -#else + GSCM_status gscm_seval_str (answer, toplvl, str) SCM *answer; GSCM_top_level toplvl; char * str; -#endif { SCM_STACKITEM i; GSCM_status status; @@ -300,15 +282,11 @@ gscm_seval_str (answer, toplvl, str) return status; } -#ifdef __STDC__ -void -format_load_command (char * buf, char *file_name) -#else + void format_load_command (buf, file_name) char * buf; char *file_name; -#endif { char quoted_name[MAXPATHLEN + 1]; int source; @@ -324,16 +302,12 @@ format_load_command (buf, file_name) sprintf (buf, "(%%try-load \"%s\")", quoted_name); } -#ifdef __STDC__ -GSCM_status -gscm_seval_file (SCM *answer, GSCM_top_level toplvl, char * file_name) -#else + GSCM_status gscm_seval_file (answer, toplvl, file_name) SCM *answer; GSCM_top_level toplvl; char * file_name; -#endif { char command[MAXPATHLEN * 3]; format_load_command (command, file_name); @@ -341,16 +315,14 @@ gscm_seval_file (answer, toplvl, file_name) } -#ifdef __STDC__ -static GSCM_status -eval_str (char ** answer, GSCM_top_level toplvl, char * str) -#else + +static GSCM_status eval_str SCM_P ((char ** answer, GSCM_top_level toplvl, char * str)); + static GSCM_status eval_str (answer, toplvl, str) char ** answer; GSCM_top_level toplvl; char * str; -#endif { SCM sanswer; SCM scheme_str; @@ -371,16 +343,12 @@ eval_str (answer, toplvl, str) } -#ifdef __STDC__ -GSCM_status -gscm_eval_str (char ** answer, GSCM_top_level toplvl, char * str) -#else + GSCM_status gscm_eval_str (answer, toplvl, str) char ** answer; GSCM_top_level toplvl; char * str; -#endif { SCM_STACKITEM i; GSCM_status status; @@ -391,16 +359,12 @@ gscm_eval_str (answer, toplvl, str) } -#ifdef __STDC__ -GSCM_status -gscm_eval_file (char ** answer, GSCM_top_level toplvl, char * file_name) -#else + GSCM_status gscm_eval_file (answer, toplvl, file_name) char ** answer; GSCM_top_level toplvl; char * file_name; -#endif { char command[MAXPATHLEN * 3]; format_load_command (command, file_name); @@ -430,14 +394,10 @@ static char * gscm_error_msgs[] = AT(GSCM_ERROR_OPENING_INIT_FILE) "Error opening init file." }; -#ifdef __STDC__ -char * -gscm_error_msg (int n) -#else + char * gscm_error_msg (n) int n; -#endif { if ((n < 0) || (n > (sizeof (gscm_error_msgs) / sizeof (char *)))) return "Unrecognized error."; @@ -450,10 +410,7 @@ gscm_error_msg (n) /* {Defining New Procedures} */ -#ifdef __STDC__ -SCM -gscm_make_subr (SCM (*fn)(), int req, int opt, int varp, char * doc) -#else + SCM gscm_make_subr (fn, req, opt, varp, doc) SCM (*fn)(); @@ -461,19 +418,14 @@ gscm_make_subr (fn, req, opt, varp, doc) int opt; int varp; char * doc; -#endif { return scm_make_gsubr ("*anonymous*", req, opt, varp, fn); } -#ifdef __STDC__ -int -gscm_2_char (SCM c) -#else + int gscm_2_char (c) SCM c; -#endif { SCM_ASSERT (SCM_ICHRP (c), c, SCM_ARG1, "gscm_2_char"); return SCM_ICHR (c); @@ -481,16 +433,12 @@ gscm_2_char (c) -#ifdef __STDC__ -void -gscm_2_str (char ** out, int * len_out, SCM * objp) -#else + void gscm_2_str (out, len_out, objp) char ** out; int * len_out; SCM * objp; -#endif { SCM_ASSERT (SCM_NIMP (*objp) && SCM_STRINGP (*objp), *objp, SCM_ARG3, "gscm_2_str"); if (out) @@ -500,15 +448,11 @@ gscm_2_str (out, len_out, objp) } -#ifdef __STDC__ -void -gscm_error (char * message, SCM args) -#else + void gscm_error (message, args) char * message; SCM args; -#endif { SCM errsym; SCM str; @@ -519,10 +463,7 @@ gscm_error (message, args) } -#ifdef __STDC__ -GSCM_status -gscm_run_scm (int argc, char ** argv, FILE * in, FILE * out, FILE * err, GSCM_status (*initfn)(), char * initfile, char * initcmd) -#else + GSCM_status gscm_run_scm (argc, argv, in, out, err, initfn, initfile, initcmd) int argc; @@ -533,7 +474,6 @@ gscm_run_scm (argc, argv, in, out, err, initfn, initfile, initcmd) GSCM_status (*initfn)(); char * initfile; char * initcmd; -#endif { SCM_STACKITEM i; GSCM_status status; @@ -645,13 +585,9 @@ gscm_run_scm (argc, argv, in, out, err, initfn, initfile, initcmd) -#ifdef __STDC__ -void -scm_init_guile (void) -#else + void scm_init_guile () -#endif { #include "gscm.x" } |