]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove dyn-string
authorPhil Blundell <philb@gnu.org>
Wed, 1 Nov 2000 21:21:53 +0000 (21:21 +0000)
committerPhil Blundell <philb@gnu.org>
Wed, 1 Nov 2000 21:21:53 +0000 (21:21 +0000)
binutils/ChangeLog
binutils/Makefile.am
binutils/Makefile.in
binutils/dyn-string.c [deleted file]
binutils/dyn-string.h [deleted file]

index 79ab2e434763931a710ffc6d5a969a511d17ec5d..77775a81c3e631fbf6e6c35125a58f19ad6c42cc 100644 (file)
@@ -1,3 +1,13 @@
+2000-11-01  Philip Blundell  <philb@gnu.org>
+
+       From 2000-06-15  H.J. Lu  <hjl@gnu.org>
+       * dyn-string.c: Removed. Not needed with dyn-string.c in
+       libiberty.
+       * dyn-string.h: Likewise.
+       * Makefile.am: Remove references to dyn-string.c and
+       dyn-string.h. Rebuild dependency.
+       * Makefile.in: Rebuild.
+
 2000-10-16  Philip Blundell  <pb@futuretv.com>
 
        * configure.in: Set version number to 2.10.1.
index 4c509bf6413e5ae0318d397b438683c9f68265a1..a6eb22aa99d77e88f982c363de22ae43561bbbc0 100644 (file)
@@ -74,7 +74,7 @@ MKDEP = gcc -MM
 INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
 
 HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
-       windres.h winduni.h dyn-string.h
+       windres.h winduni.h
 
 GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
 
@@ -84,7 +84,7 @@ CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \
        objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
        stabs.c strings.c sysdump.c version.c wrstabs.c \
        windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \
-       resres.c dyn-string.c dllwrap.c rename.c
+       resres.c dllwrap.c rename.c
 
 GENERATED_CFILES = \
        underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
@@ -242,7 +242,7 @@ sysinfo.h: sysinfo.c
 
 srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
 
-dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS)
+dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
 dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
 
 dlltool.o:dlltool.c
@@ -267,7 +267,7 @@ windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
        winduni.c resres.c $(BULIBS)
 windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
 
-dllwrap_SOURCES = dllwrap.c dyn-string.c version.c
+dllwrap_SOURCES = dllwrap.c version.c
 dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
 
 
@@ -391,7 +391,7 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/libiberty.h debug.h
 dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
-  $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h dyn-string.h \
+  $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \
   dlltool.h
 filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
@@ -484,11 +484,9 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
 resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
   $(INCDIR)/libiberty.h windres.h winduni.h
-dyn-string.o: dyn-string.c config.h $(INCDIR)/ansidecl.h \
-  dyn-string.h
 dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
-  $(INCDIR)/fopen-same.h dyn-string.h
+  $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
 rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
 underscore.o: underscore.c
index 8172759603ab73f60824a60313fb618e3a0d9c41..f4178de276a988241474206a3869105002fb367f 100644 (file)
@@ -151,8 +151,7 @@ DLLWRAP_PROG = dllwrap
 
 SRCONV_PROG = srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT) 
 
-man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 \
-       addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1
+man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1     addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1
 
 
 PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
@@ -174,24 +173,15 @@ MKDEP = gcc -MM
 
 INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
 
-HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
-       windres.h winduni.h dyn-string.h
+HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h       windres.h winduni.h
 
 
 GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
 
-CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \
-       dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c \
-       maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
-       objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
-       stabs.c strings.c sysdump.c version.c wrstabs.c \
-       windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \
-       resres.c dyn-string.c dllwrap.c rename.c
+CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c       dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c       maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c   objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c    stabs.c strings.c sysdump.c version.c wrstabs.c         windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c        resres.c dllwrap.c rename.c
 
 
-GENERATED_CFILES = \
-       underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
-       defparse.c deflex.c nlmheader.c rcparse.c rclex.c
+GENERATED_CFILES =     underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c     defparse.c deflex.c nlmheader.c rcparse.c rclex.c
 
 
 DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
@@ -208,29 +198,12 @@ LIBIBERTY = ../libiberty/libiberty.a
 
 POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
 
-EXPECT = `if [ -f $$r/../expect/expect ] ; then \
-          echo $$r/../expect/expect ; \
-          else echo expect ; fi`
+EXPECT = `if [ -f $$r/../expect/expect ] ; then           echo $$r/../expect/expect ;           else echo expect ; fi`
 
-RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
-           echo ${srcdir}/../dejagnu/runtest ; \
-           else echo runtest ;  fi`
+RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then            echo ${srcdir}/../dejagnu/runtest ;            else echo runtest ;  fi`
 
 
-CC_FOR_TARGET = ` \
-  if [ -f $$r/../gcc/xgcc ] ; then \
-    if [ -f $$r/../newlib/Makefile ] ; then \
-      echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
-    else \
-      echo $$r/../gcc/xgcc -B$$r/../gcc/; \
-    fi; \
-  else \
-    if [ "@host@" = "@target@" ] ; then \
-      echo $(CC); \
-    else \
-      echo gcc | sed '$(transform)'; \
-    fi; \
-  fi`
+CC_FOR_TARGET = `   if [ -f $$r/../gcc/xgcc ] ; then     if [ -f $$r/../newlib/Makefile ] ; then       echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc;     else       echo $$r/../gcc/xgcc -B$$r/../gcc/;     fi;   else     if [ "@host@" = "@target@" ] ; then       echo $(CC);     else       echo gcc | sed '$(transform)';     fi;   fi`
 
 
 info_TEXINFOS = binutils.texi
@@ -266,7 +239,7 @@ addr2line_SOURCES = addr2line.c $(BULIBS)
 
 srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
 
-dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS)
+dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
 dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
 
 coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
@@ -275,26 +248,22 @@ sysdump_SOURCES = sysdump.c $(BULIBS)
 
 nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
 
-windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
-       winduni.c resres.c $(BULIBS)
+windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l       winduni.c resres.c $(BULIBS)
 
 windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
 
-dllwrap_SOURCES = dllwrap.c dyn-string.c version.c
+dllwrap_SOURCES = dllwrap.c version.c
 dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
 
-DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
-       syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
+DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h        syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
 
 
-DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
-       site.exp site.bak
+DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h  site.exp site.bak
 
 
 MAINTAINERCLEANFILES = config.texi
 
-MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum \
-       abcdefgh*
+MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum       abcdefgh*
 
 
 CLEANFILES = dep.sed DEP DEP1 DEP2
@@ -330,15 +299,15 @@ coffdump_OBJECTS =  coffdump.o coffgrok.o bucomm.o version.o filemode.o
 coffdump_LDADD = $(LDADD)
 coffdump_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
 coffdump_LDFLAGS = 
-dlltool_OBJECTS =  dlltool.o defparse.o deflex.o dyn-string.o bucomm.o \
-version.o filemode.o
+dlltool_OBJECTS =  dlltool.o defparse.o deflex.o bucomm.o version.o \
+filemode.o
 dlltool_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
 dlltool_LDFLAGS = 
 windres_OBJECTS =  windres.o resrc.o rescoff.o resbin.o rcparse.o \
 rclex.o winduni.o resres.o bucomm.o version.o filemode.o
 windres_DEPENDENCIES =  ../bfd/libbfd.la ../libiberty/libiberty.a
 windres_LDFLAGS = 
-dllwrap_OBJECTS =  dllwrap.o dyn-string.o version.o
+dllwrap_OBJECTS =  dllwrap.o version.o
 dllwrap_DEPENDENCIES =  ../libiberty/libiberty.a
 dllwrap_LDFLAGS = 
 size_OBJECTS =  size.o bucomm.o version.o filemode.o
@@ -1247,7 +1216,7 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/libiberty.h debug.h
 dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
-  $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h dyn-string.h \
+  $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \
   dlltool.h
 filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
@@ -1340,11 +1309,9 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
 resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
   $(INCDIR)/libiberty.h windres.h winduni.h
-dyn-string.o: dyn-string.c config.h $(INCDIR)/ansidecl.h \
-  dyn-string.h
 dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
-  $(INCDIR)/fopen-same.h dyn-string.h
+  $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
 rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
   bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
 underscore.o: underscore.c
diff --git a/binutils/dyn-string.c b/binutils/dyn-string.c
deleted file mode 100644 (file)
index a164018..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/* An abstract string datatype.
-   Copyright (C) 1998 Free Software Foundation, Inc.
-   Contributed by Mark Mitchell (mark@markmitchell.com).
-
-   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 --git a/binutils/dyn-string.h b/binutils/dyn-string.h
deleted file mode 100644 (file)
index cbd25c3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* An abstract string datatype.
-   Copyright (C) 1998 Free Software Foundation, Inc.
-   Contributed by Mark Mitchell (mark@markmitchell.com).
-
-   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));