aboutsummaryrefslogtreecommitdiff
path: root/gas/sb.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2003-12-03 03:39:58 +0000
committerKazu Hirata <kazu@codesourcery.com>2003-12-03 03:39:58 +0000
commit24361518917bcfdb764a5cfe6caa7f4ee8d3f81d (patch)
tree9072477b054637affb48b1baf4f3ead318b77271 /gas/sb.c
parent021d913e2ed9aa3cf3b061152f708d3d40f79dbd (diff)
downloadgdb-24361518917bcfdb764a5cfe6caa7f4ee8d3f81d.zip
gdb-24361518917bcfdb764a5cfe6caa7f4ee8d3f81d.tar.gz
gdb-24361518917bcfdb764a5cfe6caa7f4ee8d3f81d.tar.bz2
* messages.c: Convert to ISO-C.
* obj.h: Likewise. * output-file.c: Likewise. * output-file.h: Likewise. * sb.c: Likewise. * sb.h: Likewise. * stabs.c: Likewise. * subsegs.c: Likewise. * subsegs.h: Likewise. * tc.h: Likewise.
Diffstat (limited to 'gas/sb.c')
-rw-r--r--gas/sb.c59
1 files changed, 16 insertions, 43 deletions
diff --git a/gas/sb.c b/gas/sb.c
index e48246a..27b29ee 100644
--- a/gas/sb.c
+++ b/gas/sb.c
@@ -52,7 +52,7 @@
#define dsize 5
-static void sb_check PARAMS ((sb *, int));
+static void sb_check (sb *, int);
/* Statistics of sb structures. */
@@ -65,9 +65,7 @@ static sb_list_vector free_list;
/* initializes an sb. */
void
-sb_build (ptr, size)
- sb *ptr;
- int size;
+sb_build (sb *ptr, int size)
{
/* see if we can find one to allocate */
sb_element *e;
@@ -98,8 +96,7 @@ sb_build (ptr, size)
}
void
-sb_new (ptr)
- sb *ptr;
+sb_new (sb *ptr)
{
sb_build (ptr, dsize);
}
@@ -107,8 +104,7 @@ sb_new (ptr)
/* deallocate the sb at ptr */
void
-sb_kill (ptr)
- sb *ptr;
+sb_kill (sb *ptr)
{
/* return item to free list */
ptr->item->next = free_list.size[ptr->pot];
@@ -118,9 +114,7 @@ sb_kill (ptr)
/* add the sb at s to the end of the sb at ptr */
void
-sb_add_sb (ptr, s)
- sb *ptr;
- sb *s;
+sb_add_sb (sb *ptr, sb *s)
{
sb_check (ptr, s->len);
memcpy (ptr->ptr + ptr->len, s->ptr, s->len);
@@ -131,9 +125,7 @@ sb_add_sb (ptr, s)
and grow it if it doesn't. */
static void
-sb_check (ptr, len)
- sb *ptr;
- int len;
+sb_check (sb *ptr, int len)
{
if (ptr->len + len >= 1 << ptr->pot)
{
@@ -151,8 +143,7 @@ sb_check (ptr, len)
/* make the sb at ptr point back to the beginning. */
void
-sb_reset (ptr)
- sb *ptr;
+sb_reset (sb *ptr)
{
ptr->len = 0;
}
@@ -160,9 +151,7 @@ sb_reset (ptr)
/* add character c to the end of the sb at ptr. */
void
-sb_add_char (ptr, c)
- sb *ptr;
- int c;
+sb_add_char (sb *ptr, int c)
{
sb_check (ptr, 1);
ptr->ptr[ptr->len++] = c;
@@ -171,9 +160,7 @@ sb_add_char (ptr, c)
/* add null terminated string s to the end of sb at ptr. */
void
-sb_add_string (ptr, s)
- sb *ptr;
- const char *s;
+sb_add_string (sb *ptr, const char *s)
{
int len = strlen (s);
sb_check (ptr, len);
@@ -184,10 +171,7 @@ sb_add_string (ptr, s)
/* add string at s of length len to sb at ptr */
void
-sb_add_buffer (ptr, s, len)
- sb *ptr;
- const char *s;
- int len;
+sb_add_buffer (sb *ptr, const char *s, int len)
{
sb_check (ptr, len);
memcpy (ptr->ptr + ptr->len, s, len);
@@ -197,9 +181,7 @@ sb_add_buffer (ptr, s, len)
/* print the sb at ptr to the output file */
void
-sb_print (outfile, ptr)
- FILE *outfile;
- sb *ptr;
+sb_print (FILE *outfile, sb *ptr)
{
int i;
int nc = 0;
@@ -216,10 +198,7 @@ sb_print (outfile, ptr)
}
void
-sb_print_at (outfile, idx, ptr)
- FILE *outfile;
- int idx;
- sb *ptr;
+sb_print_at (FILE *outfile, int idx, sb *ptr)
{
int i;
for (i = idx; i < ptr->len; i++)
@@ -230,8 +209,7 @@ sb_print_at (outfile, idx, ptr)
string, so that it can be used as an arg to printf %s. */
char *
-sb_name (in)
- sb *in;
+sb_name (sb *in)
{
/* stick a null on the end of the string */
sb_add_char (in, 0);
@@ -241,8 +219,7 @@ sb_name (in)
/* like sb_name, but don't include the null byte in the string. */
char *
-sb_terminate (in)
- sb *in;
+sb_terminate (sb *in)
{
sb_add_char (in, 0);
--in->len;
@@ -253,9 +230,7 @@ sb_terminate (in)
whitespace. return the index of the first non whitespace character */
int
-sb_skip_white (idx, ptr)
- int idx;
- sb *ptr;
+sb_skip_white (int idx, sb *ptr)
{
while (idx < ptr->len
&& (ptr->ptr[idx] == ' '
@@ -269,9 +244,7 @@ sb_skip_white (idx, ptr)
next character. */
int
-sb_skip_comma (idx, ptr)
- int idx;
- sb *ptr;
+sb_skip_comma (int idx, sb *ptr)
{
while (idx < ptr->len
&& (ptr->ptr[idx] == ' '