/* library. */
/* */
/********************************************************/
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
*/
/********************************************************/
/* */
+/* Procedure to scan a line from the test file */
+/* */
+/********************************************************/
+static int scanline(FILE *fichier)
+
+{
+int status;
+int num;
+char line[300];
+
+status=0;
+num=0;
+while (fgets(line,sizeof(line),fichier)!=(char *)0) {
+ char *ptr;
+
+ num++;
+ if ((ptr=strchr(line,'#'))!=(char *)0)
+ *ptr='\000';
+ if (strlen(line)==0)
+ continue;
+ (void) rou_alert(0,"JMPDBG line='%d' <%s>",num,line);
+ }
+return status;
+}
+/*
+\f
+*/
+/********************************************************/
+/* */
/* Procedure to scan one file stop at soon test */
/* line is not successful. */
/* */
{
int status;
+char *rootname;
+FILE *fichier;
+int phase;
+_Bool proceed;
-status=0;
+status=-1;
+rootname=rou_apppath(testfile);
+phase=0;
+proceed=true;
+while (proceed==true) {
+ switch (phase) {
+ case 0 : //using root directory if need
+ if ((fichier=fopen(rootname,"r"))==(FILE *)0) {
+ (void) rou_alert(0,"Unable to open file <%s> (error=<%s>)",
+ rootname,strerror(errno));
+ phase=999; //no need to go further
+ }
+ break;
+ case 1 : //scan the file
+ (void) scanline(fichier);
+ break;
+ case 2 : //scan the file
+ (void) fclose(fichier);
+ status=0;
+ break;
+ default : //SAFE guard
+ proceed=false;
+ break;
+ }
+ phase++;
+ }
+rootname=rou_freestr(rootname);
return status;
}
/*
(void) prc_modeuniprc(true);
(void) spf_modegesspf(true);
(void) prc_preptitle(argc,argv,environ);
+ foreground=true;
break;
case 3 : //doing main tash
(void) testfiles(params);