summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@src.gnome.org>1998-03-29 05:20:44 +0000
committerRaja R Harinath <harinath@src.gnome.org>1998-03-29 05:20:44 +0000
commit3fad77e574a5b05aa09d79bb1cb702da3f8e5386 (patch)
treee32bd3e56dda4249b357a3140b3f21b49785f337 /support
parent4551cc3a4bf1222ff33c48d7900f43dc197a080f (diff)
downloadshared-mime-info-3fad77e574a5b05aa09d79bb1cb702da3f8e5386.tar.gz
Imported from GNU libit-0.4. Applied a change that appears in `libiberty'.
* vasprintf.c (int_vasprintf): Imported from GNU libit-0.4. Applied a change that appears in `libiberty'. svn path=/trunk/; revision=175
Diffstat (limited to 'support')
-rw-r--r--support/ChangeLog5
-rw-r--r--support/README-gnome20
-rw-r--r--support/vasprintf.c6
3 files changed, 30 insertions, 1 deletions
diff --git a/support/ChangeLog b/support/ChangeLog
index 91ca1359..6ce0c4b8 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,8 @@
+1998-03-28 Raja R Harinath <harinath@cs.umn.edu>
+
+ * vasprintf.c (int_vasprintf): Imported from GNU libit-0.4.
+ Applied a change that appears in `libiberty'.
+
Fri Mar 13 21:30:34 1998 Tom Tromey <tromey@cygnus.com>
* argp.texi: Imported from glibc.
diff --git a/support/README-gnome b/support/README-gnome
index 1b04a5f3..b2f3101a 100644
--- a/support/README-gnome
+++ b/support/README-gnome
@@ -44,6 +44,7 @@ The files that have "vendor" versions are:
strndup.c GNU
strnlen.c GNU
strtok_r.c GNU
+ vasprintf.c GNU
vsnprintf.c SNPRINTF_de_Raadt
To find out the list of changes made against a "vendor" revision, you
@@ -70,3 +71,22 @@ In other words the "Branch revision" and "Vendor Tag" must agree.
- Raja R Harinath <harinath@cs.umn.edu>
1998-03-11
+
+Good places to get "support" functions:
+
+`libgnomesupport' is essentially a `glibc' emulation library, and hence
+`glibc' itself is a good source. However, some of the functions cannot
+be easily ripped out and put here (esp. any of the stdio-derived
+functions). Other places are:
+
+* libiberty from your friendly Cygnus source distribution, e.g.,
+ binutils, gdb. The only caveat is that these cannot be used drop-in:
+ you have to remove references to other files in the Cygnus tree &c.
+
+* libit, which appeared briefly on ftp://alpha.gnu.org
+
+* Jim Meyering's collection from his `fileutils'/`sh-utils'/`textutils'
+ packages
+
+- Raja R Harinath
+ 1998-03-28
diff --git a/support/vasprintf.c b/support/vasprintf.c
index d06f2a55..64e06b88 100644
--- a/support/vasprintf.c
+++ b/support/vasprintf.c
@@ -76,7 +76,8 @@ int_vasprintf (result, format, args)
}
while (strchr ("hlL", *p))
++p;
- /* Should be big enough for any format specifier except %s. */
+ /* Should be big enough for any format specifier except %s
+ and floats. */
total_width += 30;
switch (*p)
{
@@ -95,6 +96,9 @@ int_vasprintf (result, format, args)
case 'g':
case 'G':
(void) va_arg (ap, double);
+ /* Since an ieee double can have an exponent of 307, we'll
+ make the buffer wide enough to cover the gross case. */
+ total_width += 307;
break;
case 's':
total_width += strlen (va_arg (ap, char *));