diff --git a/Install.e b/Install.e index ec03fa1..4de39fb 100644 --- a/Install.e +++ b/Install.e @@ -19,7 +19,7 @@ MODULE 'window','classes/window', 'reaction/reaction_macros', 'reaction/reaction_lib' -#define VERSION 'Amiget Installer v1.0 (29.03.2024)' +#define VERSION 'Amiget Installer v1.1 (29.04.2024)' ->InstallWindow gadgets ENUM LAYOUT_5, SPACE_6, LAYOUT_8, SPACE_9, BITMAP_11, BITMAP_12, BITMAP_13, @@ -212,7 +212,7 @@ PROC installwindow() HANDLE LAYOUT_ADDIMAGE, mainGadgets[LABEL_21]:=LabelObject, GA_ID, LABEL_21, LABEL_DRAWINFO, gDrawInfo, - LABEL_TEXT, 'Amiget V1.0 (29.03.2024)', + LABEL_TEXT, VERSION, LABEL_JUSTIFICATION, LJ_CENTER, LabelEnd, LayoutEnd, diff --git a/amiget.e b/amiget.e index b438d33..2fb3ca5 100644 --- a/amiget.e +++ b/amiget.e @@ -1,5 +1,5 @@ ->-------------------------------------------<- --> Amiget v1.0 (29/03/2024) +-> Amiget v1.1 (29/04/2024) -> Coded by emarti, Murat Ozdemir ->-------------------------------------------<- @@ -7,7 +7,7 @@ OPT OSVERSION=37 OPT PREPROCESS OPT LARGE -#define VERSION 'Amiget v1.0 (29.03.2024)' +#define VERSION 'Amiget v1.1 (29.04.2024)' MODULE 'ftpaminet', 'dos/dos', @@ -132,17 +132,11 @@ PROC main() WriteF('\e[1;31;40m\aamisearch\a not found.\e[0;31;40m Try reinstalling \aAmiget\a to fix the problem\n') JUMP end2 ENDIF - MidStr(searchwords, arg, 3, ALL) - StrCopy(searchwords, TrimStr(searchwords)) - IF StrLen(searchwords)<2 - WriteF('Insufficient length for search\n') - JUMP end2 - ENDIF -> sort and order StrCopy(sort, 'n') StrCopy(ord, 'a') - + paramIndex:=2 REPEAT -> sort by name IF (paramStr[paramIndex]="n") THEN StrCopy(sort, 'n') @@ -158,6 +152,13 @@ PROC main() IF (paramStr[paramIndex]="z") THEN StrCopy(ord, 'z') paramIndex++ UNTIL paramIndex > StrLen(paramStr) + + MidStr(searchwords, arg, paramIndex, ALL) + StrCopy(searchwords, TrimStr(searchwords)) + IF StrLen(searchwords)<2 + WriteF('Insufficient length for search\n') + JUMP end2 + ENDIF StringF(searchwords, 'amisearch \s\s \s', sort, ord, searchwords); prerunamisearch: diff --git a/amisearch.c b/amisearch.c index c5e98de..551b6e4 100644 --- a/amisearch.c +++ b/amisearch.c @@ -4,7 +4,7 @@ delete #?.o #?.lnk quit */ /* - Amisearch v1.0 (29.03.2024) + Amisearch v1.1 (29.04.2024) Coded by emarti, Murat Ozdemir */ @@ -30,7 +30,7 @@ quit #define DARK "darkrow" #define BUFFER 0x0400 -UBYTE *vers = "\0$VER: amisearch 1.0 (29.03.2024) emarti, Murat Ozdemir\r\n\0"; +UBYTE *vers = "\0$VER: amisearch 1.1 (29.04.2024) emarti, Murat Ozdemir\r\n\0"; BPTR file, htmlfile; char **arrline; @@ -62,8 +62,6 @@ int main(int argc, char* argv[]) { time_t t; struct tm *dt; char strdate[0xff]; - char opt[3]; - signal(SIGINT, INThandler); @@ -86,8 +84,7 @@ int main(int argc, char* argv[]) { if (i!=argc-1) strcat(url, "+"); } //strcat(url, "&start=0"); - strcpy(opt, argv[1]); - switch (opt[0]) + switch (argv[1][0]) { case 'n': strcat(url, "&sort=name");break; case 'p': strcat(url, "&sort=path");break; @@ -96,7 +93,7 @@ int main(int argc, char* argv[]) { default: break; } - switch (opt[1]) + switch (argv[1][1]) { case 'a': strcat(url, "&ord=no");break; case 'z': strcat(url, "&ord=DESC");break; @@ -124,7 +121,8 @@ int main(int argc, char* argv[]) { // html->data htmlfile = Open(htmlfilename, MODE_OLDFILE); if (htmlfile == NULL) { - printf("HTML file not found\n"); + printf("HTML file not found.\n"); // If not HTTP, html file not download + printf("Aminet server protocol may have been changed to HTTPS. Please, try again later.\n"); return -2; }