diff -c gnu/libg++/Makefile.in:1.1.1.1 gnu/libg++/Makefile.in:1.2 *** gnu/libg++/Makefile.in:1.1.1.1 Sat May 20 00:26:05 1995 --- gnu/libg++/Makefile.in Sat May 20 00:26:06 1995 *************** *** 76,82 **** CXXFLAGS = -g -O2 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates CXXFLAGS_FOR_TARGET = $(CXXFLAGS) ! LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) RANLIB = ranlib NM = nm --- 76,82 ---- CXXFLAGS = -g -O2 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates CXXFLAGS_FOR_TARGET = $(CXXFLAGS) ! LIBCXXFLAGS_FOR_TARGET = $(LIBCXXFLAGS) RANLIB = ranlib NM = nm *************** *** 233,240 **** "LEX=$(LEX)" \ "LIBCFLAGS=$(LIBCFLAGS)" \ "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ ! "LIBCXXFLAGS=$(LIBCFLAGS)" \ ! "LIBCXXFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ "M4=$(M4)" \ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ --- 233,240 ---- "LEX=$(LEX)" \ "LIBCFLAGS=$(LIBCFLAGS)" \ "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ ! "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ ! "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ "M4=$(M4)" \ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ diff -c gnu/libg++/config/mh-x86pic:1.1.1.1 gnu/libg++/config/mh-x86pic:1.2 *** gnu/libg++/config/mh-x86pic:1.1.1.1 Sat May 20 00:26:06 1995 --- gnu/libg++/config/mh-x86pic Sat May 20 00:26:06 1995 *************** *** 1,2 **** LIBCFLAGS=$(CFLAGS) -fpic ! LIBCXXFLAGS=$(CXXFLAGS) -fpic --- 1,2 ---- LIBCFLAGS=$(CFLAGS) -fpic ! LIBCXXFLAGS=$(CXXFLAGS) -fpic -fno-implicit-templates diff -c gnu/libg++/config/mt-x86pic:1.1.1.1 gnu/libg++/config/mt-x86pic:1.2 *** gnu/libg++/config/mt-x86pic:1.1.1.1 Sat May 20 00:26:06 1995 --- gnu/libg++/config/mt-x86pic Sat May 20 00:26:06 1995 *************** *** 1,2 **** LIBCFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET) -fpic ! LIBCXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET) -fpic --- 1,2 ---- LIBCFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET) -fpic ! LIBCXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET) -fpic -fno-implicit-templates diff -c gnu/libg++/libg++/Makefile.in:1.1.1.1 gnu/libg++/libg++/Makefile.in:1.2 *** gnu/libg++/libg++/Makefile.in:1.1.1.1 Sat May 20 00:26:09 1995 --- gnu/libg++/libg++/Makefile.in Sat May 20 00:26:09 1995 *************** *** 73,78 **** --- 73,80 ---- BUILD_LIBS = $(ARLIB) + RX_OBJ=../librx/rx.o + # Used to insert objects from libiberty into libg++.a. LIBIBERTY = libiberty LIBIBERTY_OBJECTS_TO_GET = `cat ../$(LIBIBERTY)/needed-list` strerror.o strsignal.o *************** *** 92,99 **** libs: $(BUILD_LIBS) ! list: $(IO_DIR)/iostream.list src/libgxx.list ../$(LIBIBERTY)/libiberty.a \ ! ../librx/rx.o -rm -f tlist touch tlist for f in `cat src/libgxx.list`; do \ --- 94,100 ---- libs: $(BUILD_LIBS) ! list: $(IO_DIR)/iostream.list src/libgxx.list ../$(LIBIBERTY)/libiberty.a $(RX_OBJ) -rm -f tlist touch tlist for f in `cat src/libgxx.list`; do \ *************** *** 105,111 **** for f in $(LIBIBERTY_OBJECTS_TO_GET); do \ echo "../$(LIBIBERTY)/$$f" >> tlist ; \ done ! echo "../librx/rx.o" >> tlist mv tlist list $(ARLIB): list --- 106,112 ---- for f in $(LIBIBERTY_OBJECTS_TO_GET); do \ echo "../$(LIBIBERTY)/$$f" >> tlist ; \ done ! echo "$(RX_OBJ)" >> tlist mv tlist list $(ARLIB): list *************** *** 116,121 **** --- 117,126 ---- $(SHLIB): list $(CXX) $(SHFLAGS) -shared -o $(SHLIB) `cat list` $(SHDEPS) + -if [ x$(LIBSO) != x$(SHLIB) ]; then \ + rm -f $(LIBSO); \ + ln -s $(SHLIB) $(LIBSO); \ + else true; fi src/libgxx.list: in-src in-src: *************** *** 131,137 **** @rootme=`pwd`/ ; export rootme ; cd ../$(LIBIBERTY) ; \ $(MAKE) $(FLAGS_TO_PASS) ! ../librx/rx.o: $(srcdir)/../librx/rx.c rootme=`pwd`/ ; export rootme ; cd ../librx; \ $(MAKE) $(FLAGS_TO_PASS) rx.o --- 136,142 ---- @rootme=`pwd`/ ; export rootme ; cd ../$(LIBIBERTY) ; \ $(MAKE) $(FLAGS_TO_PASS) ! $(RX_OBJ): $(srcdir)/../librx/rx.c rootme=`pwd`/ ; export rootme ; cd ../librx; \ $(MAKE) $(FLAGS_TO_PASS) rx.o diff -c /dev/null gnu/libg++/libg++/SHLIB.VERSION:1.4 *** /dev/null Sat May 20 00:26:09 1995 --- gnu/libg++/libg++/SHLIB.VERSION Sat May 20 00:26:09 1995 *************** *** 0 **** --- 1 ---- + 26.2.5 diff -c gnu/libg++/libg++/configure.in:1.1.1.1 gnu/libg++/libg++/configure.in:1.2 *** gnu/libg++/libg++/configure.in:1.1.1.1 Sat May 20 00:26:09 1995 --- gnu/libg++/libg++/configure.in Sat May 20 00:26:09 1995 *************** *** 106,112 **** *-dec-osf*) frags="${frags} dec-osf.ml";; *-*-hpux*) frags="${frags} hpux.ml" ;; *-*-irix5*) frags="${frags} irix5.ml" ;; ! *-*-linuxelf*) frags="${frags} elf.ml" ;; *-*-sysv4*) frags="${frags} elf.ml" ;; *-*-solaris*) frags="${frags} elfshlibm.ml" ;; *-*-sunos4*) frags="${frags} sunos4.ml" ;; --- 106,112 ---- *-dec-osf*) frags="${frags} dec-osf.ml";; *-*-hpux*) frags="${frags} hpux.ml" ;; *-*-irix5*) frags="${frags} irix5.ml" ;; ! *-*-linux*) frags="${frags} linux.ml" ;; *-*-sysv4*) frags="${frags} elf.ml" ;; *-*-solaris*) frags="${frags} elfshlibm.ml" ;; *-*-sunos4*) frags="${frags} sunos4.ml" ;; diff -c /dev/null gnu/libg++/libg++/config/linux.ml:1.1 *** /dev/null Sat May 20 00:26:11 1995 --- gnu/libg++/libg++/config/linux.ml Sat May 20 00:26:11 1995 *************** *** 0 **** --- 1,6 ---- + LIBSO = libg++.so + SHLIB = $(LIBSO).`cat $(srcdir)/SHLIB.VERSION` + SHFLAGS = -Wl,-soname,$(LIBSO).`sed -e 's/\..*//' $(srcdir)/SHLIB.VERSION` + BUILD_LIBS = $(SHLIB) + SHDEPS = -ltermcap -lcurses -lm + LIBS = -L./$(TOLIBGXX) -lg++ diff -c gnu/libg++/libg++/config/linux.mt:1.1.1.1 gnu/libg++/libg++/config/linux.mt:1.3 *** gnu/libg++/libg++/config/linux.mt:1.1.1.1 Sat May 20 00:26:12 1995 --- gnu/libg++/libg++/config/linux.mt Sat May 20 00:26:12 1995 *************** *** 10,12 **** --- 10,17 ---- G_CONFIG_ARGS = CONFIG_NM="nm -d" # Don't include iostream files in libg++.a. IO_OBJECTS_TO_GET = + # No rx.o + RX_OBJ= + + # That is where we keep the g++ header files. + gxx_includedir =$(prefix)/include/g++ diff -c gnu/libg++/libg++/etc/ADT-examples/Patricia.cc:1.1.1.1 gnu/libg++/libg++/etc/ADT-examples/Patricia.cc:1.2 *** gnu/libg++/libg++/etc/ADT-examples/Patricia.cc:1.1.1.1 Sat May 20 00:26:12 1995 --- gnu/libg++/libg++/etc/ADT-examples/Patricia.cc Sat May 20 00:26:12 1995 *************** *** 144,150 **** /* Find the first word where Bits differ, skip common prefixes. */ ! for (int first_bit_diff = 0; *cur_block == *key_block; first_bit_diff += WORD_BITS) cur_block++, key_block++; --- 144,151 ---- /* Find the first word where Bits differ, skip common prefixes. */ ! int first_bit_diff; ! for (first_bit_diff = 0; *cur_block == *key_block; first_bit_diff += WORD_BITS) cur_block++, key_block++; diff -c gnu/libg++/libg++/etc/ADT-examples/search.cc:1.1.1.1 gnu/libg++/libg++/etc/ADT-examples/search.cc:1.2 *** gnu/libg++/libg++/etc/ADT-examples/search.cc:1.1.1.1 Sat May 20 00:26:12 1995 --- gnu/libg++/libg++/etc/ADT-examples/search.cc Sat May 20 00:26:12 1995 *************** *** 190,196 **** Binary_Search Bar (Buf, Size); start_timer (); ! for (int i = 0; i < Size ; i++) if (! Bar.Is_Member (Buf [i])) cout << "bad news, buf [" << i << "] = " << Buf [i] << "!\n"; --- 190,197 ---- Binary_Search Bar (Buf, Size); start_timer (); ! int i; ! for (i = 0; i < Size ; i++) if (! Bar.Is_Member (Buf [i])) cout << "bad news, buf [" << i << "] = " << Buf [i] << "!\n"; diff -c gnu/libg++/libg++/etc/ADT-examples/tsort.cc:1.1.1.1 gnu/libg++/libg++/etc/ADT-examples/tsort.cc:1.2 *** gnu/libg++/libg++/etc/ADT-examples/tsort.cc:1.1.1.1 Sat May 20 00:26:12 1995 --- gnu/libg++/libg++/etc/ADT-examples/tsort.cc Sat May 20 00:26:12 1995 *************** *** 277,283 **** operator from the Vertex_Node class (yes, it *is* easy to abuse this technique!). */ ! for (int items = 0; !stack.empty (); items++) { node_ptr = stack.pop (); cout << node_ptr->item () << "\n"; --- 277,284 ---- operator from the Vertex_Node class (yes, it *is* easy to abuse this technique!). */ ! int items; ! for (items = 0; !stack.empty (); items++) { node_ptr = stack.pop (); cout << node_ptr->item () << "\n"; diff -c gnu/libg++/libg++/etc/lf/entry.cc:1.1.1.1 gnu/libg++/libg++/etc/lf/entry.cc:1.2 *** gnu/libg++/libg++/etc/lf/entry.cc:1.1.1.1 Sat May 20 00:26:13 1995 --- gnu/libg++/libg++/etc/lf/entry.cc Sat May 20 00:26:13 1995 *************** *** 31,37 **** /* Take care of everything but the (possibly non-existent) final row. */ ! for (int row = 0; row < nrows - 1; row++) { /* This loop is subtle, since we don't want to process too many entries.... */ --- 31,38 ---- /* Take care of everything but the (possibly non-existent) final row. */ ! int row; ! for (row = 0; row < nrows - 1; row++) { /* This loop is subtle, since we don't want to process too many entries.... */ diff -c gnu/libg++/libg++/etc/trie-gen/compact.cc:1.1.1.1 gnu/libg++/libg++/etc/trie-gen/compact.cc:1.2 *** gnu/libg++/libg++/etc/trie-gen/compact.cc:1.1.1.1 Sat May 20 00:26:13 1995 --- gnu/libg++/libg++/etc/trie-gen/compact.cc Sat May 20 00:26:13 1995 *************** *** 164,170 **** void Compact_Matrix::bucket_sort (void) { ! for (int i = 0; i < current_rows; i++) { if (max_col_count < row_vec[i].count) max_col_count = row_vec[i].count; --- 164,171 ---- void Compact_Matrix::bucket_sort (void) { ! int i; ! for (i = 0; i < current_rows; i++) { if (max_col_count < row_vec[i].count) max_col_count = row_vec[i].count; *************** *** 219,225 **** /* Process every column index in the current row. */ ! for (Column_Node *col_list = COL_LIST (row); ;) { int col = COL_INDEX (col_list); --- 220,227 ---- /* Process every column index in the current row. */ ! Column_Node *col_list; ! for (col_list = COL_LIST (row); ;) { int col = COL_INDEX (col_list); *************** *** 287,300 **** printf ("#endif\n\n"); printf ("#define YY_LAST %d\n", compressed_len); ! for (int i = 0; i < current_rows; i++) { if (max_number < row_offsets[i]) max_number = row_offsets[i]; } count = max_number; ! for (int field_width = 1; (count /= 10) > 0; field_width++) ; printf ("\nstatic const unsigned %s yy_rows[%d] = \n{\n ", --- 289,304 ---- printf ("#endif\n\n"); printf ("#define YY_LAST %d\n", compressed_len); ! int i; ! for (i = 0; i < current_rows; i++) { if (max_number < row_offsets[i]) max_number = row_offsets[i]; } count = max_number; ! int field_width; ! for (field_width = 1; (count /= 10) > 0; field_width++) ; printf ("\nstatic const unsigned %s yy_rows[%d] = \n{\n ", diff -c gnu/libg++/libg++/etc/trie-gen/options.cc:1.1.1.1 gnu/libg++/libg++/etc/trie-gen/options.cc:1.2 *** gnu/libg++/libg++/etc/trie-gen/options.cc:1.1.1.1 Sat May 20 00:26:13 1995 --- gnu/libg++/libg++/etc/trie-gen/options.cc Sat May 20 00:26:13 1995 *************** *** 49,57 **** --- 49,59 ---- fputs (option.program_name (), stderr); break; case 'e': + { typedef void (*CallbackT) (void); CallbackT callback = va_arg (args, CallbackT); (*callback) (); + } break; case 's': fputs (va_arg (args, const char *), stderr); diff -c gnu/libg++/libg++/etc/trie-gen/trie.cc:1.1.1.1 gnu/libg++/libg++/etc/trie-gen/trie.cc:1.2 *** gnu/libg++/libg++/etc/trie-gen/trie.cc:1.1.1.1 Sat May 20 00:26:14 1995 --- gnu/libg++/libg++/etc/trie-gen/trie.cc Sat May 20 00:26:14 1995 *************** *** 73,79 **** fputs (" const", stdout); fputs (" char *const word_list[] = \n{\n \"\",\n", stdout); ! for (int i = 0; i < current_size; i++) printf (" \"%s\",\n", keys[i]); fflush (stdout); --- 73,80 ---- fputs (" const", stdout); fputs (" char *const word_list[] = \n{\n \"\",\n", stdout); ! int i; ! for (i = 0; i < current_size; i++) printf (" \"%s\",\n", keys[i]); fflush (stdout); diff -c gnu/libg++/libg++/gperf/src/gen-perf.cc:1.1.1.1 gnu/libg++/libg++/gperf/src/gen-perf.cc:1.2 *** gnu/libg++/libg++/gperf/src/gen-perf.cc:1.1.1.1 Sat May 20 00:26:14 1995 --- gnu/libg++/libg++/gperf/src/gen-perf.cc Sat May 20 00:26:15 1995 *************** *** 293,299 **** Bool_Array::init (buffer, max_hash_value + 1); ! for (List_Node *curr = head; curr; curr = curr->next) { hash (curr); --- 293,300 ---- Bool_Array::init (buffer, max_hash_value + 1); ! List_Node *curr; ! for (curr = head; curr; curr = curr->next) { hash (curr); diff -c gnu/libg++/libg++/gperf/src/key-list.cc:1.1.1.1 gnu/libg++/libg++/gperf/src/key-list.cc:1.2 *** gnu/libg++/libg++/gperf/src/key-list.cc:1.1.1.1 Sat May 20 00:26:15 1995 --- gnu/libg++/libg++/gperf/src/key-list.cc Sat May 20 00:26:15 1995 *************** *** 424,430 **** Key_List::reorder (void) { T (Trace t ("Key_List::reorder");) ! for (List_Node *ptr = head; ptr; ptr = ptr->next) ptr->occurrence = get_occurrence (ptr); occurrence_sort = !(hash_sort = 0); /* Pretty gross, eh?! */ --- 424,431 ---- Key_List::reorder (void) { T (Trace t ("Key_List::reorder");) ! List_Node *ptr; ! for (ptr = head; ptr; ptr = ptr->next) ptr->occurrence = get_occurrence (ptr); occurrence_sort = !(hash_sort = 0); /* Pretty gross, eh?! */ *************** *** 464,470 **** Key_List::output_min_max () { T (Trace t ("Key_List::output_min_max");) ! for (List_Node *temp = head; temp->next; temp = temp->next) ; min_hash_value = head->hash_value; --- 465,472 ---- Key_List::output_min_max () { T (Trace t ("Key_List::output_min_max");) ! List_Node *temp; ! for (temp = head; temp->next; temp = temp->next) ; min_hash_value = head->hash_value; *************** *** 696,702 **** /* Skip over leading blank entries if there are no duplicates. */ printf (" "); ! for (int column = 1; index < head->hash_value; index++, column++) printf ("%s\"\",%s %s", l_brace, r_brace, column % 9 ? "" : "\n "); if (column % 10) printf ("\n"); --- 698,705 ---- /* Skip over leading blank entries if there are no duplicates. */ printf (" "); ! int column; ! for (column = 1; index < head->hash_value; index++, column++) printf ("%s\"\",%s %s", l_brace, r_brace, column % 9 ? "" : "\n "); if (column % 10) printf ("\n"); *************** *** 946,952 **** dup_ptr - duplicates, dup_ptr->hash_value, dup_ptr->index, dup_ptr->count); /* Start searching for available space towards the right part of the lookup array. */ ! for (int i = dup_ptr->hash_value; i < max_hash_value; i++) if (lookup_array[i] == DEFAULT_VALUE && lookup_array[i + 1] == DEFAULT_VALUE) { lookup_array[i] = -dup_ptr->index; --- 949,956 ---- dup_ptr - duplicates, dup_ptr->hash_value, dup_ptr->index, dup_ptr->count); /* Start searching for available space towards the right part of the lookup array. */ ! int i; ! for (i = dup_ptr->hash_value; i < max_hash_value; i++) if (lookup_array[i] == DEFAULT_VALUE && lookup_array[i + 1] == DEFAULT_VALUE) { lookup_array[i] = -dup_ptr->index; diff -c gnu/libg++/libg++/src/ACG.cc:1.1.1.1 gnu/libg++/libg++/src/ACG.cc:1.2 *** gnu/libg++/libg++/src/ACG.cc:1.1.1.1 Sat May 20 00:26:16 1995 --- gnu/libg++/libg++/src/ACG.cc Sat May 20 00:26:16 1995 *************** *** 188,194 **** // Determine the size of the state table // ! for (register int l = 0; randomStateTable[l][0] != -1 && randomStateTable[l][1] < size; l++); --- 188,195 ---- // Determine the size of the state table // ! register int l; ! for (l = 0; randomStateTable[l][0] != -1 && randomStateTable[l][1] < size; l++); diff -c gnu/libg++/libg++/src/CursesW.cc:1.1.1.1 gnu/libg++/libg++/src/CursesW.cc:1.2 *** gnu/libg++/libg++/src/CursesW.cc:1.1.1.1 Sat May 20 00:26:16 1995 --- gnu/libg++/libg++/src/CursesW.cc Sat May 20 00:26:16 1995 *************** *** 27,32 **** --- 27,36 ---- // because curses.h defines a clear macro that conflicts with iostream. Sigh. #include + #ifndef OK + #define OK (1) + #endif + #if _G_HAVE_CURSES int CursesWindow::count = 0; diff -c gnu/libg++/libg++/src/Fix.cc:1.1.1.1 gnu/libg++/libg++/src/Fix.cc:1.2 *** gnu/libg++/libg++/src/Fix.cc:1.1.1.1 Sat May 20 00:26:16 1995 --- gnu/libg++/libg++/src/Fix.cc Sat May 20 00:26:16 1995 *************** *** 247,253 **** longer = y, shorter = x; if ( r == NULL ) r = new_Fix(longer->len); ! for ( int i=r->siz-1; i >= longer->siz; i-- ) r->s[i] = 0; for ( ; i >= shorter->siz; i-- ) r->s[i] = longer->s[i]; --- 247,254 ---- longer = y, shorter = x; if ( r == NULL ) r = new_Fix(longer->len); ! int i; ! for ( i=r->siz-1; i >= longer->siz; i-- ) r->s[i] = 0; for ( ; i >= shorter->siz; i-- ) r->s[i] = longer->s[i]; *************** *** 274,280 **** longer = y, shorter = x; if ( r == NULL ) r = new_Fix(longer->len); ! for ( int i=r->siz-1; i >= longer->siz; i-- ) r->s[i] = 0; for ( ; i >= shorter->siz; i-- ) r->s[i] = (longer == x ? x->s[i] : -y->s[i]); --- 275,282 ---- longer = y, shorter = x; if ( r == NULL ) r = new_Fix(longer->len); ! int i; ! for ( i=r->siz-1; i >= longer->siz; i-- ) r->s[i] = 0; for ( ; i >= shorter->siz; i-- ) r->s[i] = (longer == x ? x->s[i] : -y->s[i]); *************** *** 303,309 **** x = negate(x,X.rep); if ( ysign ) y = negate(y,Y.rep); ! for ( int i=0; i < r->siz; i++ ) r->s[i] = 0; for ( i=x->siz-1; i >= 0; i-- ) { --- 305,312 ---- x = negate(x,X.rep); if ( ysign ) y = negate(y,Y.rep); ! int i; ! for ( i=0; i < r->siz; i++ ) r->s[i] = 0; for ( i=x->siz-1; i >= 0; i-- ) { *************** *** 331,341 **** Fix::Rep* Fix::multiply(const Rep* x, int y, Rep* r) { if ( y != (_G_int16_t )y ) range_error("multiply by int -- int too large"); if ( r == NULL ) r = new_Fix(x->len); ! for ( int i=r->siz-1; i >= x->siz; i-- ) r->s[i] = 0; _G_int32_t a, carry = 0; for ( ; i > 0; i-- ) --- 334,345 ---- Fix::Rep* Fix::multiply(const Rep* x, int y, Rep* r) { + int i; if ( y != (_G_int16_t )y ) range_error("multiply by int -- int too large"); if ( r == NULL ) r = new_Fix(x->len); ! for ( i=r->siz-1; i >= x->siz; i-- ) r->s[i] = 0; _G_int32_t a, carry = 0; for ( ; i > 0; i-- ) *************** *** 449,455 **** int xr = 16 - xl; _G_uint16_t xrmask = 0xffffL >> xr; ! for ( int i=0; i < ilow; i++, rs+=u, xsl+=u, xsr+=u ) *rs = 0; for ( ; i < ihigh; i++, rs+=u, xsl+=u, xsr+=u ) *rs = (*xsl << xl) + ((*xsr >> xr) & xrmask); --- 453,460 ---- int xr = 16 - xl; _G_uint16_t xrmask = 0xffffL >> xr; ! int i; ! for ( i=0; i < ilow; i++, rs+=u, xsl+=u, xsr+=u ) *rs = 0; for ( ; i < ihigh; i++, rs+=u, xsl+=u, xsr+=u ) *rs = (*xsl << xl) + ((*xsr >> xr) & xrmask); *************** *** 466,472 **** if ( r == NULL ) r = new_Fix(x->len); _G_uint32_t carry = 1; ! for ( int i=r->siz-1; i >= x->siz; i-- ) r->s[i] = 0; for ( ; i >= 0; i-- ) { --- 471,478 ---- if ( r == NULL ) r = new_Fix(x->len); _G_uint32_t carry = 1; ! int i; ! for ( i=r->siz-1; i >= x->siz; i-- ) r->s[i] = 0; for ( ; i >= 0; i-- ) { diff -c gnu/libg++/libg++/src/Fix.h:1.1.1.1 gnu/libg++/libg++/src/Fix.h:1.2 *** gnu/libg++/libg++/src/Fix.h:1.1.1.1 Sat May 20 00:26:16 1995 --- gnu/libg++/libg++/src/Fix.h Sat May 20 00:26:16 1995 *************** *** 193,199 **** _G_uint16_t *ts = to->s; const _G_uint16_t *fs = from->s; int ilim = to->siz < from->siz ? to->siz : from->siz; ! for ( int i=0; i < ilim; i++ ) *ts++ = *fs++; for ( ; i < to->siz; i++ ) *ts++ = 0; --- 193,200 ---- _G_uint16_t *ts = to->s; const _G_uint16_t *fs = from->s; int ilim = to->siz < from->siz ? to->siz : from->siz; ! int i; ! for ( i=0; i < ilim; i++ ) *ts++ = *fs++; for ( ; i < to->siz; i++ ) *ts++ = 0; diff -c gnu/libg++/libg++/src/Integer.cc:1.1.1.1 gnu/libg++/libg++/src/Integer.cc:1.2 *** gnu/libg++/libg++/src/Integer.cc:1.1.1.1 Sat May 20 00:26:16 1995 --- gnu/libg++/libg++/src/Integer.cc Sat May 20 00:26:16 1995 *************** *** 1749,1759 **** long k = 0; int l = (ul <= vl)? ul : vl; int cont = 1; ! for (int i = 0; i < l && cont; ++i) { unsigned long a = (i < ul)? u->s[i] : 0; unsigned long b = (i < vl)? v->s[i] : 0; ! for (int j = 0; j < I_SHIFT; ++j) { if ((a | b) & 1) { --- 1749,1760 ---- long k = 0; int l = (ul <= vl)? ul : vl; int cont = 1; ! int i, j; ! for (i = 0; i < l && cont; ++i) { unsigned long a = (i < ul)? u->s[i] : 0; unsigned long b = (i < vl)? v->s[i] : 0; ! for (j = 0; j < I_SHIFT; ++j) { if ((a | b) & 1) { *************** *** 1789,1795 **** for (i = 0; i < tl && cont; ++i) { unsigned long a = t->s[i]; ! for (int j = 0; j < I_SHIFT; ++j) { if (a & 1) { --- 1790,1796 ---- for (i = 0; i < tl && cont; ++i) { unsigned long a = t->s[i]; ! for (j = 0; j < I_SHIFT; ++j) { if (a & 1) { diff -c gnu/libg++/libg++/src/Obstack.cc:1.1.1.1 gnu/libg++/libg++/src/Obstack.cc:1.2 *** gnu/libg++/libg++/src/Obstack.cc:1.1.1.1 Sat May 20 00:26:17 1995 --- gnu/libg++/libg++/src/Obstack.cc Sat May 20 00:26:17 1995 *************** *** 98,104 **** int Obstack::contains(void* obj) // true if obj somewhere in Obstack { ! for (_obstack_chunk* ch = chunk; ch != 0 && (obj < (void*)ch || obj >= (void*)(ch->limit)); ch = ch->prev); --- 98,106 ---- int Obstack::contains(void* obj) // true if obj somewhere in Obstack { ! _obstack_chunk *ch; ! ! for (ch = chunk; ch != 0 && (obj < (void*)ch || obj >= (void*)(ch->limit)); ch = ch->prev); diff -c gnu/libg++/libg++/src/String.cc:1.1.1.1 gnu/libg++/libg++/src/String.cc:1.2 *** gnu/libg++/libg++/src/String.cc:1.1.1.1 Sat May 20 00:26:17 1995 --- gnu/libg++/libg++/src/String.cc Sat May 20 00:26:17 1995 *************** *** 979,985 **** RETURN_OBJECT(String,x) String sep = separator; int xlen = 0; ! for (int i = 0; i < n; ++i) xlen += src[i].length(); xlen += (n - 1) * sep.length(); --- 979,986 ---- RETURN_OBJECT(String,x) String sep = separator; int xlen = 0; ! int i; ! for (i = 0; i < n; ++i) xlen += src[i].length(); xlen += (n - 1) * sep.length(); *************** *** 1106,1112 **** const char* topx = &(xchars[x.length()]); const char* ys = &(ychars[startpos]); const char* topy = &(ychars[y.length()]); ! for (int l = 0; xs < topx && ys < topy && *xs++ == *ys++; ++l); r.rep = Salloc(r.rep, ss, l, l); } --- 1107,1114 ---- const char* topx = &(xchars[x.length()]); const char* ys = &(ychars[startpos]); const char* topy = &(ychars[y.length()]); ! int l; ! for (l = 0; xs < topx && ys < topy && *xs++ == *ys++; ++l); r.rep = Salloc(r.rep, ss, l, l); } *************** *** 1118,1124 **** const char* botx = xchars; const char* ys = &(ychars[y.length() + startpos]); const char* boty = ychars; ! for (int l = 0; xs >= botx && ys >= boty && *xs == *ys ; --xs, --ys, ++l); r.rep = Salloc(r.rep, ++xs, l, l); } --- 1120,1127 ---- const char* botx = xchars; const char* ys = &(ychars[y.length() + startpos]); const char* boty = ychars; ! int l; ! for (l = 0; xs >= botx && ys >= boty && *xs == *ys ; --xs, --ys, ++l); r.rep = Salloc(r.rep, ++xs, l, l); } *************** *** 1159,1165 **** const char* topx = &(xchars[x.length()]); const char* ys = &(ychars[startpos]); const char* topy = &(ychars[y.length()]); ! for (int l = 0; xs < topx && ys < topy && *xs++ == *ys++; ++l); r.rep = Salloc(r.rep, ss, l, l); return r; } --- 1162,1169 ---- const char* topx = &(xchars[x.length()]); const char* ys = &(ychars[startpos]); const char* topy = &(ychars[y.length()]); ! int l; ! for (l = 0; xs < topx && ys < topy && *xs++ == *ys++; ++l); r.rep = Salloc(r.rep, ss, l, l); return r; } *************** *** 1173,1179 **** const char* botx = xchars; const char* ys = &(ychars[y.length() + startpos]); const char* boty = ychars; ! for (int l = 0; xs >= botx && ys >= boty && *xs == *ys ; --xs, --ys, ++l); r.rep = Salloc(r.rep, ++xs, l, l); return r; } --- 1177,1184 ---- const char* botx = xchars; const char* ys = &(ychars[y.length() + startpos]); const char* boty = ychars; ! int l; ! for (l = 0; xs >= botx && ys >= boty && *xs == *ys ; --xs, --ys, ++l); r.rep = Salloc(r.rep, ++xs, l, l); return r; } diff -c gnu/libg++/libg++/src/configure.in:1.1.1.1 gnu/libg++/libg++/src/configure.in:1.2 *** gnu/libg++/libg++/src/configure.in:1.1.1.1 Sat May 20 00:26:17 1995 --- gnu/libg++/libg++/src/configure.in Sat May 20 00:26:17 1995 *************** *** 22,29 **** (. ${srcdir}/../config.shared) >${package_makefile_frag} ! files=../../librx/rx.h ! links=rx.h # post-target: --- 22,35 ---- (. ${srcdir}/../config.shared) >${package_makefile_frag} ! case "${target}" in ! *-*-linux*) ! ;; ! *) ! files=../../librx/rx.h ! links=rx.h ! ;; ! esac # post-target: diff -c gnu/libg++/libg++/src/gen/CHBag.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/CHBag.ccP:1.2 *** gnu/libg++/libg++/src/gen/CHBag.ccP:1.1.1.1 Sat May 20 00:26:18 1995 --- gnu/libg++/libg++/src/gen/CHBag.ccP Sat May 20 00:26:18 1995 *************** *** 200,206 **** int n = 0; for (unsigned int i = 0; i < size; ++i) { ! for (CHNode* p = tab[i]; goodCHptr(p); p = p->tl) ++n; v &= CHptr_to_index(p) == i + 1; } v &= count == n; --- 200,207 ---- int n = 0; for (unsigned int i = 0; i < size; ++i) { ! CHNode* p; ! for (p = tab[i]; goodCHptr(p); p = p->tl) ++n; v &= CHptr_to_index(p) == i + 1; } v &= count == n; diff -c gnu/libg++/libg++/src/gen/CHMap.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/CHMap.ccP:1.2 *** gnu/libg++/libg++/src/gen/CHMap.ccP:1.1.1.1 Sat May 20 00:26:18 1995 --- gnu/libg++/libg++/src/gen/CHMap.ccP Sat May 20 00:26:18 1995 *************** *** 74,80 **** { unsigned int h = HASH(item) % size; ! for (CHNode* t = tab[h]; goodCHptr(t); t = t->tl) if (EQ(item, t->hd)) return t->cont; --- 74,81 ---- { unsigned int h = HASH(item) % size; ! CHNode* t; ! for (t = tab[h]; goodCHptr(t); t = t->tl) if (EQ(item, t->hd)) return t->cont; *************** *** 157,163 **** int n = 0; for (unsigned int i = 0; i < size; ++i) { ! for (CHNode* p = tab[i]; goodCHptr(p); p = p->tl) ++n; v &= CHptr_to_index(p) == i + 1; } v &= count == n; --- 158,165 ---- int n = 0; for (unsigned int i = 0; i < size; ++i) { ! CHNode* p; ! for (p = tab[i]; goodCHptr(p); p = p->tl) ++n; v &= CHptr_to_index(p) == i + 1; } v &= count == n; diff -c gnu/libg++/libg++/src/gen/CHSet.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/CHSet.ccP:1.2 *** gnu/libg++/libg++/src/gen/CHSet.ccP:1.1.1.1 Sat May 20 00:26:18 1995 --- gnu/libg++/libg++/src/gen/CHSet.ccP Sat May 20 00:26:18 1995 *************** *** 87,93 **** { unsigned int h = HASH(item) % size; ! for (CHNode* t = tab[h]; goodCHptr(t); t = t->tl) if (EQ(item, t->hd)) return Pix(t); --- 87,94 ---- { unsigned int h = HASH(item) % size; ! CHNode* t; ! for (t = tab[h]; goodCHptr(t); t = t->tl) if (EQ(item, t->hd)) return Pix(t); *************** *** 171,177 **** else { CHNode* p; ! for (unsigned int i = 0; i < size; ++i) for (p = tab[i]; goodCHptr(p); p = p->tl) if (b.seek(p->hd) == 0) return 0; --- 172,179 ---- else { CHNode* p; ! unsigned int i; ! for (i = 0; i < size; ++i) for (p = tab[i]; goodCHptr(p); p = p->tl) if (b.seek(p->hd) == 0) return 0; *************** *** 262,268 **** int n = 0; for (unsigned int i = 0; i < size; ++i) { ! for (CHNode* p = tab[i]; goodCHptr(p); p = p->tl) ++n; v &= CHptr_to_index(p) == i + 1; } v &= count == n; --- 264,271 ---- int n = 0; for (unsigned int i = 0; i < size; ++i) { ! CHNode* p; ! for (p = tab[i]; goodCHptr(p); p = p->tl) ++n; v &= CHptr_to_index(p) == i + 1; } v &= count == n; diff -c gnu/libg++/libg++/src/gen/List.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/List.ccP:1.2 *** gnu/libg++/libg++/src/gen/List.ccP:1.1.1.1 Sat May 20 00:26:18 1995 --- gnu/libg++/libg++/src/gen/List.ccP Sat May 20 00:26:19 1995 *************** *** 63,69 **** List List::nth(int n) { ! for (ListNode* p = P; n-- > 0; p = p->tl); reference(p); return List(p); } --- 63,70 ---- List List::nth(int n) { ! ListNode* p; ! for (p = P; n-- > 0; p = p->tl); reference(p); return List(p); } *************** *** 99,105 **** & List::operator [] (int n) { ! for (ListNode* p = P; n-- > 0; p = p->tl); return (p->hd); } --- 100,107 ---- & List::operator [] (int n) { ! ListNode* p; ! for (p = P; n-- > 0; p = p->tl); return (p->hd); } diff -c gnu/libg++/libg++/src/gen/MPlex.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/MPlex.ccP:1.2 *** gnu/libg++/libg++/src/gen/MPlex.ccP:1.1.1.1 Sat May 20 00:26:19 1995 --- gnu/libg++/libg++/src/gen/MPlex.ccP Sat May 20 00:26:19 1995 *************** *** 597,603 **** if (unused == 0) return add_high(elem); ! for(MChunk* t = ch; t->unused_indices() == 0; t = (MChunk*)(t->prev())) ; --- 597,604 ---- if (unused == 0) return add_high(elem); ! MChunk* t; ! for(t = ch; t->unused_indices() == 0; t = (MChunk*)(t->prev())) ; *************** *** 613,619 **** { if (unused == 0) index_error(); ! for(MChunk* t = ch; t->unused_indices() == 0; t = (MChunk*)(t->prev())) ; --- 614,621 ---- { if (unused == 0) index_error(); ! MChunk* t; ! for(t = ch; t->unused_indices() == 0; t = (MChunk*)(t->prev())) ; *************** *** 626,632 **** { if (unused == 0) return 0; ! for(MChunk* t = ch; t->unused_indices() == 0; t = (MChunk*)(t->prev())) ; --- 628,635 ---- { if (unused == 0) return 0; ! MChunk* t; ! for(t = ch; t->unused_indices() == 0; t = (MChunk*)(t->prev())) ; diff -c gnu/libg++/libg++/src/gen/Map.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/Map.ccP:1.2 *** gnu/libg++/libg++/src/gen/Map.ccP:1.1.1.1 Sat May 20 00:26:19 1995 --- gnu/libg++/libg++/src/gen/Map.ccP Sat May 20 00:26:19 1995 *************** *** 25,31 **** Pix Map::seek( item) { ! for (Pix i = first(); i != 0 && !(EQ(key(i), item)); next(i)); return i; } --- 25,32 ---- Pix Map::seek( item) { ! Pix i; ! for (i = first(); i != 0 && !(EQ(key(i), item)); next(i)); return i; } diff -c gnu/libg++/libg++/src/gen/PHPQ.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/PHPQ.ccP:1.2 *** gnu/libg++/libg++/src/gen/PHPQ.ccP:1.1.1.1 Sat May 20 00:26:19 1995 --- gnu/libg++/libg++/src/gen/PHPQ.ccP Sat May 20 00:26:19 1995 *************** *** 85,91 **** else { PHPQNode* newstor = new PHPQNode[newsize]; ! for (int i = 1; i < size; ++i) newstor[i] = storage[i]; delete [] storage; storage = newstor; --- 85,92 ---- else { PHPQNode* newstor = new PHPQNode[newsize]; ! int i; ! for (i = 1; i < size; ++i) newstor[i] = storage[i]; delete [] storage; storage = newstor; diff -c gnu/libg++/libg++/src/gen/PQ.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/PQ.ccP:1.2 *** gnu/libg++/libg++/src/gen/PQ.ccP:1.1.1.1 Sat May 20 00:26:19 1995 --- gnu/libg++/libg++/src/gen/PQ.ccP Sat May 20 00:26:19 1995 *************** *** 33,39 **** Pix PQ::seek( item) { ! for (Pix i = first(); i != 0 && !(EQ((*this)(i), item)); next(i)); return i; } --- 33,40 ---- Pix PQ::seek( item) { ! Pix i; ! for (i = first(); i != 0 && !(EQ((*this)(i), item)); next(i)); return i; } diff -c gnu/libg++/libg++/src/gen/SLSet.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/SLSet.ccP:1.2 *** gnu/libg++/libg++/src/gen/SLSet.ccP:1.1.1.1 Sat May 20 00:26:19 1995 --- gnu/libg++/libg++/src/gen/SLSet.ccP Sat May 20 00:26:19 1995 *************** *** 31,37 **** Pix SLSet::seek( item) { ! for (Pix i = p.first(); i != 0 && !EQ(p(i),item); p.next(i)); return i; } --- 31,38 ---- Pix SLSet::seek( item) { ! Pix i; ! for (i = p.first(); i != 0 && !EQ(p(i),item); p.next(i)); return i; } diff -c gnu/libg++/libg++/src/gen/Set.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/Set.ccP:1.2 *** gnu/libg++/libg++/src/gen/Set.ccP:1.1.1.1 Sat May 20 00:26:19 1995 --- gnu/libg++/libg++/src/gen/Set.ccP Sat May 20 00:26:19 1995 *************** *** 25,31 **** Pix Set::seek( item) { ! for (Pix i = first(); i != 0 && !(EQ((*this)(i), item)); next(i)); return i; } --- 25,32 ---- Pix Set::seek( item) { ! Pix i; ! for (i = first(); i != 0 && !(EQ((*this)(i), item)); next(i)); return i; } diff -c gnu/libg++/libg++/src/gen/VHBag.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/VHBag.ccP:1.2 *** gnu/libg++/libg++/src/gen/VHBag.ccP:1.1.1.1 Sat May 20 00:26:20 1995 --- gnu/libg++/libg++/src/gen/VHBag.ccP Sat May 20 00:26:20 1995 *************** *** 219,225 **** unsigned int oldsize = size; tab = new [size = newsize]; status = new char[size]; ! for (unsigned int i = 0; i < size; ++i) status[i] = EMPTYCELL; count = 0; for (i = 0; i < oldsize; ++i) if (oldstatus[i] == VALIDCELL) add(oldtab[i]); delete [] oldtab; --- 219,226 ---- unsigned int oldsize = size; tab = new [size = newsize]; status = new char[size]; ! unsigned int i; ! for (i = 0; i < size; ++i) status[i] = EMPTYCELL; count = 0; for (i = 0; i < oldsize; ++i) if (oldstatus[i] == VALIDCELL) add(oldtab[i]); delete [] oldtab; diff -c gnu/libg++/libg++/src/gen/VHMap.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/VHMap.ccP:1.2 *** gnu/libg++/libg++/src/gen/VHMap.ccP:1.1.1.1 Sat May 20 00:26:20 1995 --- gnu/libg++/libg++/src/gen/VHMap.ccP Sat May 20 00:26:20 1995 *************** *** 162,168 **** tab = new [size = newsize]; cont = new [size]; status = new char[size]; ! for (unsigned int i = 0; i < size; ++i) status[i] = EMPTYCELL; count = 0; for (i = 0; i < oldsize; ++i) if (oldstatus[i] == VALIDCELL) --- 162,169 ---- tab = new [size = newsize]; cont = new [size]; status = new char[size]; ! unsigned int i; ! for (i = 0; i < size; ++i) status[i] = EMPTYCELL; count = 0; for (i = 0; i < oldsize; ++i) if (oldstatus[i] == VALIDCELL) diff -c gnu/libg++/libg++/src/gen/VHSet.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/VHSet.ccP:1.2 *** gnu/libg++/libg++/src/gen/VHSet.ccP:1.1.1.1 Sat May 20 00:26:20 1995 --- gnu/libg++/libg++/src/gen/VHSet.ccP Sat May 20 00:26:20 1995 *************** *** 156,162 **** unsigned int oldsize = size; tab = new [size = newsize]; status = new char[size]; ! for (unsigned int i = 0; i < size; ++i) status[i] = EMPTYCELL; count = 0; for (i = 0; i < oldsize; ++i) if (oldstatus[i] == VALIDCELL) add(oldtab[i]); delete [] oldtab; --- 156,163 ---- unsigned int oldsize = size; tab = new [size = newsize]; status = new char[size]; ! unsigned int i; ! for (i = 0; i < size; ++i) status[i] = EMPTYCELL; count = 0; for (i = 0; i < oldsize; ++i) if (oldstatus[i] == VALIDCELL) add(oldtab[i]); delete [] oldtab; *************** *** 189,195 **** return 0; else { ! for (unsigned int i = 0; i < size; ++i) if (status[i] == VALIDCELL && b.seek(tab[i]) == 0) return 0; for (i = 0; i < b.size; ++i) --- 190,197 ---- return 0; else { ! unsigned int i; ! for (i = 0; i < size; ++i) if (status[i] == VALIDCELL && b.seek(tab[i]) == 0) return 0; for (i = 0; i < b.size; ++i) diff -c gnu/libg++/libg++/src/gen/VOHSet.ccP:1.1.1.1 gnu/libg++/libg++/src/gen/VOHSet.ccP:1.2 *** gnu/libg++/libg++/src/gen/VOHSet.ccP:1.1.1.1 Sat May 20 00:26:20 1995 --- gnu/libg++/libg++/src/gen/VOHSet.ccP Sat May 20 00:26:20 1995 *************** *** 191,197 **** int oldsize = size; tab = new [size = newsize]; status = new char[size]; ! for (int i = 0; i < size; ++i) status[i] = EMPTYCELL; count = cnt = 0; for (i = 0; i < oldsize; ++i) if (oldstatus[i] == VALIDCELL) add(oldtab[i]); --- 191,198 ---- int oldsize = size; tab = new [size = newsize]; status = new char[size]; ! int i; ! for (i = 0; i < size; ++i) status[i] = EMPTYCELL; count = cnt = 0; for (i = 0; i < oldsize; ++i) if (oldstatus[i] == VALIDCELL) add(oldtab[i]); *************** *** 226,232 **** return 0; else { ! for (int i = 0; i < size; ++i) if (status[i] == VALIDCELL && b.seek(tab[i]) == 0) return 0; for (i = 0; i < b.size; ++i) --- 227,234 ---- return 0; else { ! int i; ! for (i = 0; i < size; ++i) if (status[i] == VALIDCELL && b.seek(tab[i]) == 0) return 0; for (i = 0; i < b.size; ++i) diff -c gnu/libg++/libg++/tests/tBag.cc:1.1.1.1 gnu/libg++/libg++/tests/tBag.cc:1.2 *** gnu/libg++/libg++/tests/tBag.cc:1.1.1.1 Sat May 20 00:26:20 1995 --- gnu/libg++/libg++/tests/tBag.cc Sat May 20 00:26:21 1995 *************** *** 68,74 **** int maxprint = 20; cout << "["; int k = 0; ! for (Pix i = a.first(); i != 0 && k < maxprint; a.next(i),++k) cout << a(i) << " "; if (i != 0) cout << "...]\n"; else cout << "]\n"; --- 68,75 ---- int maxprint = 20; cout << "["; int k = 0; ! Pix i; ! for (i = a.first(); i != 0 && k < maxprint; a.next(i),++k) cout << a(i) << " "; if (i != 0) cout << "...]\n"; else cout << "]\n"; *************** *** 79,85 **** { c.clear(); assert(c.empty()); ! for (Pix k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); --- 80,87 ---- { c.clear(); assert(c.empty()); ! Pix k; ! for (k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); *************** *** 106,112 **** intXPBag a(SIZE); add(nums, a); assert(a.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); intXPBag b(SIZE); add(odds, b); assert(b.length() == SIZE); --- 108,115 ---- intXPBag a(SIZE); add(nums, a); assert(a.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); intXPBag b(SIZE); add(odds, b); assert(b.length() == SIZE); *************** *** 132,138 **** c.clear(); assert(c.empty()); ! for (Pix k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); --- 135,142 ---- c.clear(); assert(c.empty()); ! Pix k; ! for (k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); *************** *** 162,168 **** intSLBag a; add(nums, a); assert(a.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); intSLBag b; add(odds, b); assert(b.length() == SIZE); --- 166,173 ---- intSLBag a; add(nums, a); assert(a.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); intSLBag b; add(odds, b); assert(b.length() == SIZE); *************** *** 188,194 **** c.clear(); assert(c.empty()); ! for (Pix k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); --- 193,200 ---- c.clear(); assert(c.empty()); ! Pix k; ! for (k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); *************** *** 218,224 **** intVHBag a(SIZE); add(nums, a); assert(a.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); intVHBag b(SIZE); add(odds, b); assert(b.length() == SIZE); --- 224,231 ---- intVHBag a(SIZE); add(nums, a); assert(a.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); intVHBag b(SIZE); add(odds, b); assert(b.length() == SIZE); *************** *** 244,249 **** --- 251,257 ---- c.clear(); assert(c.empty()); + Pix k; for (Pix k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); *************** *** 273,279 **** intCHBag a(SIZE); add(nums, a); assert(a.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); intCHBag b(SIZE); add(odds, b); assert(b.length() == SIZE); --- 281,288 ---- intCHBag a(SIZE); add(nums, a); assert(a.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); intCHBag b(SIZE); add(odds, b); assert(b.length() == SIZE); *************** *** 299,305 **** c.clear(); assert(c.empty()); ! for (Pix k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); --- 308,315 ---- c.clear(); assert(c.empty()); ! Pix k; ! for (k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); *************** *** 328,334 **** intOXPBag a(SIZE); add(nums, a); assert(a.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); intOXPBag b(SIZE); add(odds, b); assert(b.length() == SIZE); --- 338,345 ---- intOXPBag a(SIZE); add(nums, a); assert(a.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); intOXPBag b(SIZE); add(odds, b); assert(b.length() == SIZE); *************** *** 354,360 **** c.clear(); assert(c.empty()); ! for (Pix k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); --- 365,372 ---- c.clear(); assert(c.empty()); ! Pix k; ! for (k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); *************** *** 384,390 **** intOSLBag a; add(nums, a); assert(a.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); intOSLBag b; add(odds, b); assert(b.length() == SIZE); --- 396,403 ---- intOSLBag a; add(nums, a); assert(a.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); intOSLBag b; add(odds, b); assert(b.length() == SIZE); *************** *** 410,416 **** c.clear(); assert(c.empty()); ! for (Pix k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); --- 423,430 ---- c.clear(); assert(c.empty()); ! Pix k; ! for (k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); *************** *** 439,445 **** intSplayBag a; add(nums, a); assert(a.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); intSplayBag b; add(odds, b); assert(b.length() == SIZE); --- 453,460 ---- intSplayBag a; add(nums, a); assert(a.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); intSplayBag b; add(odds, b); assert(b.length() == SIZE); *************** *** 465,471 **** c.clear(); assert(c.empty()); ! for (Pix k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); --- 480,487 ---- c.clear(); assert(c.empty()); ! Pix k; ! for (k = a.first(); k != 0; a.next(k)) c.add(a(k)); for (k = a.first(); k != 0; a.next(k)) assert(c.contains(a(k))); c.del(a(a.first())); Pix i = a.first(); diff -c gnu/libg++/libg++/tests/tBitSet.cc:1.1.1.1 gnu/libg++/libg++/tests/tBitSet.cc:1.2 *** gnu/libg++/libg++/tests/tBitSet.cc:1.1.1.1 Sat May 20 00:26:21 1995 --- gnu/libg++/libg++/tests/tBitSet.cc Sat May 20 00:26:21 1995 *************** *** 89,95 **** assert(c[i] == 1); assert(c[i+1] == 0); } ! for (int p = 0; p < 5; ++p) cout << "c[" << p << "] =" << int(c[p]) << "\n"; BitSet d = atoBitSet("0011001100110011001100110011001100110011"); --- 89,96 ---- assert(c[i] == 1); assert(c[i+1] == 0); } ! int p; ! for (p = 0; p < 5; ++p) cout << "c[" << p << "] =" << int(c[p]) << "\n"; BitSet d = atoBitSet("0011001100110011001100110011001100110011"); diff -c gnu/libg++/libg++/tests/tBitString.cc:1.1.1.1 gnu/libg++/libg++/tests/tBitString.cc:1.2 *** gnu/libg++/libg++/tests/tBitString.cc:1.1.1.1 Sat May 20 00:26:21 1995 --- gnu/libg++/libg++/tests/tBitString.cc Sat May 20 00:26:21 1995 *************** *** 226,232 **** } cout << "bits in e:\n"; ! for (int p = e.first(); p >= 0; p = e.next(p)) { assert(e[p] == 1); cout << p << " "; --- 226,233 ---- } cout << "bits in e:\n"; ! int p; ! for (p = e.first(); p >= 0; p = e.next(p)) { assert(e[p] == 1); cout << p << " "; diff -c gnu/libg++/libg++/tests/tDeque.cc:1.1.1.1 gnu/libg++/libg++/tests/tDeque.cc:1.2 *** gnu/libg++/libg++/tests/tDeque.cc:1.1.1.1 Sat May 20 00:26:21 1995 --- gnu/libg++/libg++/tests/tDeque.cc Sat May 20 00:26:21 1995 *************** *** 42,48 **** { intXPDeque d(SIZE); assert(d.OK()); ! for (int i = 0; i < SIZE; ++i) { if (i % 2 == 0) d.enq(i); --- 42,49 ---- { intXPDeque d(SIZE); assert(d.OK()); ! int i; ! for (i = 0; i < SIZE; ++i) { if (i % 2 == 0) d.enq(i); *************** *** 97,103 **** { intDLDeque d; assert(d.OK()); ! for (int i = 0; i < SIZE; ++i) { if (i % 2 == 0) d.enq(i); --- 98,105 ---- { intDLDeque d; assert(d.OK()); ! int i; ! for (i = 0; i < SIZE; ++i) { if (i % 2 == 0) d.enq(i); diff -c gnu/libg++/libg++/tests/tInteger.cc:1.1.1.1 gnu/libg++/libg++/tests/tInteger.cc:1.2 *** gnu/libg++/libg++/tests/tInteger.cc:1.1.1.1 Sat May 20 00:26:21 1995 --- gnu/libg++/libg++/tests/tInteger.cc Sat May 20 00:26:21 1995 *************** *** 190,196 **** assert(pow64.OK()); cout << "lg(pow64) = " << lg(pow64) << "\n"; assert(lg(pow64) == 64); ! for (int k = 0; k < 64; ++k) assert(testbit(pow64, k) == 0); assert(testbit(pow64, k) != 0); Integer s64 = 1; --- 190,197 ---- assert(pow64.OK()); cout << "lg(pow64) = " << lg(pow64) << "\n"; assert(lg(pow64) == 64); ! int k; ! for (k = 0; k < 64; ++k) assert(testbit(pow64, k) == 0); assert(testbit(pow64, k) != 0); Integer s64 = 1; diff -c gnu/libg++/libg++/tests/tLList.cc:1.1.1.1 gnu/libg++/libg++/tests/tLList.cc:1.2 *** gnu/libg++/libg++/tests/tLList.cc:1.1.1.1 Sat May 20 00:26:21 1995 --- gnu/libg++/libg++/tests/tLList.cc Sat May 20 00:26:21 1995 *************** *** 193,199 **** cout << "z: "; printDlist(z); cout << "inserting 100 before alternate elements...\n"; ! for (Pix zp = z.first(); zp; z.next(zp)) { z.ins_before(zp, 100); } --- 193,200 ---- cout << "z: "; printDlist(z); cout << "inserting 100 before alternate elements...\n"; ! Pix zp; ! for (zp = z.first(); zp; z.next(zp)) { z.ins_before(zp, 100); } diff -c gnu/libg++/libg++/tests/tList.cc:1.1.1.1 gnu/libg++/libg++/tests/tList.cc:1.2 *** gnu/libg++/libg++/tests/tList.cc:1.1.1.1 Sat May 20 00:26:21 1995 --- gnu/libg++/libg++/tests/tList.cc Sat May 20 00:26:21 1995 *************** *** 75,81 **** intList a = sequence(1, 20); cout << "\nintList a = sequence(1, 20);\n"; print(a); assert(a.OK()); ! for (int i = 0; i < 20; ++i) assert(a[i] == i + 1); assert(a.position(2) == 1); intList b = randseq(20); cout << "\nintList b = randseq(20);\n"; print(b); --- 75,82 ---- intList a = sequence(1, 20); cout << "\nintList a = sequence(1, 20);\n"; print(a); assert(a.OK()); ! int i; ! for (i = 0; i < 20; ++i) assert(a[i] == i + 1); assert(a.position(2) == 1); intList b = randseq(20); cout << "\nintList b = randseq(20);\n"; print(b); *************** *** 112,118 **** intList h = merge(a, b, int_compare); cout << "\nintList h = merge(a, b, int_compare);\n"; print(h); for (i = 1; i < 40; ++i) assert(h[i] >= h[i-1]); ! for (Pix p = a.first(); p; a.next(p)) assert(h.contains(a(p))); for (p = b.first(); p; b.next(p)) assert(h.contains(b(p))); cout << "\nh via Pix:\n"; for (p = h.first(); p; h.next(p)) cout << h(p) << ", "; --- 113,120 ---- intList h = merge(a, b, int_compare); cout << "\nintList h = merge(a, b, int_compare);\n"; print(h); for (i = 1; i < 40; ++i) assert(h[i] >= h[i-1]); ! Pix p; ! for (p = a.first(); p; a.next(p)) assert(h.contains(a(p))); for (p = b.first(); p; b.next(p)) assert(h.contains(b(p))); cout << "\nh via Pix:\n"; for (p = h.first(); p; h.next(p)) cout << h(p) << ", "; diff -c gnu/libg++/libg++/tests/tMap.cc:1.1.1.1 gnu/libg++/libg++/tests/tMap.cc:1.2 *** gnu/libg++/libg++/tests/tMap.cc:1.1.1.1 Sat May 20 00:26:22 1995 --- gnu/libg++/libg++/tests/tMap.cc Sat May 20 00:26:22 1995 *************** *** 67,73 **** int maxprint = 20; cout << "["; int k = 0; ! for (Pix i = a.first(); i != 0 && k < maxprint; a.next(i),++k) cout << "(" << a.key(i) << ", " << a.contents(i) << ") "; if (i != 0) cout << "...]\n"; else cout << "]\n"; --- 67,74 ---- int maxprint = 20; cout << "["; int k = 0; ! Pix i; ! for (i = a.first(); i != 0 && k < maxprint; a.next(i),++k) cout << "(" << a.key(i) << ", " << a.contents(i) << ") "; if (i != 0) cout << "...]\n"; else cout << "]\n"; *************** *** 93,99 **** assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); assert(a[SIZE+1] = -1); for (j = 1; j <= SIZE; ++j) assert(b.contains(j)); --- 94,101 ---- assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); assert(a[SIZE+1] = -1); for (j = 1; j <= SIZE; ++j) assert(b.contains(j)); *************** *** 137,143 **** assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); assert(a[SIZE+1] = -1); for (j = 1; j <= SIZE; ++j) assert(b.contains(j)); --- 139,146 ---- assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); assert(a[SIZE+1] = -1); for (j = 1; j <= SIZE; ++j) assert(b.contains(j)); *************** *** 181,187 **** assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); assert(a[SIZE+1] = -1); for (j = 1; j <= SIZE; ++j) assert(b.contains(j)); --- 184,191 ---- assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); assert(a[SIZE+1] = -1); for (j = 1; j <= SIZE; ++j) assert(b.contains(j)); *************** *** 225,231 **** assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); assert(a[SIZE+1] = -1); for (j = 1; j <= SIZE; ++j) assert(b.contains(j)); --- 229,236 ---- assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); assert(a[SIZE+1] = -1); for (j = 1; j <= SIZE; ++j) assert(b.contains(j)); *************** *** 269,275 **** assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); for (j = 1; j <= a.length(); ++j) assert(a.rankof(j) == j); for (j = 1; j <= a.length(); ++j) assert(a.key(a.ranktoPix(j)) == j); assert(a[SIZE+1] = -1); --- 274,281 ---- assert(b.length() == SIZE); assert(c.length() == SIZE); assert(d.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); for (j = 1; j <= a.length(); ++j) assert(a.rankof(j) == j); for (j = 1; j <= a.length(); ++j) assert(a.key(a.ranktoPix(j)) == j); assert(a[SIZE+1] = -1); diff -c gnu/libg++/libg++/tests/tPQ.cc:1.1.1.1 gnu/libg++/libg++/tests/tPQ.cc:1.2 *** gnu/libg++/libg++/tests/tPQ.cc:1.1.1.1 Sat May 20 00:26:22 1995 --- gnu/libg++/libg++/tests/tPQ.cc Sat May 20 00:26:22 1995 *************** *** 66,72 **** int maxprint = 20; cout << "["; int k = 0; ! for (Pix i = a.first(); i != 0 && k < maxprint; a.next(i),++k) cout << a(i) << " "; if (i != 0) cout << "...]\n"; else cout << "]\n"; --- 66,73 ---- int maxprint = 20; cout << "["; int k = 0; ! Pix i; ! for (i = a.first(); i != 0 && k < maxprint; a.next(i),++k) cout << a(i) << " "; if (i != 0) cout << "...]\n"; else cout << "]\n"; *************** *** 96,102 **** assert(b.front() == 1); assert(c.front() == 1); assert(d.front() == 1); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); d.del_front(); assert(d.front() == 1); for (j = 1; j <= SIZE; ++j) assert(a.deq() == j); --- 97,104 ---- assert(b.front() == 1); assert(c.front() == 1); assert(d.front() == 1); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); d.del_front(); assert(d.front() == 1); for (j = 1; j <= SIZE; ++j) assert(a.deq() == j); *************** *** 153,159 **** assert(b.front() == 1); assert(c.front() == 1); assert(d.front() == 1); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); d.del_front(); assert(d.front() == 1); for (j = 1; j <= SIZE; ++j) assert(a.deq() == j); --- 155,162 ---- assert(b.front() == 1); assert(c.front() == 1); assert(d.front() == 1); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); d.del_front(); assert(d.front() == 1); for (j = 1; j <= SIZE; ++j) assert(a.deq() == j); *************** *** 209,215 **** assert(b.front() == 1); assert(c.front() == 1); assert(d.front() == 1); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); d.del_front(); assert(d.front() == 1); for (j = 1; j <= SIZE; ++j) assert(a.deq() == j); --- 212,219 ---- assert(b.front() == 1); assert(c.front() == 1); assert(d.front() == 1); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); d.del_front(); assert(d.front() == 1); for (j = 1; j <= SIZE; ++j) assert(a.deq() == j); diff -c gnu/libg++/libg++/tests/tPlex.cc:1.1.1.1 gnu/libg++/libg++/tests/tPlex.cc:1.2 *** gnu/libg++/libg++/tests/tPlex.cc:1.1.1.1 Sat May 20 00:26:22 1995 --- gnu/libg++/libg++/tests/tPlex.cc Sat May 20 00:26:22 1995 *************** *** 15,21 **** cout << "["; int maxprint = 20; int k = 0; ! for (int i = a.low(); i < a.fence() && k < maxprint; ++i, ++k) cout << a[i] << " "; if (i < a.fence()) cout << "]\n"; else cout << "...]\n"; --- 15,22 ---- cout << "["; int maxprint = 20; int k = 0; ! int i; ! for (i = a.low(); i < a.fence() && k < maxprint; ++i, ++k) cout << a[i] << " "; if (i < a.fence()) cout << "]\n"; else cout << "...]\n"; *************** *** 68,74 **** p.reset_low (0); q.reset_low (0); ! for (int i = 0; i < 50; i++) { if (i % 2 == 0) { --- 69,76 ---- p.reset_low (0); q.reset_low (0); ! int i; ! for (i = 0; i < 50; i++) { if (i % 2 == 0) { *************** *** 97,103 **** px = p.first(); i = 0; ! for (int it1 = p.low(); it1 < p.fence(); p.next(it1)) { assert (p[it1] == it1); assert(p(px) == p[it1]); --- 99,106 ---- px = p.first(); i = 0; ! int it1; ! for (it1 = p.low(); it1 < p.fence(); p.next(it1)) { assert (p[it1] == it1); assert(p(px) == p[it1]); *************** *** 224,230 **** assert (p.empty()); p.reset_low (0); ! for (int i = 0; i < 50; i++) { if (i % 2 == 0) { --- 227,234 ---- assert (p.empty()); p.reset_low (0); ! int i; ! for (i = 0; i < 50; i++) { if (i % 2 == 0) { *************** *** 334,340 **** p1 = p; p1.reset_low (p1.low_element()); ! for (int it6 = p1.low(); it6 < p1.fence(); it6++) { assert (p1[it6] == it6); } --- 338,345 ---- p1 = p; p1.reset_low (p1.low_element()); ! int it6; ! for (it6 = p1.low(); it6 < p1.fence(); it6++) { assert (p1[it6] == it6); } *************** *** 393,399 **** assert (p.empty()); p.reset_low (0); ! for (int i = 0; i < 50; i++) { if (i % 2 == 0) { --- 398,405 ---- assert (p.empty()); p.reset_low (0); ! int i; ! for (i = 0; i < 50; i++) { if (i % 2 == 0) { *************** *** 578,584 **** assert (p.empty()); p.reset_low (0); ! for (int i = 0; i < 50; i++) { if (i % 2 == 0) { --- 584,591 ---- assert (p.empty()); p.reset_low (0); ! int i; ! for (i = 0; i < 50; i++) { if (i % 2 == 0) { *************** *** 688,694 **** p1 = p; p1.reset_low (p1.low_element()); ! for (int it6 = p1.low(); it6 < p1.fence(); it6++) { assert (p1[it6] == it6); } --- 695,702 ---- p1 = p; p1.reset_low (p1.low_element()); ! int it6; ! for (it6 = p1.low(); it6 < p1.fence(); it6++) { assert (p1[it6] == it6); } diff -c gnu/libg++/libg++/tests/tQueue.cc:1.1.1.2 gnu/libg++/libg++/tests/tQueue.cc:1.2 *** gnu/libg++/libg++/tests/tQueue.cc:1.1.1.2 Sat May 20 00:26:22 1995 --- gnu/libg++/libg++/tests/tQueue.cc Sat May 20 00:26:22 1995 *************** *** 41,47 **** { intXPQueue q(SIZE/2); assert(q.OK()); ! for (int i = 0; i < SIZE; ++i) q.enq(i); assert(q.length() == SIZE); assert(q.front() == 0); --- 41,48 ---- { intXPQueue q(SIZE/2); assert(q.OK()); ! int i; ! for (i = 0; i < SIZE; ++i) q.enq(i); assert(q.length() == SIZE); assert(q.front() == 0); *************** *** 83,89 **** { intVQueue q(SIZE); assert(q.OK()); ! for (int i = 0; i < SIZE; ++i) q.enq(i); assert(q.length() == SIZE); assert(q.front() == 0); --- 84,91 ---- { intVQueue q(SIZE); assert(q.OK()); ! int i; ! for (i = 0; i < SIZE; ++i) q.enq(i); assert(q.length() == SIZE); assert(q.front() == 0); *************** *** 125,131 **** { intXPQueue q; assert(q.OK()); ! for (int i = 0; i < SIZE; ++i) q.enq(i); assert(q.length() == SIZE); assert(q.front() == 0); --- 127,134 ---- { intXPQueue q; assert(q.OK()); ! int i; ! for (i = 0; i < SIZE; ++i) q.enq(i); assert(q.length() == SIZE); assert(q.front() == 0); diff -c gnu/libg++/libg++/tests/tSet.cc:1.1.1.1 gnu/libg++/libg++/tests/tSet.cc:1.2 *** gnu/libg++/libg++/tests/tSet.cc:1.1.1.1 Sat May 20 00:26:22 1995 --- gnu/libg++/libg++/tests/tSet.cc Sat May 20 00:26:22 1995 *************** *** 31,36 **** --- 31,37 ---- int maxprint = 20; cout << "["; int k = 0; + Pix i; for (Pix i = a.first(); i != 0 && k < maxprint; a.next(i),++k) cout << a(i) << " "; if (i != 0) cout << "...]\n"; *************** *** 522,528 **** intBSTSet a; add(nums, a); assert(a.length() == SIZE); ! for (int j = 1; j <= SIZE; ++j) assert(a.contains(j)); a.balance(); assert(a.OK()); for ( j = 1; j <= SIZE; ++j) assert(a.contains(j)); --- 523,530 ---- intBSTSet a; add(nums, a); assert(a.length() == SIZE); ! int j; ! for (j = 1; j <= SIZE; ++j) assert(a.contains(j)); a.balance(); assert(a.OK()); for ( j = 1; j <= SIZE; ++j) assert(a.contains(j)); diff -c gnu/libg++/libg++/tests/tStack.cc:1.1.1.1 gnu/libg++/libg++/tests/tStack.cc:1.2 *** gnu/libg++/libg++/tests/tStack.cc:1.1.1.1 Sat May 20 00:26:22 1995 --- gnu/libg++/libg++/tests/tStack.cc Sat May 20 00:26:23 1995 *************** *** 41,47 **** { intXPStack s(SIZE/2); assert(s.OK()); ! for (int i = 0; i < SIZE; ++i) s.push(i); assert(s.length() == SIZE); assert(s.top() == (SIZE-1)); --- 41,48 ---- { intXPStack s(SIZE/2); assert(s.OK()); ! int i; ! for (i = 0; i < SIZE; ++i) s.push(i); assert(s.length() == SIZE); assert(s.top() == (SIZE-1)); *************** *** 84,90 **** { intVStack s(SIZE); assert(s.OK()); ! for (int i = 0; i < SIZE; ++i) s.push(i); assert(s.length() == SIZE); assert(s.top() == (SIZE-1)); --- 85,92 ---- { intVStack s(SIZE); assert(s.OK()); ! int i; ! for (i = 0; i < SIZE; ++i) s.push(i); assert(s.length() == SIZE); assert(s.top() == (SIZE-1)); *************** *** 127,133 **** { intSLStack s; assert(s.OK()); ! for (int i = 0; i < SIZE; ++i) s.push(i); assert(s.length() == SIZE); assert(s.top() == (SIZE-1)); --- 129,136 ---- { intSLStack s; assert(s.OK()); ! int i; ! for (i = 0; i < SIZE; ++i) s.push(i); assert(s.length() == SIZE); assert(s.top() == (SIZE-1)); diff -c gnu/libg++/libg++/tests/tVec.cc:1.1.1.1 gnu/libg++/libg++/tests/tVec.cc:1.2 *** gnu/libg++/libg++/tests/tVec.cc:1.1.1.1 Sat May 20 00:26:23 1995 --- gnu/libg++/libg++/tests/tVec.cc Sat May 20 00:26:23 1995 *************** *** 39,45 **** int main() { intVec a(20); ! for (int i = 0; i < a.capacity(); ++i) a[i] = randgen.asLong() % 100; cout << "a: "; print(a); a.sort(int_compare); cout << "a.sort():"; print(a); --- 39,46 ---- int main() { intVec a(20); ! int i; ! for (i = 0; i < a.capacity(); ++i) a[i] = randgen.asLong() % 100; cout << "a: "; print(a); a.sort(int_compare); cout << "a.sort():"; print(a); diff -c gnu/libg++/libg++/tests/tiLList.cc:1.1.1.2 gnu/libg++/libg++/tests/tiLList.cc:1.2 *** gnu/libg++/libg++/tests/tiLList.cc:1.1.1.2 Sat May 20 00:26:23 1995 --- gnu/libg++/libg++/tests/tiLList.cc Sat May 20 00:26:23 1995 *************** *** 202,208 **** cout << "z: "; printDlist(z); cout << "inserting 100 before alternate elements...\n"; ! for (Pix zp = z.first(); zp; z.next(zp)) { z.ins_before(zp, 100); } --- 202,209 ---- cout << "z: "; printDlist(z); cout << "inserting 100 before alternate elements...\n"; ! Pix zp; ! for (zp = z.first(); zp; z.next(zp)) { z.ins_before(zp, 100); } diff -c gnu/libg++/libiberty/Makefile.in:1.1.1.1 gnu/libg++/libiberty/Makefile.in:1.2 *** gnu/libg++/libiberty/Makefile.in:1.1.1.1 Sat May 20 00:26:24 1995 --- gnu/libg++/libiberty/Makefile.in Sat May 20 00:26:24 1995 *************** *** 136,145 **** vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \ xatexit.c xexit.c xmalloc.c # These are always included in the library. ! REQUIRED_OFILES = argv.o basename.o concat.o cplus-dem.o fdmatch.o \ getopt.o getopt1.o getruntime.o \ floatformat.o obstack.o spaces.o strerror.o strsignal.o \ ! vasprintf.o xatexit.o xexit.o xmalloc.o # Do we want/need any config overrides? # --- 136,145 ---- vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \ xatexit.c xexit.c xmalloc.c # These are always included in the library. ! REQUIRED_OFILES = argv.o concat.o cplus-dem.o fdmatch.o \ getopt.o getopt1.o getruntime.o \ floatformat.o obstack.o spaces.o strerror.o strsignal.o \ ! xatexit.o xexit.o xmalloc.o # Do we want/need any config overrides? # diff -c gnu/libg++/libiberty/functions.def:1.1.1.1 gnu/libg++/libiberty/functions.def:1.2 *** gnu/libg++/libiberty/functions.def:1.1.1.1 Sat May 20 00:26:24 1995 --- gnu/libg++/libiberty/functions.def Sat May 20 00:26:24 1995 *************** *** 62,64 **** --- 62,68 ---- DEFFUNC(strerror, char*, (), NOTHING) DEFFUNC(psignal, void, (signo, message), unsigned signo AND char *message) + + DEFFUNC(strsignal, char*, (), NOTHING) + DEFFUNC(basename, char*, (name), char *name) + DEFFUNC(vasprintf, int, (), NOTHING) diff -c gnu/libg++/libiberty/strsignal.c:1.1.1.1 gnu/libg++/libiberty/strsignal.c:1.2 *** gnu/libg++/libiberty/strsignal.c:1.1.1.1 Sat May 20 00:26:24 1995 --- gnu/libg++/libiberty/strsignal.c Sat May 20 00:26:24 1995 *************** *** 416,421 **** --- 416,423 ---- */ + #ifdef NEED_strsignal + const char * strsignal (signo) int signo; *************** *** 451,456 **** --- 453,460 ---- return (msg); } + + #endif /* NEED_strsignal */ /* diff -c gnu/libg++/libio/Makefile.in:1.1.1.1 gnu/libg++/libio/Makefile.in:1.3 *** gnu/libg++/libio/Makefile.in:1.1.1.1 Sat May 20 00:26:24 1995 --- gnu/libg++/libio/Makefile.in Sat May 20 00:26:25 1995 *************** *** 22,27 **** --- 22,33 ---- tooldir = $(exec_prefix)/$(target) INSTALLDIR = $(libdir) + ARLIB=libiostream.a + + SHLIB=libiostream.so + + TARGETLIB=$(ARLIB) + IO_OBJECTS = filedoalloc.o floatconv.o genops.o fileops.o \ iovfprintf.o \ iovfscanf.o ioignore.o iopadn.o \ *************** *** 65,74 **** $(AR) $(AR_FLAGS) libio.a $(LIBIO_OBJECTS) $(RANLIB) libio.a ! libiostream.a: $(_G_CONFIG_H) $(LIBIOSTREAM_OBJECTS) ! -rm -rf libiostream.a ! $(AR) $(AR_FLAGS) libiostream.a $(LIBIOSTREAM_OBJECTS) ! $(RANLIB) libiostream.a test: test.o libio.a $(CC) -o test test.o libio.a --- 71,87 ---- $(AR) $(AR_FLAGS) libio.a $(LIBIO_OBJECTS) $(RANLIB) libio.a ! $(ARLIB): $(_G_CONFIG_H) $(LIBIOSTREAM_OBJECTS) ! -rm -rf $(ARLIB) ! $(AR) $(AR_FLAGS) $(ARLIB) $(LIBIOSTREAM_OBJECTS) ! $(RANLIB) $(ARLIB) ! ! $(SHLIB): $(_G_CONFIG_H) $(LIBIOSTREAM_OBJECTS) ! $(CXX) $(SHFLAGS) -shared -o $(SHLIB) $(LIBIOSTREAM_OBJECTS) $(SHDEPS) ! -if [ x$(LIBSO) != x$(SHLIB) ]; then \ ! rm -f $(LIBSO); \ ! ln -s $(SHLIB) $(LIBSO); \ ! else true; fi test: test.o libio.a $(CC) -o test test.o libio.a diff -c gnu/libg++/libio/config.shared:1.1.1.1 gnu/libg++/libio/config.shared:1.2 *** gnu/libg++/libio/config.shared:1.1.1.1 Sat May 20 00:26:25 1995 --- gnu/libg++/libio/config.shared Sat May 20 00:26:25 1995 *************** *** 140,145 **** --- 140,148 ---- fi fi + echo "#### Linux target dependent Makefile fragment comes in here." + echo "##" + echo "all: ${ALL}" if [ "${SUBDIRS}" != "" ] ; then echo ' @rootme=`pwd`/; export rootme; \' diff -c gnu/libg++/libio/configure.in:1.1.1.1 gnu/libg++/libio/configure.in:1.2 *** gnu/libg++/libio/configure.in:1.1.1.1 Sat May 20 00:26:25 1995 --- gnu/libg++/libio/configure.in Sat May 20 00:26:25 1995 *************** *** 23,34 **** --- 23,39 ---- *-*-*) frags=${target_cpu} esac + frags=${frags}.mt + if [ "${enable_shared}" = "yes" ]; then case "${target}" in hppa*-*-*) frags="${frags} mt-papic" ;; i[345]86-*-*) frags="${frags} mt-x86pic" ;; *-*-*) frags="${frags} mt-${target_cpu}pic" ;; esac + case "${target}" in + *-*-linux*) frags="${frags} linux.ml" ;; + esac fi for frag in ${frags}; do *************** *** 45,51 **** LIBDIR=yes TO_TOPDIR=../ ! ALL='$(_G_CONFIG_H) libio.a libiostream.a $(OSPRIM_OBJECTS)' CINCLUDES='-I. -I$(srcdir)' CXXINCLUDES='-I. -I$(srcdir)' MOSTLYCLEAN='*.o core iostream.list' --- 50,56 ---- LIBDIR=yes TO_TOPDIR=../ ! ALL='$(_G_CONFIG_H) libio.a $(TARGETLIB) $(OSPRIM_OBJECTS)' CINCLUDES='-I. -I$(srcdir)' CXXINCLUDES='-I. -I$(srcdir)' MOSTLYCLEAN='*.o core iostream.list' diff -c gnu/libg++/libio/iostream.cc:1.1.1.1 gnu/libg++/libio/iostream.cc:1.3 *** gnu/libg++/libio/iostream.cc:1.1.1.1 Sat May 20 00:26:25 1995 --- gnu/libg++/libio/iostream.cc Sat May 20 00:26:25 1995 *************** *** 35,40 **** --- 35,46 ---- #include #include #include "floatio.h" + #ifdef __linux__ + #include + extern "C" int __printf_fp __P ((FILE *, + const struct printf_info *, + const void **const)); + #endif #define BUF (MAXEXP+MAXFRACT+1) /* + decimal point */ *************** *** 313,319 **** --- 319,329 ---- istream& istream::operator>>(long double& x) { if (ipfx0()) + #ifdef __linux__ + scan("%Lg", &x); + #else scan("%lg", &x); + #endif return *this; } *************** *** 543,548 **** --- 553,610 ---- } #endif /*__GNUC__*/ + #ifdef __linux__ + ostream& ostream::operator<<(long double n) + { + if (opfx()) { + // Uses __cvt_double (renamed from static cvt), in Chris Torek's + // stdio implementation. The setup code uses the same logic + // as in __vsbprintf.C (also based on Torek's code). + int format_char; + if ((flags() & ios::floatfield) == ios::fixed) + format_char = 'f'; + else if ((flags() & ios::floatfield) == ios::scientific) + format_char = flags() & ios::uppercase ? 'E' : 'e'; + else + format_char = flags() & ios::uppercase ? 'G' : 'g'; + + int prec = precision(); + if (prec <= 0 && !(flags() & ios::fixed)) + prec = 6; /* default */ + + // Do actual conversion. + #if 0 + if (_IO_outfloat(n, rdbuf(), format_char, width(0), + prec, flags() | ios::ldouble, + flags() & ios::showpos ? '+' : 0, + fill()) < 0) + #else + struct printf_info info; + + info.prec = prec; + info.width = width (0); + info.spec = format_char; + info.is_long_double = 1; + info.is_short = 0; + info.is_long = 0; + info.alt = flags() & ios::showpoint; + info.space = 0; + info.left = flags() & ios::left; + info.showsign = flags() & ios::showpos; + info.group = 0; + info.pad = fill(); + + _IO_va_list p = (_IO_va_list) &n; + + if (__printf_fp (rdbuf(), &info, &p) < 0) + #endif + set(ios::badbit|ios::failbit); // ?? + osfx(); + } + return *this; + } + #endif + ostream& ostream::operator<<(double n) { if (opfx()) { *************** *** 562,567 **** --- 624,650 ---- prec = 6; /* default */ // Do actual conversion. + #ifdef __linux__ + struct printf_info info; + + info.prec = prec; + info.width = width (0); + info.spec = format_char; + info.is_long_double = 0; + info.is_short = 0; + info.is_long = 0; + info.alt = flags() & ios::showpoint; + info.space = 0; + info.left = flags() & ios::left; + info.showsign = flags() & ios::showpos; + info.group = 0; + info.pad = fill(); + + _IO_va_list p = (_IO_va_list) &n; + + if (__printf_fp (rdbuf(), &info, &p) < 0) + set(ios::badbit|ios::failbit); // ?? + #else #ifdef _IO_USE_DTOA if (_IO_outfloat(n, rdbuf(), format_char, width(0), prec, flags(), *************** *** 617,622 **** --- 700,706 ---- if (pad_kind == (ios::fmtflags)ios::left) // Left adjustment for (i = padding; --i >= 0; ) sbuf->sputc(fill_char); + #endif #endif osfx(); } diff -c gnu/libg++/libio/iostream.h:1.1.1.1 gnu/libg++/libio/iostream.h:1.2 *** gnu/libg++/libio/iostream.h:1.1.1.1 Sat May 20 00:26:25 1995 --- gnu/libg++/libio/iostream.h Sat May 20 00:26:25 1995 *************** *** 92,98 **** --- 92,102 ---- #endif ostream& operator<<(double n); ostream& operator<<(float n) { return operator<<((double)n); } + #ifdef __linux__ + ostream& operator<<(long double n); + #else ostream& operator<<(long double n) { return operator<<((double)n); } + #endif ostream& operator<<(__omanip func) { return (*func)(*this); } ostream& operator<<(__manip func) {(*func)(*this); return *this;} ostream& operator<<(streambuf*); diff -c gnu/libg++/libio/libio.h:1.1.1.1 gnu/libg++/libio/libio.h:1.2 *** gnu/libg++/libio/libio.h:1.1.1.1 Sat May 20 00:26:26 1995 --- gnu/libg++/libio/libio.h Sat May 20 00:26:26 1995 *************** *** 73,79 **** --- 73,81 ---- #ifndef __STDC__ #define const #endif + #ifndef __linux__ #define _IO_USE_DTOA + #endif #if 0 #ifdef _IO_NEED_STDARG_H *************** *** 143,148 **** --- 145,159 ---- #define _IO_STDIO 040000 #define _IO_DONT_CLOSE 0100000 + /* The reentrent version of the libio implementation needs a semaphore for + each _IO_FILE struture. Because we don't know how the semaphore + will be implemented we try to be very general. */ + struct _IO_lock_t { + void *ptr; + short int field1; + short int field2; + }; + /* A streammarker remembers a position in a buffer. */ struct _IO_jump_t; struct _IO_FILE; *************** *** 201,206 **** --- 212,219 ---- char _shortbuf[1]; /* char* _save_gptr; char* _save_egptr; */ + + struct _IO_lock_t _IO_lock; }; #ifndef __cplusplus diff -c gnu/libg++/libio/libioP.h:1.1.1.1 gnu/libg++/libio/libioP.h:1.2 *** gnu/libg++/libio/libioP.h:1.1.1.1 Sat May 20 00:26:26 1995 --- gnu/libg++/libio/libioP.h Sat May 20 00:26:26 1995 *************** *** 209,217 **** --- 209,219 ---- extern double _IO_strtod __P((const char *, char **)); extern char * _IO_dtoa __P((double __d, int __mode, int __ndigits, int *__decpt, int *__sign, char **__rve)); + #ifndef __linux__ extern int _IO_outfloat __P((double __value, _IO_FILE *__sb, int __type, int __width, int __precision, int __flags, int __sign_mode, int __fill)); + #endif extern _IO_FILE *_IO_list_all; extern void (*_IO_cleanup_registration_needed) __P ((void)); diff -c /dev/null gnu/libg++/libio/config/linux.ml:1.1 *** /dev/null Sat May 20 00:26:26 1995 --- gnu/libg++/libio/config/linux.ml Sat May 20 00:26:26 1995 *************** *** 0 **** --- 1,10 ---- + # Linux running ELF. + + LIBSO = libiostream.so + SHLIB = $(LIBSO).`cat $(srcdir)/../libg++/SHLIB.VERSION` + TARGETLIB = $(SHLIB) + SHFLAGS = -Wl,-soname,$(LIBSO).`sed -e 's/\..*//' $(srcdir)/../libg++/SHLIB.VERSION` + + override SHDEPS= + + iostream.list: $(SHLIB) diff -c gnu/libg++/libio/config/linux.mt:1.1.1.1 gnu/libg++/libio/config/linux.mt:1.2 *** gnu/libg++/libio/config/linux.mt:1.1.1.1 Sat May 20 00:26:27 1995 --- gnu/libg++/libio/config/linux.mt Sat May 20 00:26:27 1995 *************** *** 8,13 **** --- 8,16 ---- STDIO_WRAP_OBJECTS= OSPRIM_OBJECTS= + # That is where we keep the g++ header files. + gxx_includedir =$(prefix)/include/g++ + # We have the rest in /usr/include. USER_INCLUDES=PlotFile.h SFile.h builtinbuf.h editbuf.h fstream.h \ indstream.h iomanip.h iostream.h istream.h ostream.h \ diff -c gnu/libg++/libio/config/mt-x86pic:1.1.1.1 gnu/libg++/libio/config/mt-x86pic:1.2 *** gnu/libg++/libio/config/mt-x86pic:1.1.1.1 Sat May 20 00:26:27 1995 --- gnu/libg++/libio/config/mt-x86pic Sat May 20 00:26:27 1995 *************** *** 1,2 **** LIBCFLAGS=$(CFLAGS) -fpic ! LIBCXXFLAGS=$(CXXFLAGS) -fpic --- 1,2 ---- LIBCFLAGS=$(CFLAGS) -fpic ! LIBCXXFLAGS=$(CXXFLAGS) -fpic -fno-implicit-templates diff -c gnu/libg++/libio/tests/tfformat.c:1.1.1.1 gnu/libg++/libio/tests/tfformat.c:1.2 *** gnu/libg++/libio/tests/tfformat.c:1.1.1.1 Sat May 20 00:26:27 1995 --- gnu/libg++/libio/tests/tfformat.c Sat May 20 00:26:28 1995 *************** *** 4117,4123 **** --- 4117,4128 ---- } #ifdef TEST_EXACTNESS + #if 0 + /* This is too specific to David M. Gay's dtoa (). */ sprintf (buffer, "%.999g", dptr->value); + #else + sprintf (buffer, "%.16g", dptr->value); + #endif sscanf (buffer, "%lg", &d); if (dptr->value != d) { diff -c gnu/libg++/librx/rx.c:1.1.1.1 gnu/libg++/librx/rx.c:1.2 *** gnu/libg++/librx/rx.c:1.1.1.1 Sat May 20 00:26:28 1995 --- gnu/libg++/librx/rx.c Sat May 20 00:26:28 1995 *************** *** 1,4 **** ! /* Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of the librx library. --- 1,4 ---- ! /* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of the librx library. *************** *** 24,31 **** #if !defined (__GNUC__) && defined (_AIX) #pragma alloca #endif ! char rx_version_string[] = "GNU Rx version 0.06"; /* ``Too hard!'' * -- anon. --- 24,37 ---- #if !defined (__GNUC__) && defined (_AIX) #pragma alloca #endif + + /* To make linux happy? */ + #ifndef _GNU_SOURCE + #define _GNU_SOURCE + #endif + ! char rx_version_string[] = "GNU Rx version 0.07.1"; /* ``Too hard!'' * -- anon. *************** *** 52,61 **** #define false 0 #define true 1 - #ifndef RX_DECL - #define RX_DECL static - #endif - #ifndef __GCC__ #undef __inline__ #define __inline__ --- 58,63 ---- *************** *** 97,102 **** --- 99,105 ---- #define REGEX_ALLOCATE alloca #endif /* not REGEX_MALLOC */ + #ifdef RX_WANT_RX_DEFS #define RX_DECL extern #define RX_DEF_QUAL *************** *** 116,122 **** extern char *re_syntax_table; #else /* not SYNTAX_TABLE */ ! /* RX_DECL char re_syntax_table[CHAR_SET_SIZE]; */ #ifdef __STDC__ static void --- 119,125 ---- extern char *re_syntax_table; #else /* not SYNTAX_TABLE */ ! RX_DECL char re_syntax_table[CHAR_SET_SIZE]; #ifdef __STDC__ static void *************** *** 5752,5758 **** unfetch_interval: /* If an invalid interval, match the characters as literals. */ p = beg_interval; ! beg_interval = NULL; /* normal_char and normal_backslash need `c'. */ PATFETCH (c); --- 5755,5761 ---- unfetch_interval: /* If an invalid interval, match the characters as literals. */ p = beg_interval; ! beg_interval = 0; /* normal_char and normal_backslash need `c'. */ PATFETCH (c); *************** *** 5768,5781 **** /* There is no way to specify the before_dot and after_dot operators. rms says this is ok. --karl */ case '=': ! side = at_dot; goto add_side_effect; break; case 's': case 'S': { ! rx_Bitset cs = cset (&rxb->rx); struct rexp_node * set = rx_mk_r_cset (&rxb->rx, cs); if (!(cs && set)) return REG_ESPACE; --- 5771,5784 ---- /* There is no way to specify the before_dot and after_dot operators. rms says this is ok. --karl */ case '=': ! side = (rx_side_effect)rx_se_at_dot; goto add_side_effect; break; case 's': case 'S': { ! rx_Bitset cs = rx_cset (&rxb->rx); struct rexp_node * set = rx_mk_r_cset (&rxb->rx, cs); if (!(cs && set)) return REG_ESPACE; *************** *** 5785,5795 **** PATFETCH (c); { int x; ! char code = syntax_spec_code (c); for (x = 0; x < 256; ++x) { ! if (SYNTAX (x) & code) { rx_Bitset it = inverse_translation (rxb, validate_inv_tr, --- 5788,5798 ---- PATFETCH (c); { int x; ! enum syntaxcode code = syntax_spec_code [c]; for (x = 0; x < 256; ++x) { ! if (SYNTAX (x) == code) { rx_Bitset it = inverse_translation (rxb, validate_inv_tr, *************** *** 5799,5804 **** --- 5802,5808 ---- } } } + append = set; goto append_node; } break; *************** *** 5807,5812 **** --- 5811,5818 ---- case 'w': case 'W': + if (syntax & RE_NO_GNU_OPS) + goto normal_char; { rx_Bitset cs = rx_cset (&rxb->rx); struct rexp_node * n = (cs ? rx_mk_r_cset (&rxb->rx, cs) : 0); *************** *** 5817,5823 **** { int x; for (x = rxb->rx.local_cset_size - 1; x > 0; --x) ! if (re_syntax_table[x] & Sword) RX_bitset_toggle (cs, x); } append = n; --- 5823,5829 ---- { int x; for (x = rxb->rx.local_cset_size - 1; x > 0; --x) ! if (SYNTAX(x) & Sword) RX_bitset_toggle (cs, x); } append = n; *************** *** 5830,5860 **** --- 5836,5878 ---- * chars). */ case '<': + if (syntax & RE_NO_GNU_OPS) + goto normal_char; side = (rx_side_effect)re_se_wordbeg; goto add_side_effect; break; case '>': + if (syntax & RE_NO_GNU_OPS) + goto normal_char; side = (rx_side_effect)re_se_wordend; goto add_side_effect; break; case 'b': + if (syntax & RE_NO_GNU_OPS) + goto normal_char; side = (rx_side_effect)re_se_wordbound; goto add_side_effect; break; case 'B': + if (syntax & RE_NO_GNU_OPS) + goto normal_char; side = (rx_side_effect)re_se_notwordbound; goto add_side_effect; break; case '`': + if (syntax & RE_NO_GNU_OPS) + goto normal_char; side = (rx_side_effect)re_se_begbuf; goto add_side_effect; break; case '\'': + if (syntax & RE_NO_GNU_OPS) + goto normal_char; side = (rx_side_effect)re_se_endbuf; goto add_side_effect; break; *************** *** 6264,6275 **** int inset; inset = pos->pos - pos->string; ! if ((inset < 0) || (inset > closure->size1)) return rx_get_burst_no_more; else { ! pos->pos = closure->string1 + inset; ! pos->string = closure->string1; pos->size = closure->size1; pos->end = ((__const__ unsigned char *) MIN(closure->string1 + closure->size1, --- 6282,6293 ---- int inset; inset = pos->pos - pos->string; ! if ((inset < -1) || (inset > closure->size1)) return rx_get_burst_no_more; else { ! pos->pos = (__const__ unsigned char *) closure->string1 + inset; ! pos->string = (__const__ unsigned char *) closure->string1; pos->size = closure->size1; pos->end = ((__const__ unsigned char *) MIN(closure->string1 + closure->size1, *************** *** 6285,6292 **** int inset; inset = pos->pos - pos->string; ! pos->pos = closure->string2 + inset; ! pos->string = closure->string2; pos->size = closure->size2; pos->end = ((__const__ unsigned char *) MIN(closure->string2 + closure->size2, --- 6303,6310 ---- int inset; inset = pos->pos - pos->string; ! pos->pos = (__const__ unsigned char *) closure->string2 + inset; ! pos->string = (__const__ unsigned char *) closure->string2; pos->size = closure->size2; pos->end = ((__const__ unsigned char *) MIN(closure->string2 + closure->size2, *************** *** 6300,6310 **** { int inset; ! inset = pos->pos - pos->string; if (inset < closure->size1) { ! pos->pos = closure->string1 + inset; ! pos->string = closure->string1; pos->size = closure->size1; pos->end = ((__const__ unsigned char *) MIN(closure->string1 + closure->size1, --- 6318,6328 ---- { int inset; ! inset = pos->pos - pos->string + pos->offset; if (inset < closure->size1) { ! pos->pos = (__const__ unsigned char *) closure->string1 + inset; ! pos->string = (__const__ unsigned char *) closure->string1; pos->size = closure->size1; pos->end = ((__const__ unsigned char *) MIN(closure->string1 + closure->size1, *************** *** 6314,6321 **** } else { ! pos->pos = closure->string2 + inset - closure->size1; ! pos->string = closure->string2; pos->size = closure->size2; pos->end = ((__const__ unsigned char *) MIN(closure->string2 + closure->size2, --- 6332,6340 ---- } else { ! pos->pos = ((__const__ unsigned char *) ! closure->string2 + inset - closure->size1); ! pos->string = (__const__ unsigned char *) closure->string2; pos->size = closure->size2; pos->end = ((__const__ unsigned char *) MIN(closure->string2 + closure->size2, *************** *** 6383,6393 **** struct re_search_2_closure * closure; closure = (struct re_search_2_closure *)app_closure; if (offset == 0) ! return *pos->pos; if (pos->pos == pos->end) return *closure->string2; else ! return *pos->pos; } --- 6402,6428 ---- struct re_search_2_closure * closure; closure = (struct re_search_2_closure *)app_closure; if (offset == 0) ! { ! if (pos->pos >= pos->string) ! return *pos->pos; ! else ! { ! if ( (pos->string == closure->string2) ! && (closure->string1) ! && (closure->size1)) ! return closure->string1[closure->size1 - 1]; ! else ! return 0; /* sure, why not. */ ! } ! } if (pos->pos == pos->end) return *closure->string2; else ! #if 0 ! return pos->pos[1]; ! #else ! return pos->pos[offset]; /* FIXME */ ! #endif } *************** *** 6872,6877 **** --- 6907,6914 ---- rx_comp_buf.rx.nfa_states = 0; rx_comp_buf.rx.start = 0; rx_comp_buf.rx.se_list_cmp = posix_se_list_order; + rx_comp_buf.rx.local_cset_size = 256; + rx_comp_buf.rx.start_set = 0; ret = rx_compile (s, strlen (s), re_syntax_options, &rx_comp_buf); alloca (0); *************** *** 6955,6961 **** /* regex_compile will allocate the space for the compiled pattern. */ preg->buffer = 0; preg->allocated = 0; - preg->fastmap = malloc (256); if (!preg->fastmap) return REG_ESPACE; --- 6992,6997 ---- *************** *** 6994,6999 **** --- 7030,7036 ---- preg->re_nsub = 0; preg->start = 0; preg->se_params = 0; + preg->syntax_parens = 0; preg->rx.nodec = 0; preg->rx.epsnodec = 0; preg->rx.instruction_table = 0; diff -c gnu/libg++/librx/rx.h:1.1.1.1 gnu/libg++/librx/rx.h:1.2 *** gnu/libg++/librx/rx.h:1.1.1.1 Sat May 20 00:26:29 1995 --- gnu/libg++/librx/rx.h Sat May 20 00:26:29 1995 *************** *** 1,5 **** ! #if !defined(RXH) || defined(RX_WANT_SE_DEFS) ! #define RXH /* Copyright (C) 1992, 1993 Free Software Foundation, Inc. --- 1,5 ---- ! #if !defined(_RX_H) || defined(RX_WANT_SE_DEFS) ! #define _RX_H /* Copyright (C) 1992, 1993 Free Software Foundation, Inc. *************** *** 24,32 **** ! #ifndef RX_WANT_SE_DEFS --- 24,37 ---- + #include + #define __need_size_t + #include ! #if RX_WANT_SE_DEFS != 1 ! __BEGIN_DECLS ! #endif #ifndef RX_WANT_SE_DEFS *************** *** 1121,1127 **** rx_search_continuation = -4, rx_search_error = -3, rx_search_soft_fail = -2, /* failed by running out of string */ ! rx_search_fail = -1, /* failed only by reaching failure states */ /* return values >= 0 indicate the position of a successful match */ }; --- 1126,1132 ---- rx_search_continuation = -4, rx_search_error = -3, rx_search_soft_fail = -2, /* failed by running out of string */ ! rx_search_fail = -1 /* failed only by reaching failure states */ /* return values >= 0 indicate the position of a successful match */ }; *************** *** 1251,1256 **** --- 1256,1264 ---- * is the same as passing an array of all zeros. * The array should contain as many entries as their are subexps in the * regexp. + * + * For POSIX compatability, when using regcomp and regexec this field + * is zeroed and ignored. */ char * syntax_parens; *************** *** 1404,1409 **** --- 1412,1421 ---- If not set, then an unmatched ) is invalid. */ #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) + /* If this bit is set, do not process the GNU regex operators. + IF not set, then the GNU regex operators are recognized. */ + #define RE_NO_GNU_OPS (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) + /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect *************** *** 1419,1425 **** #define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ ! | RE_NO_BK_VAR | RE_NO_EMPTY_RANGES \ | RE_UNMATCHED_RIGHT_PAREN_ORD) #define RE_SYNTAX_POSIX_AWK \ --- 1431,1437 ---- #define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ ! | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_UNMATCHED_RIGHT_PAREN_ORD) #define RE_SYNTAX_POSIX_AWK \ *************** *** 2022,2027 **** --- 2034,2041 ---- switch (pc) { + default: + return rx_fastmap_error; case rx_fastmap_start: init_fastmap_sentinal: /* For the sake of fast fastmapping, set a sentinal in the fastmap. *************** *** 2124,2136 **** burst_state = get_burst (&search_state->outer_pos, app_closure, stop); switch (burst_state) { case rx_get_burst_continuation: { pc = rx_fastmap_string_break; goto return_continuation; } - case rx_get_burst_error: - return rx_fastmap_error; case rx_get_burst_ok: goto init_fastmap_sentinal; case rx_get_burst_no_more: --- 2138,2151 ---- burst_state = get_burst (&search_state->outer_pos, app_closure, stop); switch (burst_state) { + default: + case rx_get_burst_error: + return rx_fastmap_error; case rx_get_burst_continuation: { pc = rx_fastmap_string_break; goto return_continuation; } case rx_get_burst_ok: goto init_fastmap_sentinal; case rx_get_burst_no_more: *************** *** 2162,2176 **** #include "lisp.h" #include "buffer.h" #include "syntax.h" ! /* Emacs uses `NULL' as a predicate. */ ! #undef NULL ! #else /* not emacs */ /* Setting RX_MEMDBUG is useful if you have dbmalloc. Maybe with similar * packages too. */ #ifdef RX_MEMDBUG #include ! #else /* not RX_RX_MEMDBUG */ /* We used to test for `BSTRING' here, but only GCC and Emacs define * `BSTRING', as far as I know, and neither of them use this code. --- 2177,2190 ---- #include "lisp.h" #include "buffer.h" #include "syntax.h" ! #endif /* emacs */ ! /* Setting RX_MEMDBUG is useful if you have dbmalloc. Maybe with similar * packages too. */ #ifdef RX_MEMDBUG #include ! #endif /* RX_RX_MEMDBUG */ /* We used to test for `BSTRING' here, but only GCC and Emacs define * `BSTRING', as far as I know, and neither of them use this code. *************** *** 2192,2198 **** #else /* HAVE_STRING_H || STDC_HEADERS */ #include ! #endif /* not RX_MEMDBUG */ #ifdef STDC_HEADERS #include --- 2206,2212 ---- #else /* HAVE_STRING_H || STDC_HEADERS */ #include ! #endif /* not (HAVE_STRING_H || STDC_HEADERS) */ #ifdef STDC_HEADERS #include *************** *** 2201,2210 **** char *realloc (); #endif /* not STDC_HEADERS */ - #endif /* not emacs */ /* Define the syntax basics for \<, \>, etc. * This must be nonzero for the wordchar and notwordchar pattern * commands in re_match_2. --- 2215,2227 ---- char *realloc (); #endif /* not STDC_HEADERS */ + /* How many characters in the character set. */ + #define CHAR_SET_SIZE (1 << CHARBITS) + + #ifndef emacs /* Define the syntax basics for \<, \>, etc. * This must be nonzero for the wordchar and notwordchar pattern * commands in re_match_2. *************** *** 2212,2223 **** #ifndef Sword #define Sword 1 #endif - - /* How many characters in the character set. */ - #define CHAR_SET_SIZE (1 << CHARBITS) #define SYNTAX(c) re_syntax_table[c] RX_DECL char re_syntax_table[CHAR_SET_SIZE]; - #endif /* not emacs */ --- 2229,2236 ---- *************** *** 2347,2352 **** --- 2360,2366 ---- int test_state; struct rx_search_state search_state; + search_state.free_chunks = 0; if (!resume_state) pc = rx_outer_start; else *************** *** 2630,2637 **** startpos = ( search_state.outer_pos.pos - search_state.outer_pos.string + search_state.outer_pos.offset); ! if (startpos == search_state.outer_pos.search_end) ! goto finish; } search_state.test_match_resume_pt = rx_test_start; --- 2644,2653 ---- startpos = ( search_state.outer_pos.pos - search_state.outer_pos.string + search_state.outer_pos.offset); ! #if 0 ! /*|*/ if ((range > 0) && (startpos == search_state.outer_pos.search_end)) ! /*|*/ goto finish; ! #endif } search_state.test_match_resume_pt = rx_test_start; *************** *** 2656,2661 **** --- 2672,2681 ---- } search_state.outer_pos.pos += search_state.outer_pos.search_direction; startpos += search_state.outer_pos.search_direction; + #if 0 + /*|*/ if (search_state.test_pos.pos < search_state.test_pos.end) + /*|*/ break; + #endif } /* do interrupted for entry point... */ case rx_outer_restore_pos: *************** *** 2680,2686 **** } /* } while (...see below...) */ if ((search_state.outer_pos.search_direction == 1) ! ? (startpos < search_state.outer_pos.search_end) : (startpos > search_state.outer_pos.search_end)) goto pseudo_do; --- 2700,2706 ---- } /* } while (...see below...) */ if ((search_state.outer_pos.search_direction == 1) ! ? (startpos <= search_state.outer_pos.search_end) : (startpos > search_state.outer_pos.search_end)) goto pseudo_do; *************** *** 2728,2734 **** ? sizeof (regoff_t) * (search_state.num_regs + 1) * 2 : 0)); search_state.chunk_bytes = search_state.backtrack_frame_bytes * 64; - search_state.free_chunks = 0; search_state.test_ret = rx_test_line_finished; search_state.could_have_continued = 0; } --- 2748,2753 ---- *************** *** 3107,3114 **** case re_se_syntax: case re_se_not_syntax: #ifdef emacs ! this release lacks emacs support; ! (coming soon); #endif break; case re_se_win: --- 3126,3134 ---- case re_se_syntax: case re_se_not_syntax: #ifdef emacs ! /* ! * this release lacks emacs support ! */ #endif break; case re_se_win: *************** *** 3715,3720 **** --- 3735,3744 ---- RX_DEF_CPLX_SE(0, re_se_end_iter, = re_se_iter + 1) RX_DEF_CPLX_SE(0, re_se_tv, = re_se_end_iter + 1) + #endif + + #if RX_WANT_SE_DEFS != 1 + __END_DECLS #endif #endif diff -c gnu/libg++/libstdc++/Makefile.in:1.1.1.1 gnu/libg++/libstdc++/Makefile.in:1.2 *** gnu/libg++/libstdc++/Makefile.in:1.1.1.1 Sat May 20 00:26:29 1995 --- gnu/libg++/libstdc++/Makefile.in Sat May 20 00:26:29 1995 *************** *** 70,75 **** --- 70,79 ---- $(SHLIB): list stl.list $(CXX) $(SHFLAGS) -shared -o $(SHLIB) `cat list stl.list` $(SHDEPS) + -if [ x$(LIBSO) != x$(SHLIB) ]; then \ + rm -f $(LIBSO); \ + ln -s $(SHLIB) $(LIBSO); \ + else true; fi $(IO_DIR)/iostream.list: force cd $(IO_DIR) ; $(MAKE) $(FLAGS_TO_PASS) iostream.list diff -c gnu/libg++/libstdc++/configure.in:1.1.1.1 gnu/libg++/libstdc++/configure.in:1.3 *** gnu/libg++/libstdc++/configure.in:1.1.1.1 Sat May 20 00:26:30 1995 --- gnu/libg++/libstdc++/configure.in Sat May 20 00:26:30 1995 *************** *** 25,36 **** *-dec-osf*) frags="${frags} dec-osf.ml";; *-*-hpux*) frags="${frags} hpux.ml" ;; *-*-irix5*) frags="${frags} irix5.ml" ;; ! *-*-linuxelf*) frags="${frags} elf.ml" ;; *-*-sysv4*) frags="${frags} elf.ml" ;; *-*-solaris*) frags="${frags} elfshlibm.ml" ;; *-*-sunos4*) frags="${frags} sunos4.ml" ;; esac fi for frag in ${frags}; do frag=${srcdir}/config/$frag --- 25,40 ---- *-dec-osf*) frags="${frags} dec-osf.ml";; *-*-hpux*) frags="${frags} hpux.ml" ;; *-*-irix5*) frags="${frags} irix5.ml" ;; ! *-*-linux) frags="${frags} linux.ml" ;; *-*-sysv4*) frags="${frags} elf.ml" ;; *-*-solaris*) frags="${frags} elfshlibm.ml" ;; *-*-sunos4*) frags="${frags} sunos4.ml" ;; esac fi + + case "${target}" in + *-*-linux*) frags="${frags} linux.mt" ;; + esac for frag in ${frags}; do frag=${srcdir}/config/$frag diff -c /dev/null gnu/libg++/libstdc++/config/linux.ml:1.1 *** /dev/null Sat May 20 00:26:30 1995 --- gnu/libg++/libstdc++/config/linux.ml Sat May 20 00:26:30 1995 *************** *** 0 **** --- 1,9 ---- + # Linux running ELF. + + LIBSO = libstdc++.so + SHLIB = $(LIBSO).`cat $(srcdir)/../libg++/SHLIB.VERSION` + SHFLAGS = -Wl,-soname,$(LIBSO).`sed -e 's/\..*//' $(srcdir)/../libg++/SHLIB.VERSION` + LIBS = $(SHLIB) + DEPLIBS = ../libstdc++.so + + override SHDEPS=-lm diff -c /dev/null gnu/libg++/libstdc++/config/linux.mt:1.1 *** /dev/null Sat May 20 00:26:30 1995 --- gnu/libg++/libstdc++/config/linux.mt Sat May 20 00:26:30 1995 *************** *** 0 **** --- 1,2 ---- + # That is where we keep the g++ header files. + gxx_includedir =$(prefix)/include/g++ diff -c gnu/libg++/libstdc++/stl/Makefile.in:1.1.1.1 gnu/libg++/libstdc++/stl/Makefile.in:1.2 *** gnu/libg++/libstdc++/stl/Makefile.in:1.1.1.1 Sat May 20 00:26:30 1995 --- gnu/libg++/libstdc++/stl/Makefile.in Sat May 20 00:26:30 1995 *************** *** 1,8 **** --- 1,19 ---- #### package, host, target, and site dependent Makefile fragments come in here. ## + INCLUDES=algo.h algobase.h bvector.h defalloc.h deque.h function.h \ + heap.h iterator.h list.h map.h multimap.h multiset.h pair.h \ + projectn.h set.h stack.h tempbuf.h tree.h vector.h + STL_OBJECTS = tempbuf.o tree.o random.o stl.list: $(STL_OBJECTS) @echo "$(STL_OBJECTS)" >stl.list + install: + cd $(srcdir); \ + for FILE in $(INCLUDES) ; do \ + rm -f $(gxx_includedir)/$$FILE ; \ + $(INSTALL_DATA) $$FILE $(gxx_includedir)/$$FILE ; \ + chmod a-x $(gxx_includedir)/$$FILE ; \ + done diff -c gnu/libg++/libstdc++/stl/random.cc:1.1.1.1 gnu/libg++/libstdc++/stl/random.cc:1.2 *** gnu/libg++/libstdc++/stl/random.cc:1.1.1.1 Sat May 20 00:26:30 1995 --- gnu/libg++/libstdc++/stl/random.cc Sat May 20 00:26:30 1995 *************** *** 35,42 **** void __random_generator::seed(unsigned long j) { unsigned long k = 1; table[54] = j; ! for (size_t i = 0; i < 55; i++) { size_t ii = 21 * i % 55; table[ii] = k; k = j - k; --- 35,43 ---- void __random_generator::seed(unsigned long j) { unsigned long k = 1; + size_t i; table[54] = j; ! for (i = 0; i < 55; i++) { size_t ii = 21 * i % 55; table[ii] = k; k = j - k; diff -c gnu/libg++/libstdc++/tests/tlist.cc:1.1.1.1 gnu/libg++/libstdc++/tests/tlist.cc:1.2 *** gnu/libg++/libstdc++/tests/tlist.cc:1.1.1.1 Sat May 20 00:26:30 1995 --- gnu/libg++/libstdc++/tests/tlist.cc Sat May 20 00:26:31 1995 *************** *** 21,27 **** return x + 1; } ! int plus(int x, int y) { return x + y; } --- 21,27 ---- return x + 1; } ! int my_plus(int x, int y) { return x + y; } *************** *** 105,118 **** int red = 0; for (it = a.begin(); it != a.end(); it++) red += *it; ! cout << "\nint red = a.reduce(plus, 0);\n"; cout << red; it = a.begin(); ++it; ++it; int second = *it; cout << "\nint second = a[2];\n"; cout << second; list g; for (it = a.begin(), bit = b.begin(); it != a.end () && bit != b.end (); ) g.insert (g.end (), *it++ + *bit++); ! cout << "\nlist g = combine(plus, a, b);\n"; print(g); #if 1 for (it = g.begin(); it != g.end(); ) { --- 105,118 ---- int red = 0; for (it = a.begin(); it != a.end(); it++) red += *it; ! cout << "\nint red = a.reduce(my_plus, 0);\n"; cout << red; it = a.begin(); ++it; ++it; int second = *it; cout << "\nint second = a[2];\n"; cout << second; list g; for (it = a.begin(), bit = b.begin(); it != a.end () && bit != b.end (); ) g.insert (g.end (), *it++ + *bit++); ! cout << "\nlist g = combine(my_plus, a, b);\n"; print(g); #if 1 for (it = g.begin(); it != g.end(); ) { diff -c gnu/libg++/libstdc++/tests/tlist.exp:1.1.1.1 gnu/libg++/libstdc++/tests/tlist.exp:1.2 *** gnu/libg++/libstdc++/tests/tlist.exp:1.1.1.1 Sat May 20 00:26:31 1995 --- gnu/libg++/libstdc++/tests/tlist.exp Sat May 20 00:26:31 1995 *************** *** 17,27 **** list f = select(is_odd, a); 1 3 5 7 9 11 13 15 17 19 ! int red = a.reduce(plus, 0); 210 int second = a[2]; 3 ! list g = combine(plus, a, b); 29 29 8 21 49 12 16 48 24 36 60 47 28 62 28 43 42 43 28 26 g.del(is_odd); --- 17,27 ---- list f = select(is_odd, a); 1 3 5 7 9 11 13 15 17 19 ! int red = a.reduce(my_plus, 0); 210 int second = a[2]; 3 ! list g = combine(my_plus, a, b); 29 29 8 21 49 12 16 48 24 36 60 47 28 62 28 43 42 43 28 26 g.del(is_odd);