From: Jan Beulich Date: Fri, 6 May 2005 07:39:00 +0000 (+0000) Subject: gas/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c9aabc7f092cca553e7915b21298a5dfab5759a;p=binutils-gdb.git gas/ 2005-05-06 Jan Beulich * sb.h (sb_add_buffer): Reintroduce. * sb.c (sb_add_buffer): Likewise. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index e4cfd386646..f74ddadcc9a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-05-06 Jan Beulich + + * sb.h (sb_add_buffer): Reintroduce. + * sb.c (sb_add_buffer): Likewise. + 2005-05-06 Jan Beulich * macro.c (new_formal, del_formal): New. diff --git a/gas/sb.c b/gas/sb.c index 0195c9226b9..ba430cfd6c7 100644 --- a/gas/sb.c +++ b/gas/sb.c @@ -165,6 +165,16 @@ sb_add_string (sb *ptr, const char *s) ptr->len += len; } +/* add string at s of length len to sb at ptr */ + +void +sb_add_buffer (sb *ptr, const char *s, int len) +{ + sb_check (ptr, len); + memcpy (ptr->ptr + ptr->len, s, len); + ptr->len += len; +} + /* like sb_name, but don't include the null byte in the string. */ char * diff --git a/gas/sb.h b/gas/sb.h index aec5a516ff6..5761bd96aea 100644 --- a/gas/sb.h +++ b/gas/sb.h @@ -82,6 +82,7 @@ extern void sb_add_sb (sb *, sb *); extern void sb_reset (sb *); extern void sb_add_char (sb *, int); extern void sb_add_string (sb *, const char *); +extern void sb_add_buffer (sb *, const char *, int); extern char *sb_terminate (sb *); extern int sb_skip_white (int, sb *); extern int sb_skip_comma (int, sb *);