diff options
author | Martin Baulig <baulig@Stud.Informatik.uni-trier.de> | 1998-07-15 16:08:27 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1998-07-15 16:08:27 +0000 |
commit | 22a9109843375d61e10c6c8292c79484695bf55b (patch) | |
tree | 3ed9cebbc499e54df8f86b2de5e5c0224fe8ca38 /support | |
parent | 0b24c8633addf873c72ef18e6ca5c0cd5ded1791 (diff) | |
download | gnome-common-22a9109843375d61e10c6c8292c79484695bf55b.tar.gz |
Emit declarations.
1998-07-15 Martin Baulig <baulig@Stud.Informatik.uni-trier.de>
* gnomesupport-h.c (memmove strtod strtol strtoul): Emit
declarations.
* memmove.c: New file. Imported from GNU libiberty.
* strtod.c, strtol.c, strtoul.c: New files. Imported from
GNU libiberty.
svn path=/trunk/; revision=279
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 10 | ||||
-rw-r--r-- | support/gnomesupport.awk | 39 | ||||
-rw-r--r-- | support/memmove.c | 8 |
3 files changed, 52 insertions, 5 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index b479610..e59681a 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,13 @@ +1998-07-15 Martin Baulig <baulig@Stud.Informatik.uni-trier.de> + + * gnomesupport-h.c (memmove strtod strtol strtoul): Emit + declarations. + + * memmove.c: New file. Imported from GNU libiberty. + + * strtod.c, strtol.c, strtoul.c: New files. Imported from + GNU libiberty. + 1998-07-14 Raja R Harinath <harinath@cs.umn.edu> * mkstemp.c (<stdint.h>): Systems that don't have `mkstemp' diff --git a/support/gnomesupport.awk b/support/gnomesupport.awk index 96bec90..97a4272 100644 --- a/support/gnomesupport.awk +++ b/support/gnomesupport.awk @@ -106,6 +106,37 @@ END { print " char **/*save_ptr*/);"; } + if (!def["HAVE_STRTOD"]) { + print ""; + print "/* Convert the initial portion of the string pointed to by"; + print " nptr to double representation and return the converted value."; + print " If endptr is not NULL, a pointer to the character after the"; + print " last character used in the conversion is stored in the"; + print " location referenced by endptr. */"; + print "double strtod (const char */*nptr*/, char **/*endptr*/);"; + } + + if (!def["HAVE_STRTOL"]) { + print ""; + print "/* Convert the initial portion of the string pointed to by"; + print " nptr to a long integer value according to the given base."; + print " If endptr is not NULL, a pointer to the character after the"; + print " last character used in the conversion is stored in the"; + print " location referenced by endptr. */"; + print "long int strtol (const char */*nptr*/, char **/*endptr*/, int /*base*/);"; + } + + if (!def["HAVE_STRTOUL"]) { + print ""; + print "/* Convert the initial portion of the string pointed to by"; + print " nptr to an unsigned long integer value according to the given base."; + print " If endptr is not NULL, a pointer to the character after the"; + print " last character used in the conversion is stored in the"; + print " location referenced by endptr. */"; + print "unsigned long int strtol (const char */*nptr*/, char **/*endptr*/,"; + print " int /*base*/);"; + } + if (!def["HAVE_VASPRINTF"]) { print ""; print "/* Write formatted output to a string dynamically allocated with"; @@ -123,7 +154,13 @@ END { print "int snprintf (char */*str*/, size_t /*maxlen*/,"; print " char */*fmt*/, ...);"; } - + + if (!def["HAVE_MEMMOVE"]) { + print ""; + print "/* Copies len bytes from src to dest. */"; + print "void * memmove (void */*dest*/, const void */*src*/, size_t /*len*/);"; + } + print ""; print "#ifdef __cplusplus"; print "}"; diff --git a/support/memmove.c b/support/memmove.c index 818fc24..96e257e 100644 --- a/support/memmove.c +++ b/support/memmove.c @@ -1,16 +1,16 @@ /* Wrapper to implement ANSI C's memmove using BSD's bcopy. */ /* This function is in the public domain. --Per Bothner. */ -#include <ansidecl.h> + #ifdef __STDC__ #include <stddef.h> #else #define size_t unsigned long #endif -PTR +void * memmove (s1, s2, n) - PTR s1; - CONST PTR s2; + void *s1; + const void *s2; size_t n; { bcopy (s2, s1, n); |