pike.git / src / test / verifymanual.lpc

version» Context lines:

pike.git/src/test/verifymanual.lpc:28:    {    perror("Double docs for "+name+" ("+pages[name]+" and "+path+")\n");    errs++;    }    pages[name]=path;    }       int partno;    foreach(explode(cont,"============================================================================\n"),part)    { +  string part_name="error";    list headers = (<>);    partno++;       if(!strlen(part)) continue;       foreach(explode(part,"\n\n"), section)    {    if(!strlen(section)) continue;    if(section[0]>='A' && section[0]<='Z')    {
pike.git/src/test/verifymanual.lpc:70:       if(reg1::match(rest))    {    perror("Header "+type+" in "+path+" part "+partno+" not properly indented.\n");    errs++;    }       switch(type)    {    case "NAME": -  if(sscanf(rest,"\t%s - %s",a,b)!=2) +  if(sscanf(rest,"\t%s - %s",part_name,b)!=2)    {    perror("Error in header "+type+" in "+path+" part "+partno+".\n");    errs++;    }    if(sscanf(b,"%*s\n"))    {    perror("NAME header is more than one line in header "+type+" in "+path+" part "+partno+".\n");    errs++;    }    break;    -  +  case "SYNTAX": +  if(efuns[name] && search(rest, part_name)==-1) +  { +  perror("SYNTAX header does not contain name in "+path+" part "+partno+".\n"); +  errs++; +  } +  break; +     case "SEE ALSO":    rest=replace(rest,({"\n",",","\t"}),({" "," "," "}));    see_also|=mklist((rest/" ")-({" "})); -  +  break;    }    }    }       if(!headers["NAME"])    {    perror(path+" part "+partno+" is missing NAME header.\n");    errs++;    }