fprintf(qhferr,"qhull warning: option 'TI' mistyped.\nUse 'TI', one space, file name, and space or end-of-line.\nDo not use quotes. Option 'FI' ignored.\n");
}else{/* not a procedure because of qh_option (filename, NULL, NULL); */
charfilename[500],*t=filename;
s++;
while(*s){
if(t-filename>=sizeof(filename)-2){
fprintf(qhferr,"qhull error: filename for 'TI' too long.\n");
qh_errexit(qh_ERRinput,NULL,NULL);
}
if(isspace(*s))
break;
*(t++)=*s++;
}
*t='\0';
if(!freopen(filename,"r",stdin)){
fprintf(qhferr,"qhull error: could not open file \"%s\".",filename);
qh_errexit(qh_ERRinput,NULL,NULL);
}else{
qh_option("TInput-file",NULL,NULL);
qh_option(filename,NULL,NULL);
}
}
break;
case'O':
if(s[0]!=' '||s[1]=='\"'||isspace(s[1])){
s++;
fprintf(qhferr,"qhull warning: option 'TO' mistyped.\nUse 'TO', one space, file name, and space or end-of-line.\nThe file name may be enclosed in single quotes.\nDo not use double quotes. Option 'FO' ignored.\n");
}else{/* not a procedure because of qh_option (filename, NULL, NULL); */
charfilename[500],*t=filename;
boolTisquote=False;
s++;
if(*s=='\''){
isquote=True;
s++;
}
while(*s){
if(t-filename>=sizeof(filename)-2){
fprintf(qhferr,"qhull error: filename for 'TO' too long.\n");
qh_errexit(qh_ERRinput,NULL,NULL);
}
if(isquote){
if(*s=='\''){
s++;
isquote=False;
break;
}
}elseif(isspace(*s))
break;
*(t++)=*s++;
}
*t='\0';
if(isquote)
fprintf(qhferr,"qhull error: missing end quote for option 'TO'. Rest of line ignored.\n");
elseif(!freopen(filename,"w",stdout)){
fprintf(qhferr,"qhull error: could not open file \"%s\".",filename);
qh_errexit(qh_ERRinput,NULL,NULL);
}else{
qh_option("TOutput-file",NULL,NULL);
qh_option(filename,NULL,NULL);
}
}
break;
case'P':
if(!isdigit(*s))
fprintf(qhferr,"qhull warning: missing point id for trace option 'TPn'. Ignored\n");
else{
qhTRACEpoint=qh_strtol(s,&s);
qh_option("Trace-point",&qhTRACEpoint,NULL);
}
break;
case'M':
if(!isdigit(*s))
fprintf(qhferr,"qhull warning: missing merge id for trace option 'TMn'. Ignored\n");
else{
qhTRACEmerge=qh_strtol(s,&s);
qh_option("Trace-merge",&qhTRACEmerge,NULL);
}
break;
case'R':
if(!isdigit(*s))
fprintf(qhferr,"qhull warning: missing rerun count for trace option 'TRn'. Ignored\n");
else{
qhRERUN=qh_strtol(s,&s);
qh_option("TRerun",&qhRERUN,NULL);
}
break;
case'V':
i=qh_strtol(s,&t);
if(s==t)
fprintf(qhferr,"qhull warning: missing furthest point id for trace option 'TVn'. Ignored\n");
elseif(i<0){
qhSTOPpoint=i-1;
qh_option("TV-stop-before-point",&i,NULL);
}else{
qhSTOPpoint=i+1;
qh_option("TV-stop-after-point",&i,NULL);
}
s=t;
break;
case'W':
if(!isdigit(*s))
fprintf(qhferr,"qhull warning: missing max width for trace option 'TWn'. Ignored\n");