Changeset 1561
- Timestamp:
- 12/03/04 13:07:12 (4 years ago)
- Files:
-
- trunk/swish-e/src/swish.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/swish-e/src/swish.c
r1553 r1561 294 294 printf(" -R : next param is Rank Scheme number (0 to 1) [0].\n"); 295 295 #ifdef USE_BTREE 296 printf(" -r : remove: remove files from index\n");296 printf(" -r : remove: remove files from index\n"); 297 297 #endif 298 298 … … 345 345 346 346 347 /* 348 -- init swish structure 347 /* 348 -- init swish structure 349 349 */ 350 350 … … 672 672 case 'd': /* old-style custom delimiter */ 673 673 case 'o': /* don't use pre-sorted indexes */ 674 case 'R': /* Ranking Scheme -- default is 1 */674 case 'R': /* Ranking Scheme -- default is 1 */ 675 675 argv = fetch_search_params( sw, argv, params, c ); 676 676 break; … … 711 711 progerr(" '-k' requires a character (or '*')."); 712 712 713 if ( strlen( w ) != 1 ) 713 if ( strlen( w ) != 1 ) 714 714 progerr(" '-k' requires a character (or '*')."); 715 715 … … 846 846 { 847 847 if ( !is_another_param( argv ) ) 848 progerr(" '-i' requires a list of index files."); 849 850 if((params->run_mode != MODE_UPDATE) || 851 (params->run_mode != MODE_REMOVE)) /* Preserve update mode */ 848 progerr(" '-i' requires a list of things to index."); 849 850 /* Set run_mode to index, unless in update/remove mode */ 851 852 if ( (params->run_mode != MODE_UPDATE) && (params->run_mode != MODE_REMOVE) ) 852 853 params->run_mode = MODE_INDEX; 853 854 … … 892 893 893 894 if((params->run_mode != MODE_UPDATE) || 894 (params->run_mode != MODE_REMOVE)) /* Preserve update mode */ 895 (params->run_mode != MODE_REMOVE)) /* Preserve update mode */ 895 896 params->run_mode = MODE_INDEX; 896 897 … … 1149 1150 params->disp_props = addswline( params->disp_props, w); 1150 1151 1151 break; 1152 break; 1152 1153 } 1153 1154 … … 1217 1218 1218 1219 1219 /* Ranking Scheme */1220 case 'R': 1221 sw->RankScheme = get_param_number( &argv, switch_char );1222 break;1220 /* Ranking Scheme */ 1221 case 'R': 1222 sw->RankScheme = get_param_number( &argv, switch_char ); 1223 break; 1223 1224 1224 1225 /* Ignore sorted indexes */ … … 1260 1261 1261 1262 /************************************************************************* 1262 * Dumps the index file(s) 1263 * Dumps the index file(s) 1263 1264 * 1264 1265 **************************************************************************/ … … 1337 1338 sw->TotalWords = sw->indexlist->header.totalwords; 1338 1339 sw->TotalFiles = sw->indexlist->header.totalfiles; 1339 sw->TotalWordPos = sw->indexlist->header.total_word_positions;1340 sw->TotalWordPos = sw->indexlist->header.total_word_positions; 1340 1341 1341 1342 /* Adjust filenum to totalfiles */ … … 1468 1469 1469 1470 OutputKeyChar(sw, (int) (unsigned char) params->keychar); 1470 } 1471 } 1471 1472 1472 1473 … … 1489 1490 1490 1491 1491 /* Open index files */ 1492 1493 if ( !SwishAttach(sw) ) 1492 /* Open index files */ 1493 1494 if ( !SwishAttach(sw) ) 1494 1495 SwishAbortLastError( sw ); 1495 1496 … … 1562 1563 resultHeaderOut(sw, 1, ".\n"); 1563 1564 } 1564 else 1565 else 1565 1566 resultHeaderOut(sw, 1, "err: no results\n.\n"); 1566 1567 … … 1588 1589 struct swline *cur_line; 1589 1590 1590 /* Coalesce all remaining locations */1591 /* Coalesce all remaining locations */ 1591 1592 coalesce_all_word_locations(sw, sw->indexlist); 1592 1593
