diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4eacf2b2f30..1604435eece 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2000-06-04 Alex Samuel + + * Makefile.in (OBJS): Remove dyn_string.o + (dyn-string.o): Delete rule. + * dyn-string.c: Delete file + * dyn-string.h: Likewise. + 2000-06-04 Kaveh R. Ghazi * Makefile.in (intl.*): Honor non-zero exit codes in the intl diff --git a/gcc/Makefile.in b/gcc/Makefile.in index be10fce1d39..b2183e5da02 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -682,18 +682,18 @@ C_AND_OBJC_OBJS = c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o \ C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS) # Language-independent object files. -OBJS = diagnostic.o \ - toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ - function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o real.o \ - builtins.o intl.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o \ - dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o \ - integrate.o jump.o cse.o loop.o unroll.o flow.o combine.o varray.o \ +OBJS = diagnostic.o \ + toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ + function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o real.o \ + builtins.o intl.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o \ + dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o \ + integrate.o jump.o cse.o loop.o unroll.o flow.o combine.o varray.o \ regclass.o regmove.o local-alloc.o global.o reload.o reload1.o caller-save.o \ - insn-peep.o reorg.o haifa-sched.o final.o recog.o reg-stack.o regrename.o \ - insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o \ - profile.o insn-attrtab.o $(out_object_file) $(EXTRA_OBJS) convert.o \ - mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o hash.o \ - predict.o lists.o ggc-common.o $(GGC) simplify-rtx.o ssa.o bb-reorder.o \ + insn-peep.o reorg.o haifa-sched.o final.o recog.o reg-stack.o regrename.o \ + insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o \ + profile.o insn-attrtab.o $(out_object_file) $(EXTRA_OBJS) convert.o \ + mbchar.o splay-tree.o graph.o sbitmap.o resource.o hash.o predict.o \ + lists.o ggc-common.o $(GGC) simplify-rtx.o ssa.o bb-reorder.o \ sibcall.o conflict.o timevar.o ifcvt.o # GEN files are listed separately, so they can be built before doing parallel @@ -1384,7 +1384,6 @@ recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) function.h $(BASIC_BLOCK_H) \ reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) $(RECOG_H) \ $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h \ varray.h function.h -dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h predict.o: predict.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \ $(RECOG_H) insn-flags.h function.h except.h $(EXPR_H) diff --git a/gcc/dyn-string.c b/gcc/dyn-string.c deleted file mode 100644 index 704629d253b..00000000000 --- a/gcc/dyn-string.c +++ /dev/null @@ -1,99 +0,0 @@ -/* An abstract string datatype. - Copyright (C) 1998, 1999 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 GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - - -#include "config.h" -#include "system.h" -#include "dyn-string.h" - -/* 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)); - - /* We need at least one byte in which to store the terminating NUL. */ - if (space == 0) - 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; - const char *s; -{ - int len = strlen (s); - - /* The new length is the old length plus the size of our string, plus - one for the null at the end. */ - dyn_string_resize (ds, ds->length + len + 1); - strcpy (ds->s + ds->length, s); - ds->length += len; - - return ds; -} - -/* Increase the capacity of DS so 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/gcc/dyn-string.h b/gcc/dyn-string.h deleted file mode 100644 index 561bff4351c..00000000000 --- a/gcc/dyn-string.h +++ /dev/null @@ -1,33 +0,0 @@ -/* An abstract string datatype. - Copyright (C) 1998, 1999, 2000 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 GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - - -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, const char*)); -extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int));