home *** CD-ROM | disk | FTP | other *** search
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <proto/exec.h>
- #include <proto/dos.h>
-
- int main(int argc,char *argv[])
- {
- FILE *file;
- short trovato;
- char *p,
- buffer1[200],
- buffer2[400];
-
-
-
- strcpy(buffer1,argv[1]);
- strcat(buffer1,"=");
-
- if (!(file=fopen("SCOPTIONS","r"))) exit(5);
-
- trovato=FALSE;
- while((!feof(file))&&(!trovato))
- {
- fgets(buffer2,sizeof(buffer2)-1,file);
- if (!strnicmp(buffer1,buffer2,strlen(buffer1))) trovato=TRUE;
- }
-
- fclose(file);
-
- if (!trovato) p="";
- else p=buffer2+strlen(buffer1);
-
- SetVar("OPTION",p,-1,GVF_LOCAL_ONLY);
-
- if (!trovato) exit(5);
- else exit(0);
- }
-