diff options
author | Jim Blandy <jimb@red-bean.com> | 1996-10-14 01:28:01 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1996-10-14 01:28:01 +0000 |
commit | 1717856b4e8072b5aebab2324fcfba55bc504369 (patch) | |
tree | 34264cec197ee7a1e4e4ce5607a8fbf958f9c020 /libguile/genio.c | |
parent | 0682f7ab1dfa23adbf85435d5884b0ec91956a53 (diff) | |
download | guile-1717856b4e8072b5aebab2324fcfba55bc504369.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.)
More prototype-related changes from Marius Vollmer:
* gdb_interface.h: Wrapped header file in #ifdef/#endif
* gscm.h (gscm_run_scm): Added prototype for `initfn' paramter.
* ports.h (ptobfuns): Added prototypes. This means some casting in
fports.c.
* fports.c: Added casts for initializations, since the functions
are defined to take FILE * as their stream argument, not SCM.
* fdsocket.c, fdsocket.h: Made `init_addr_buffer' static.
* genio.c (scm_gen_puts): Changed `unsigned char *str_data' parameter
to `char *str_data' to conform to prototype.
Diffstat (limited to 'libguile/genio.c')
-rw-r--r-- | libguile/genio.c | 70 |
1 files changed, 20 insertions, 50 deletions
diff --git a/libguile/genio.c b/libguile/genio.c index 815c9ffb3..5ebd86e3f 100644 --- a/libguile/genio.c +++ b/libguile/genio.c @@ -52,30 +52,26 @@ -#ifdef __STDC__ -static void -scm_putc (int c, SCM port) -#else + +static void scm_putc SCM_P ((int c, SCM port)); + static void scm_putc (c, port) int c; SCM port; -#endif { scm_sizet i = SCM_PTOBNUM (port); SCM_SYSCALL ((scm_ptobs[i].fputc) (c, SCM_STREAM (port))); } -#ifdef __STDC__ -static void -scm_puts (char *s, SCM port) -#else + +static void scm_puts SCM_P ((char *s, SCM port)); + static void scm_puts (s, port) char *s; SCM port; -#endif { scm_sizet i = SCM_PTOBNUM (port); SCM_SYSCALL ((scm_ptobs[i].fputs) (s, SCM_STREAM (port))); @@ -86,17 +82,15 @@ scm_puts (s, port) } -#ifdef __STDC__ -static int -scm_lfwrite (char *ptr, scm_sizet size, scm_sizet nitems, SCM port) -#else + +static int scm_lfwrite SCM_P ((char *ptr, scm_sizet size, scm_sizet nitems, SCM port)); + static int scm_lfwrite (ptr, size, nitems, port) char *ptr; scm_sizet size; scm_sizet nitems; SCM port; -#endif { int ret; scm_sizet i = SCM_PTOBNUM (port); @@ -111,15 +105,11 @@ scm_lfwrite (ptr, size, nitems, port) -#ifdef __STDC__ -void -scm_gen_putc (int c, SCM port) -#else + void scm_gen_putc (c, port) int c; SCM port; -#endif { switch (SCM_PORT_REPRESENTATION (port)) { @@ -168,18 +158,12 @@ scm_gen_putc (c, port) -#ifdef __STDC__ -void -scm_gen_puts (enum scm_string_representation_type rep, - char *str_data, - SCM port) -#else + void scm_gen_puts (rep, str_data, port) enum scm_string_representation_type rep; - unsigned char *str_data; + char *str_data; SCM port; -#endif { switch (rep) { @@ -285,17 +269,13 @@ scm_gen_puts (rep, str_data, port) -#ifdef __STDC__ -void -scm_gen_write (enum scm_string_representation_type rep, char *str_data, scm_sizet nitems, SCM port) -#else + void scm_gen_write (rep, str_data, nitems, port) enum scm_string_representation_type rep; char *str_data; scm_sizet nitems; SCM port; -#endif { /* is nitems bytes or characters in the mb_string case? */ @@ -401,33 +381,27 @@ scm_gen_write (rep, str_data, nitems, port) -#ifdef __STDC__ -static int -scm_getc (SCM port) -#else + +static int scm_getc SCM_P ((SCM port)); + static int scm_getc (port) SCM port; -#endif { - FILE *f; + SCM f; int c; scm_sizet i; - f = (FILE *)SCM_STREAM (port); + f = SCM_STREAM (port); i = SCM_PTOBNUM (port); SCM_SYSCALL (c = (scm_ptobs[i].fgetc) (f)); return c; } -#ifdef __STDC__ -int -scm_gen_getc (SCM port) -#else + int scm_gen_getc (port) SCM port; -#endif { int c; @@ -512,15 +486,11 @@ scm_gen_getc (port) } } -#ifdef __STDC__ -void -scm_gen_ungetc (int c, SCM port) -#else + void scm_gen_ungetc (c, port) int c; SCM port; -#endif { /* SCM_ASSERT(!SCM_CRDYP(port), port, SCM_ARG2, "too many scm_gen_ungetc");*/ SCM_CUNGET (c, port); |