#define FNAME "feeder"
+static char titre[100]; //test title
+static char testname[100]; //dest description
/*
\f
*/
break;
case 2 : //get available character
if (strncmp(line,received,tocheck)!=0) {
- (void) rou_alert(0,"Line %04d: Error!",numline);
+ (void) rou_alert(0,"\n%s\tline %04d, fatal error! (on %s)",
+ titre,numline,testname);
(void) rou_alert(0,"expecting\t'%s'",line);
(void) rou_alert(0,"found\t\t'%s'",received);
phase=999;
break;
case 2 : //discarding comment
switch (line[0]) {
+ case 'T' : //Get the test titre
+ status=strncpy(testname,line+2,sizeof(testname));
+ break;
case 'R' : //Receiving data
status=doincoming(socptr,numline,line+2);
break;
_Bool proceed;
status=false;
+(void) strcpy(testname,"");
fichier=(FILE *)0;
numline=0;
(void) strcpy(line,"");
//(void) rou_alert(0,"JMPDBG scanfile phase='%d'",phase);
switch (phase) {
case 0 : //checking parameters
- (void) fprintf(stdout,"Scanning file <%s>\n",filename);
+ (void) rou_alert(0,"Scanning file <%s>",filename);
+ if (filename!=(char *)0) {
+ const char *ptr;
+
+ if ((ptr=strrchr(filename,'/'))!=(const char *)0)
+ ptr++;
+ else
+ ptr=filename;
+ (void) snprintf(titre,sizeof(titre),"%s:",ptr);
+ }
if ((fichier=fopen(filename,"r"))==(FILE *)0) {
(void) rou_alert(0,"Unable to open file <%s> (error=<%s>",
filename,strerror(errno));