Changeset 2541
- Timestamp:
- 2001-06-13T12:24:49+12:00 (23 years ago)
- Location:
- trunk/gsdl/src/mgpp/text
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/mgpp/text/Makefile.in
r2477 r2541 36 36 AR = ar 37 37 CC = @CC@ 38 C PP= @CXX@38 CXX = @CXX@ 39 39 CFLAGS = @CFLAGS@ -ansi -DSILENT -DSHORT_SUFFIX 40 C PPFLAGS = @CPPFLAGS@ -ansi-DSILENT -DSHORT_SUFFIX40 CXXFLAGS = @CXXFLAGS@ -DSILENT -DSHORT_SUFFIX 41 41 DEFS = @DEFS@ 42 42 RANLIB = @RANLIB@ … … 56 56 # 57 57 ########################################## 58 58 GSDLOS = @gsdlos@ 59 59 60 60 bindir = $(top_srcdir)/bin/$(GSDLOS) … … 64 64 mandir = $(prefix)/man/man1 65 65 66 COMPILE = $(CC) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(C PPFLAGS) $(CFLAGS)67 C PPCOMPILE = $(CPP) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)66 COMPILE = $(CC) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CFLAGS) 67 CXXCOMPILE = $(CXX) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CXXFLAGS) 68 68 LINK = $(CC) $(LDFLAGS) -o $@ 69 69 … … 75 75 .SUFFIXES: .cpp .o 76 76 .cpp.o: 77 $(C PPCOMPILE) -D__cplusplus$<77 $(CXXCOMPILE) $< 78 78 79 79 … … 158 158 159 159 depend: 160 makedepend -Y -- $(DEFS) $(INCLUDES) $(C PPFLAGS) $(CFLAGS) -- $(SOURCES)160 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) $(CFLAGS) -- $(SOURCES) 161 161 162 162 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -
trunk/gsdl/src/mgpp/text/comp_dict.cpp
r2468 r2541 81 81 words = ht->words; 82 82 83 bzero ((char *) ht->table, ht_size * sizeof (ht->table[0]));83 memset (ht->table, '\0', ht_size * sizeof (ht->table[0])); 84 84 85 85 if (!(allwords = (u_char *) Xmalloc (sizeof (u_char) * cfh->uncompressed_size))) -
trunk/gsdl/src/mgpp/text/text.pass1.cpp
r2468 r2541 41 41 #include "TextEl.h" 42 42 43 /* for more meaningful messages - jrm21 (gsdl) */ 44 #ifdef HAVE_STRERROR 45 #include <string.h> 46 #include <errno.h> 47 #endif 48 49 43 50 #define POOL_SIZE 1024*1024 44 51 #define INITIAL_HASH_SIZE 7927 … … 111 118 } 112 119 ChangeMem (sizeof (hash_rec) * dd->HashSize); 113 bzero ((char *) (dd->HashTable), sizeof (hash_rec) * dd->HashSize);120 memset (dd->HashTable,'\0' , sizeof (hash_rec) * dd->HashSize); 114 121 115 122 word = Pool; … … 222 229 } 223 230 ChangeMem (sizeof (hash_rec) * size); 224 bzero ((char *) ht, sizeof (hash_rec) * size);231 memset (ht, '\0', sizeof (hash_rec) * size); 225 232 226 233 for (i = 0; i < dd->HashSize; i++) … … 349 356 if (!(fp = create_file (file_name, TEXT_STATS_DICT_SUFFIX, "wb", 350 357 MAGIC_STATS_DICT, MG_MESSAGE))) /* [RPAP - Feb 97: WIN32 Port] */ 351 return COMPERROR; 352 358 { 359 #ifdef HAVE_STRERROR 360 fprintf(stderr,"Couldn't create file %s:%s\n", 361 file_name, 362 strerror(errno) 363 ); 364 #endif 365 return COMPERROR; 366 } 367 353 368 temp_str = msg_prefix; 354 369 msg_prefix = "text.pass1"; -
trunk/gsdl/src/mgpp/text/text.pass2.cpp
r2468 r2541 118 118 119 119 // write out the compressed text header 120 bzero ((char *) &cth, sizeof (cth));120 memset (&cth, '\0', sizeof (cth)); 121 121 if (fwrite (&cth, sizeof (cth), 1, text) != 1) 122 122 return COMPERROR; … … 139 139 nht[i].HashSize = INITIAL_HASH_SIZE; 140 140 nht[i].HashTable = (novel_hash_rec *) Xmalloc (sizeof (novel_hash_rec) * nht[i].HashSize); 141 bzero ((char *) nht[i].HashTable,141 memset (nht[i].HashTable, '\0', 142 142 sizeof (novel_hash_rec) * nht[i].HashSize); 143 143 nht[i].HashUsed = 0; … … 329 329 return (COMPERROR); 330 330 } 331 bzero ((char *) ht, sizeof (novel_hash_rec) * size);331 memset (ht, '\0', sizeof (novel_hash_rec) * size); 332 332 333 333 for (i = 0; i < h->HashSize; i++) … … 467 467 long lens[16], flens[16]; 468 468 char_pool *cp; 469 bzero ((char *) chars, sizeof (chars));470 bzero ((char *) lens, sizeof (lens));469 memset (chars, '\0', sizeof (chars)); 470 memset (lens, '\0', sizeof (lens)); 471 471 for (cp = nht[i].first_pool; cp; cp = cp->next) 472 472 {
Note:
See TracChangeset
for help on using the changeset viewer.