projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb: make remove_dyn_prop a method of struct type
[deliverable/binutils-gdb.git]
/
libiberty
/
dyn-string.c
diff --git
a/libiberty/dyn-string.c
b/libiberty/dyn-string.c
index b6f5d4b0bf4c0e80c15e9eab2ffb172f15ba8a5c..e10f691181a89833d5f60fc2bb02e489da1f4bf6 100644
(file)
--- a/
libiberty/dyn-string.c
+++ b/
libiberty/dyn-string.c
@@
-1,5
+1,5
@@
/* An abstract string datatype.
/* An abstract string datatype.
- Copyright (C) 1998
, 1999, 2000, 2002, 2004
Free Software Foundation, Inc.
+ Copyright (C) 1998
-2020
Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
@@
-25,8
+25,8
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 5
9 Temple Place - Suite 330
,
-Boston, MA 0211
1-1307
, USA. */
+the Free Software Foundation, 5
1 Franklin Street - Fifth Floor
,
+Boston, MA 0211
0-1301
, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
@@
-67,7
+67,7
@@
dyn_string_init (struct dyn_string *ds_struct_ptr, int space)
if (ds_struct_ptr->s == NULL)
return 0;
#else
if (ds_struct_ptr->s == NULL)
return 0;
#else
- ds_struct_ptr->s =
(char *) xmalloc (
space);
+ ds_struct_ptr->s =
XNEWVEC (char,
space);
#endif
ds_struct_ptr->allocated = space;
ds_struct_ptr->length = 0;
#endif
ds_struct_ptr->allocated = space;
ds_struct_ptr->length = 0;
@@
-96,7
+96,7
@@
dyn_string_new (int space)
return NULL;
}
#else
return NULL;
}
#else
- result =
(dyn_string_t) xmalloc (sizeof (struct dyn_string)
);
+ result =
XNEW (struct dyn_string
);
dyn_string_init (result, space);
#endif
return result;
dyn_string_init (result, space);
#endif
return result;
@@
-159,7
+159,7
@@
dyn_string_resize (dyn_string_t ds, int space)
return NULL;
}
#else
return NULL;
}
#else
- ds->s =
(char *) xrealloc (
ds->s, ds->allocated);
+ ds->s =
XRESIZEVEC (char,
ds->s, ds->allocated);
#endif
}
#endif
}
@@
-336,7
+336,7
@@
dyn_string_append_cstr (dyn_string_t dest, const char *s)
return 1;
}
return 1;
}
-/* Appends C to the end of DEST. Returns 1 on success. On fail
i
ure,
+/* Appends C to the end of DEST. Returns 1 on success. On failure,
if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
This page took
0.024114 seconds
and
4
git commands to generate.