Changeset 1421
- Timestamp:
- 10/15/07 09:39:05 (11 months ago)
- Files:
-
- nebula/trunk/src/nebula.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nebula/trunk/src/nebula.c
r1419 r1421 58 58 int i, qsize; 59 59 u_char time_sort, *content, *tmpbuf; 60 char option, *dirname ;60 char option, *dirname, *filename; 61 61 hash *tmp_hash; 62 62 qelem *cur_hq, *tmp_hq; … … 214 214 215 215 for (n=0; n<total_files; n++) { 216 bstr = bstr_map(namelist[n]->d_name); 216 filename = (dirname ? namelist[n]->d_name : argv[n+i]); 217 218 bstr = bstr_map(filename); 217 219 num_of_files++; 218 220 #ifdef PROFILE … … 221 223 #endif 222 224 223 if (verbose) printf(" processing file %s.\n", namelist[n]->d_name);225 if (verbose) printf(" processing file %s.\n", filename); 224 226 else if (show_progress) { 225 227 printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); … … 257 259 ((hash*)t->data)->cnt++; 258 260 // set filename 259 if ((((hash*)t->data)->filename = strdup( namelist[n]->d_name)) == NULL) {261 if ((((hash*)t->data)->filename = strdup(filename)) == NULL) { 260 262 fprintf(stderr, "Error - Unable to allocate memory: %m.\n"); 261 263 exit(EXIT_FAILURE);
