2 ***********************************************************
3 $SNARK_Header: S N A R K 1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4 $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/errorc.c $
5 $LastChangedRevision: 85 $
6 $Date: 2014-07-02 16:07:08 -0400 (Wed, 02 Jul 2014) $
8 ***********************************************************
10 Previously part of SuperSNARK
15 #include "experimenter.h"
18 /* ------------------------ error_message.c ------------------------ */
20 /* function to handle error messages */
22 void errorc(char* str1, char* str2)
24 char message[MAXLINESIZE];
26 strcpy(message, str1);
27 strcat(message, str2);
28 strcat(message, "\n");
29 fprintf(stderr, message);
33 //bug 269 - jklukowska
34 //returns true if the line should be skipped (because it is blank
35 //or starts with a * - comment line)
36 int isSkip(char * line)
39 while (line[i] == ' ' || line[i] == '\t' || line[i] == '\n')
41 //if the next character is null return true
44 //or if the first non white space character is a star
45 else if (line[i] == '*')
51 int isBlank(char * line)
54 while (line[i] == ' ' || line[i] == '\t' || line[i] == '\n')
56 //if the next character is null return true
63 int isComment(char * line)
66 while (line[i] == ' ' || line[i] == '\t' || line[i] == '\n')
68 //if the first non white space character is a star
75 int isValidObject(char * line)
77 if (strncasecmp(line, "elip", 4) == 0 || strncasecmp(line, "rect", 4) == 0
78 || strncasecmp(line, "tria", 4) == 0
79 || strncasecmp(line, "segm", 4) == 0
80 || strncasecmp(line, "sect", 4) == 0)