Lines 57-74
void _ssgParser::error( const char *form
Link Here
|
57 |
char msgbuff[ 255 ]; |
57 |
char msgbuff[ 255 ]; |
58 |
va_list argp; |
58 |
va_list argp; |
59 |
|
59 |
|
60 |
char* msgptr = msgbuff; |
|
|
61 |
if (linenum) |
62 |
{ |
63 |
msgptr += sprintf ( msgptr,"%s, line %d: ", |
64 |
path, linenum ); |
65 |
} |
66 |
|
67 |
va_start( argp, format ); |
60 |
va_start( argp, format ); |
68 |
vsprintf( msgptr, format, argp ); |
61 |
vsnprintf( msgbuff, sizeof(msgbuff), format, argp ); |
69 |
va_end( argp ); |
62 |
va_end( argp ); |
70 |
|
63 |
|
71 |
ulSetError ( UL_WARNING, "%s", msgbuff ) ; |
64 |
if (linenum) |
|
|
65 |
{ |
66 |
ulSetError ( UL_WARNING, "%s, line %d: %s", path, linenum, msgbuff ) ; |
67 |
} else { |
68 |
ulSetError ( UL_WARNING, "%s", msgbuff ) ; |
69 |
} |
72 |
} |
70 |
} |
73 |
|
71 |
|
74 |
|
72 |
|
Lines 78-95
void _ssgParser::message( const char *fo
Link Here
|
78 |
char msgbuff[ 255 ]; |
76 |
char msgbuff[ 255 ]; |
79 |
va_list argp; |
77 |
va_list argp; |
80 |
|
78 |
|
81 |
char* msgptr = msgbuff; |
|
|
82 |
if (linenum) |
83 |
{ |
84 |
msgptr += sprintf ( msgptr,"%s, line %d: ", |
85 |
path, linenum ); |
86 |
} |
87 |
|
88 |
va_start( argp, format ); |
79 |
va_start( argp, format ); |
89 |
vsprintf( msgptr, format, argp ); |
80 |
vsnprintf( msgbuff, sizeof(msgbuff), format, argp ); |
90 |
va_end( argp ); |
81 |
va_end( argp ); |
91 |
|
82 |
|
92 |
ulSetError ( UL_DEBUG, "%s", msgbuff ) ; |
83 |
if (linenum) |
|
|
84 |
{ |
85 |
ulSetError ( UL_DEBUG, "%s, line %d: %s", path, linenum, msgbuff ) ; |
86 |
} else { |
87 |
ulSetError ( UL_DEBUG, "%s", msgbuff ) ; |
88 |
} |
93 |
} |
89 |
} |
94 |
|
90 |
|
95 |
// Opens the file and does a few internal calculations based on the spec. |
91 |
// Opens the file and does a few internal calculations based on the spec. |