Finish work on file search

This commit is contained in:
Andrew Pamment 2017-10-19 13:40:42 +10:00
parent b24034fc52
commit cf4e5826bf
2 changed files with 8 additions and 9 deletions

View File

@ -234,3 +234,7 @@ File exists!\r\n
\r\n\e[1;37mOrder by (\e[1;32mF\e[1;37m)ilename, (\e[1;32mU\e[1;37m)pload Date, (\e[1;32mP\e[1;37m)opularity : \e[0m
\e[24;1H\e[1;32mUp / Down\e[1;37m to Scroll, \e[1;32mLeft / Right \e[1;37mChange Message, \e[1;32mR \e[1;37mReply, \e[1;32mJ \e[1;37mNext Area, \e[1;32mQ \e[1;37mQuit\e[K\e[0m
\e[0;36mB. \e[1;37mBluewave Packet Style (\e[1;33m%s\e[1;37m)\r\n
\r\n\e[1;37mSearch by (\e[1;32mF\e[1;37m)ilename, (\e[1;32mD\e[1;37m)escription or (\e[1;32mB\e[1;37m)oth:\e[0m
\r\n\e[1;37mSearch in (\e[1;32C\e[1;37m)urrent area or (\e[1;32A\e[1;37m)ll areas:\e[0m
\r\n\e[1;31mPlease enter at least one keyword.\e[0m\r\n
\r\n\e[1;37mKeywords:\e[0m

View File

@ -1056,12 +1056,7 @@ void file_search() {
int files_c;
struct file_entry **files_e;
if (!sqlite3_compileoption_used("SQLITE_ENABLE_FTS3")) {
s_printf("\r\nSorry, search is unavailable. Please recompile sqlite3 with FTS3 support.\r\n");
return;
}
s_printf("\r\nSearch by (F)ilename, (D)escription or (B)oth: ");
s_printf(get_string(236));
ch = s_getc();
switch(tolower(ch)) {
@ -1073,19 +1068,19 @@ void file_search() {
break;
}
s_printf("\r\nSearch in (C)urrent area or (A)ll areas: ");
s_printf(get_string(237));
ch = s_getc();
if (tolower(ch) == 'a') {
all = 1;
}
s_printf("\r\nKeywords: ");
s_printf(get_string(239));
s_readstring(buffer, 128);
if (strlen(buffer) == 0) {
s_printf("\r\nPlease enter at least one keyword.\r\n");
s_printf(get_string(238));
return;
}
ptr = strtok(buffer, " ");