summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/gas/sb.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/gas/sb.c')
-rw-r--r--contrib/binutils/gas/sb.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/contrib/binutils/gas/sb.c b/contrib/binutils/gas/sb.c
index 6ec23fc..6328716 100644
--- a/contrib/binutils/gas/sb.c
+++ b/contrib/binutils/gas/sb.c
@@ -1,5 +1,5 @@
/* sb.c - string buffer manipulation routines
- Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 2000 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -19,10 +19,13 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#ifdef HAVE_STRING_H
#include <string.h>
#else
@@ -59,7 +62,7 @@ int string_count[sb_max_power_two];
static sb_list_vector free_list;
-/* initializes an sb. */
+/* initializes an sb. */
void
sb_build (ptr, size)
@@ -94,7 +97,6 @@ sb_build (ptr, size)
ptr->item = e;
}
-
void
sb_new (ptr)
sb *ptr;
@@ -126,7 +128,7 @@ sb_add_sb (ptr, s)
}
/* make sure that the sb at ptr has room for another len characters,
- and grow it if it doesn't. */
+ and grow it if it doesn't. */
static void
sb_check (ptr, len)
@@ -155,7 +157,7 @@ sb_reset (ptr)
ptr->len = 0;
}
-/* add character c to the end of the sb at ptr. */
+/* add character c to the end of the sb at ptr. */
void
sb_add_char (ptr, c)
@@ -166,7 +168,7 @@ sb_add_char (ptr, c)
ptr->ptr[ptr->len++] = c;
}
-/* add null terminated string s to the end of sb at ptr. */
+/* add null terminated string s to the end of sb at ptr. */
void
sb_add_string (ptr, s)
@@ -213,7 +215,7 @@ sb_print (outfile, ptr)
}
}
-void
+void
sb_print_at (outfile, idx, ptr)
FILE *outfile;
int idx;
@@ -225,7 +227,7 @@ sb_print_at (outfile, idx, ptr)
}
/* put a null at the end of the sb at in and return the start of the
- string, so that it can be used as an arg to printf %s. */
+ string, so that it can be used as an arg to printf %s. */
char *
sb_name (in)
@@ -264,7 +266,7 @@ sb_skip_white (idx, ptr)
/* start at the index idx into the sb at ptr. skips whitespace,
a comma and any following whitespace. returnes the index of the
- next character. */
+ next character. */
int
sb_skip_comma (idx, ptr)
OpenPOWER on IntegriCloud