void warning ( long msg_id, ... ) { va_list arglist; /* Return if warnings are suppressed. */ if (ERR_no_warnings) return; if (current_file) message_print(NIDL_LINEFILE, current_file, yylineno_p ? *yylineno_p : 0); va_start (arglist, msg_id); vmessage_print (msg_id, arglist); va_end (arglist); if (++warnings > MAX_WARNINGS) { message_print(NIDL_MAXWARN, MAX_WARNINGS); nidl_terminate(); } }
void print_errors_for_line ( FILE *fd, char const *source, STRTAB_str_t source_id, error_log_rec_t *log_rec_ptr ) { char source_line[MAX_LINE_LEN]; boolean source_printed = false; error_log_rec_t *erp; /* Print the error only if it in this file */ if (source_id == log_rec_ptr->filename) { source_printed = true; seek_for_line(fd, log_rec_ptr->lineno, source_line); message_print( NIDL_FILESOURCE, source, log_rec_ptr->lineno, source_line ); message_print( log_rec_ptr->msgs.msg_id, log_rec_ptr->msgs.arg[0], log_rec_ptr->msgs.arg[1], log_rec_ptr->msgs.arg[2], log_rec_ptr->msgs.arg[3], log_rec_ptr->msgs.arg[4] ); } for (erp = log_rec_ptr->first_this_line; erp; erp=erp->links.asList.next) { /* Print the error only if it in this file */ if (source_id == erp->filename) { /* If we haven't output the source line text yet, the do so */ if (!source_printed) { source_printed = true; seek_for_line(fd, log_rec_ptr->lineno, source_line); message_print( NIDL_FILESOURCE, source, log_rec_ptr->lineno, source_line ); } /* Now print out the actual error message */ message_print( erp->msgs.msg_id, erp->msgs.arg[0], erp->msgs.arg[1], erp->msgs.arg[2], erp->msgs.arg[3], erp->msgs.arg[4] ); } } }
void error_list ( int vecsize, idl_error_list_p errvec, boolean exitflag ) { int i; for (i = 0; i < vecsize; i++) { message_print(errvec[i].msg_id, errvec[i].arg[0], errvec[i].arg[1], errvec[i].arg[2], errvec[i].arg[3], errvec[i].arg[4] ); } if (!exitflag) return; #ifndef HASPOPEN sysdep_cleanup_temp(); #endif nidl_terminate(); }
/* ** n i d l _ t e r m i n a t e ** ** This routine utilizes setjmp/longjmp to perform an orderly termination ** of the idl compiler. */ void nidl_terminate ( void ) { extern void *errors; if (errors == NULL) { /* * No errors logged, yet we're terminating. Better issue a generic * "compilation aborted" message since this is probably an unhandled * internal compiler error. */ message_print(NIDL_COMPABORT); } longjmp(nidl_termination_jmp_buf,1); }
void error ( long msg_id, ... ) { va_list arglist; if (current_file) message_print(NIDL_LINEFILE, current_file, yylineno_p ? *yylineno_p : 0); va_start (arglist, msg_id); vmessage_print (msg_id, arglist); va_end (arglist); #ifndef HASPOPEN sysdep_cleanup_temp(); #endif nidl_terminate(); }