Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/toolchain/binutils remove old and unused files
details: https://anonhg.NetBSD.org/src/rev/e634a0a9549e
branches: trunk
changeset: 533197:e634a0a9549e
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Jun 24 06:49:14 2002 +0000
description:
remove old and unused files
diffstat:
gnu/dist/toolchain/binutils/dyn-string.c | 107 -------------------------------
gnu/dist/toolchain/binutils/dyn-string.h | 34 ---------
2 files changed, 0 insertions(+), 141 deletions(-)
diffs (149 lines):
diff -r 9a1efa446749 -r e634a0a9549e gnu/dist/toolchain/binutils/dyn-string.c
--- a/gnu/dist/toolchain/binutils/dyn-string.c Mon Jun 24 06:11:11 2002 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/* An abstract string datatype.
- Copyright (C) 1998 Free Software Foundation, Inc.
- Contributed by Mark Mitchell (mark%markmitchell.com@localhost).
-
- This file is part of GNU CC.
-
- GNU CC is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GNU CC is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This file lives in at least two places: binutils and gcc.
- Don't change one without the other. */
-
-#include "config.h"
-#ifdef IN_GCC
-#include "system.h"
-#include "gansidecl.h"
-#else
-#include "ansidecl.h"
-#endif
-#include "dyn-string.h"
-
-extern char *xmalloc ();
-extern char *xrealloc ();
-
-/* Create a new dynamic string capable of holding at least SPACE
- characters, including the terminating NUL. If SPACE is 0, it
- will be silently increased to 1. */
-
-dyn_string_t
-dyn_string_new (space)
- int space;
-{
- dyn_string_t result = (dyn_string_t) xmalloc (sizeof (struct dyn_string));
-
- if (space == 0)
- /* We need at least one byte in which to store the terminating
- NUL. */
- space = 1;
-
- result->allocated = space;
- result->s = (char*) xmalloc (space);
- result->length = 0;
- result->s[0] = '\0';
-
- return result;
-}
-
-/* Free the memory used by DS. */
-
-void
-dyn_string_delete (ds)
- dyn_string_t ds;
-{
- free (ds->s);
- free (ds);
-}
-
-/* Append the NUL-terminated string S to DS, resizing DS if
- necessary. */
-
-dyn_string_t
-dyn_string_append (ds, s)
- dyn_string_t ds;
- char *s;
-{
- int len = strlen (s);
- dyn_string_resize (ds, ds->length + len + 1 /* '\0' */);
- strcpy (ds->s + ds->length, s);
- ds->length += len;
-
- return ds;
-}
-
-/* Increase the capacity of DS so that it can hold at least SPACE
- characters, including the terminating NUL. This function will not
- (at present) reduce the capacity of DS. */
-
-dyn_string_t
-dyn_string_resize (ds, space)
- dyn_string_t ds;
- int space;
-{
- int new_allocated = ds->allocated;
-
- while (space > new_allocated)
- new_allocated *= 2;
-
- if (new_allocated != ds->allocated)
- {
- /* We actually need more space. */
- ds->allocated = new_allocated;
- ds->s = (char*) xrealloc (ds->s, ds->allocated);
- }
-
- return ds;
-}
diff -r 9a1efa446749 -r e634a0a9549e gnu/dist/toolchain/binutils/dyn-string.h
--- a/gnu/dist/toolchain/binutils/dyn-string.h Mon Jun 24 06:11:11 2002 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/* An abstract string datatype.
- Copyright (C) 1998 Free Software Foundation, Inc.
- Contributed by Mark Mitchell (mark%markmitchell.com@localhost).
-
- This file is part of GNU CC.
-
- GNU CC is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GNU CC is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This file lives in at least two places: binutils and gcc.
- Don't change one without the other. */
-
-typedef struct dyn_string
-{
- int allocated; /* The amount of space allocated for the string. */
- int length; /* The actual length of the string. */
- char *s; /* The string itself, NUL-terminated. */
-}* dyn_string_t;
-
-extern dyn_string_t dyn_string_new PARAMS((int));
-extern void dyn_string_delete PARAMS((dyn_string_t));
-extern dyn_string_t dyn_string_append PARAMS((dyn_string_t, char*));
-extern dyn_string_t dyn_string_resize PARAMS((dyn_string_t, int));
Home |
Main Index |
Thread Index |
Old Index