diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2008-12-11 17:27:56 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2008-12-11 17:27:56 +0000 |
commit | 7dd0c330975c6a1452d829471ba68543d5e8ab5c (patch) | |
tree | d0c618c8f3752ff33357d44d3ce17b74a561d2c5 /newlib/libc/misc/__dprintf.c | |
parent | 2549caeff19e3bfbf6405884071bfd1193ae62a5 (diff) | |
download | cygnal-7dd0c330975c6a1452d829471ba68543d5e8ab5c.tar.gz cygnal-7dd0c330975c6a1452d829471ba68543d5e8ab5c.tar.bz2 cygnal-7dd0c330975c6a1452d829471ba68543d5e8ab5c.zip |
2008-12-11 Craig Howland <howland@LGSInnovations.com>
* libc/include/sys/lock.h: Add void cast to avoid "statement has no
effect" warnings from gcc.
* libc/include/sys/stdio.h: Ditto.
* libc/include/sys/time.h: Correct gettimeofday() prototype.
* libc/stdlib/__exp10.c: Add #include "std.h" for function prototype.
* libc/stdlib/__ten_mu.c: Ditto.
* libc/stdlib/std.h: Correct __exp10's ANSI prototype.
* libc/stdlib/ldtoa.c: Change eiisinf definition to ANSI form. (Are
already others in file without _ansi method, so did not bother.)
* libc/stdlib/system.c: Use _ansi forms for function prototypes and
definitions.
* libc/time/mktime.c: Ditto.
* libc/misc/__dprintf.c: Ditto.
* libc/include/stdio.h: Add function prototypes for _fgetc_r,
_fgetpos_r, _fsetpos_r, _freopen_r, _rewind_r, freopen64, _freopen64_r,
_funopen_r, and _fopencookie_r.
* libc/include/reent.h: Add function prototype for _stat64_r, align
_execve_r prototype with POSIX definition for execve.
* libc/reent/execr.c: Align function prototype with POSIX definition.
* libc/stdio/asniprintf.c: Add #include "local.h".
* libc/stdio/vasniprintf.c: Ditto.
* libc/stdio/fread.c: Remove unused variable newcount.
* libc/stdio/local.h: Add function prototype for __sccl.
* libc/stdio/open_memstream.c: Remove unused variable flags.
* libc/stdio/vfscanf.c: Proper prototyping for ccfn, remove prototype
for __sccl since now in local.h.
* libc/string/memcpy.c: Add #include <string.h> (for real and for
traditional synopsis), remove extraneous stddef.h and limits.h.
* libc/syscalls/sysclose.c: Add #include <unistd.h>.
* libc/syscalls/sysfork.c: Ditto.
* libc/syscalls/sysgetpid.c: Ditto.
* libc/syscalls/sysexecve.c: Add #include <unistd.h>, align function
prototype with POSIX definition.
* libc/syscalls/sysfstat.c: Add #include <sys/stat.h>.
* libc/syscalls/sysgettod.c: Correct sys/times.h to sys/time.h.
* libc/syscalls/syskill.c: Add #include <signal.h>.
* libc/syscalls/syslink.c: Add #include <unistd.h>, fix prototype.
* libc/syscalls/sysunlink.c: Ditto.
* libc/syscalls/sysstat.c: Add #include <sys/stat.h>, fix prototype.
* libc/syscalls/syswait.c: Add #include <sys/wait.h>, fix prototype.
Diffstat (limited to 'newlib/libc/misc/__dprintf.c')
-rw-r--r-- | newlib/libc/misc/__dprintf.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/newlib/libc/misc/__dprintf.c b/newlib/libc/misc/__dprintf.c index 0b780f59b..eba45eaaa 100644 --- a/newlib/libc/misc/__dprintf.c +++ b/newlib/libc/misc/__dprintf.c @@ -4,6 +4,7 @@ We do assume _write_r is working. */ +#include <_ansi.h> #include "ctype.h" #include "reent.h" #include "string.h" @@ -19,10 +20,10 @@ static char *parse_number (); #endif -static long get_number (); -static void print_number (); -static void write_char (); -static void write_string (); +static long _EXFUN(get_number, (char *, long, int)); +static void _EXFUN(print_number, (int, int, long)); +static void _EXFUN(write_char, (char c)); +static void _EXFUN(write_string, (_CONST char *s)); /* Non-zero for big-endian systems. */ static int big_endian_p; @@ -39,7 +40,7 @@ static int big_endian_p; 20 words at a certain address). A modifier of `N' says the next argument is a count, and the one after that is a pointer. - Example: __dprintf (stderr, "%Nx\n", 20, p); /-* print 20 ints at `p' *-/ + Example: __dprintf ("%Nx\n", 20, p); /-* print 20 ints at `p' *-/ Supported formats are: c d u x s p. @@ -54,7 +55,7 @@ static int big_endian_p; void #ifdef __STDC__ -__dprintf (char *fmt, ...) +__dprintf (const char *fmt, ...) #else __dprintf (fmt, va_alist) char *fmt; @@ -176,10 +177,10 @@ parse_number (s, p) /* Fetch the number at S of SIZE bytes. */ static long -get_number (s, size, unsigned_p) - char *s; - long size; - int unsigned_p; +_DEFUN(get_number, (s, size, unsigned_p), + char *s _AND + long size _AND + int unsigned_p) { long x; unsigned char *p = (unsigned char *) s; @@ -219,10 +220,10 @@ get_number (s, size, unsigned_p) /* Print X in base BASE. */ static void -print_number (base, unsigned_p, n) - int base; - int unsigned_p; - long n; +_DEFUN(print_number, (base, unsigned_p, n), + int base _AND + int unsigned_p _AND + long n) { static char chars[16] = "0123456789abcdef"; char *p, buf[32]; @@ -253,8 +254,8 @@ print_number (base, unsigned_p, n) stdio is working. */ static void -write_char (c) - char c; +_DEFUN(write_char, (c), + char c) { _write_r (_REENT, CONSOLE_FD, &c, 1); } @@ -264,8 +265,8 @@ write_char (c) stdio is working. */ static void -write_string (s) - char *s; +_DEFUN(write_string, (s), + _CONST char *s) { _write_r (_REENT, CONSOLE_FD, s, strlen (s)); } |