home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Education Sampler 1992 [NeXTSTEP]
/
Education_1992_Sampler.iso
/
NeXT
/
GnuSource
/
cc-61.0.1
/
cc
/
event-diffs
< prev
next >
Wrap
Text File
|
1991-07-19
|
9KB
|
338 lines
*** ../../fsf2/toplev.c Thu May 23 13:29:19 1991
--- ./toplev.c Thu Jul 18 16:05:35 1991
***************
*** 600,605 ****
--- 600,636 ----
return 1;
}
+ #ifdef REPORT_EVENT
+ static void
+ report_event (type, decl, file, line, msg, arg1, arg2, arg3)
+ int type;
+ tree decl;
+ char *file;
+ char *line;
+ char *msg;
+ int arg1;
+ int arg2;
+ int arg3;
+ {
+ char *name, *kind;
+ #ifdef NeXT
+ extern tree maybe_objc_method_name ();
+ tree method_name = maybe_objc_method_name ();
+ #endif /* NeXT */
+
+ if (decl == NULL)
+ name = "top level";
+ #ifdef NeXT
+ else if (method_name)
+ name = IDENTIFIER_POINTER (method_name);
+ #endif /* NeXT */
+ else
+ name = (*decl_printable_name) (decl, &kind);
+
+ REPORT_EVENT (type, name, file, line, msg, arg1, arg2, arg3);
+ }
+ #endif
+
/* Print a fatal error message. NAME is the text.
Also include a system error message based on `errno'. */
***************
*** 607,612 ****
--- 638,647 ----
pfatal_with_name (name)
char *name;
{
+ #ifdef REPORT_EVENT
+ report_event (0, current_function_decl, input_filename, lineno,
+ "%s: ", name, strerror (errno), 0);
+ #endif
fprintf (stderr, "%s: ", progname);
perror (name);
exit (35);
***************
*** 616,621 ****
--- 651,660 ----
fatal_io_error (name)
char *name;
{
+ #ifdef REPORT_EVENT
+ report_event (0, current_function_decl, input_filename, lineno,
+ "%s: I/O error\n", name, 0, 0);
+ #endif
fprintf (stderr, "%s: %s: I/O error\n", progname, name);
exit (35);
}
***************
*** 700,705 ****
--- 739,749 ----
if (last_error_function != current_function_decl)
{
char *kind = "function";
+ #ifdef NeXT
+ extern tree maybe_objc_method_name ();
+ tree method_name = maybe_objc_method_name ();
+ #endif /* NeXT */
+
if (current_function_decl != 0
&& TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
kind = "method";
***************
*** 709,714 ****
--- 753,763 ----
if (current_function_decl == NULL)
fprintf (stderr, "At top level:\n");
+ #ifdef NeXT
+ else if (method_name)
+ fprintf (stderr, "In method `%s'\n",
+ IDENTIFIER_POINTER (method_name));
+ #endif /* NeXT */
else
{
char *name = (*decl_printable_name) (current_function_decl, &kind);
***************
*** 759,764 ****
--- 808,816 ----
report_error_function (file);
+ #ifdef REPORT_EVENT
+ report_event (0, current_function_decl, file, line, s, v, v2, 0);
+ #endif
if (file)
fprintf (stderr, "%s:%d: ", file, line);
else
***************
*** 781,786 ****
--- 833,848 ----
report_error_function (DECL_SOURCE_FILE (decl));
+ #ifdef REPORT_EVENT
+ if (DECL_NAME (decl))
+ report_event (0, current_function_decl,
+ DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl),
+ s, (*decl_printable_name) (decl, &junk), v, 0);
+ else
+ report_event (0, current_function_decl,
+ DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl),
+ s, "((anonymous))", v, 0);
+ #endif
fprintf (stderr, "%s:%d: ",
DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
***************
*** 843,848 ****
--- 905,913 ----
report_error_function (file);
+ #ifdef REPORT_EVENT
+ report_event (1, current_function_decl, file, line, s, v, v2, v3);
+ #endif
if (file)
fprintf (stderr, "%s:%d: ", file, line);
else
***************
*** 883,888 ****
--- 948,963 ----
report_error_function (DECL_SOURCE_FILE (decl));
+ #ifdef REPORT_EVENT
+ if (DECL_NAME (decl))
+ report_event (1, current_function_decl,
+ DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl),
+ s, (*decl_printable_name) (decl, &junk), v, 0);
+ else
+ report_event (1, current_function_decl,
+ DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl),
+ s, "((anonymous))", v, 0);
+ #endif
fprintf (stderr, "%s:%d: ",
DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
***************
*** 944,949 ****
--- 1019,1028 ----
int v, v2;
{
sorrycount++;
+ #ifdef REPORT_EVENT
+ report_event (0, current_function_decl, input_filename, lineno,
+ s, v, v2, 0);
+ #endif
if (input_filename)
fprintf (stderr, "%s:%d: ", input_filename, lineno);
else
***************
*** 962,967 ****
--- 1041,1050 ----
char *s;
int v, v2;
{
+ #ifdef REPORT_EVENT
+ report_event (0, current_function_decl, input_filename, lineno,
+ s, v, v2, 0);
+ #endif
if (input_filename)
fprintf (stderr, "%s:%d: ", input_filename, lineno);
else
*** /Net/ohio/redbird/mself/fsf/cccp.c Tue Jul 16 10:05:15 1991
--- ./cccp.c Fri Jul 19 13:57:50 1991
***************
*** 5368,5373 ****
--- 5341,5350 ----
} else {
if (if_stack->type != T_IF && if_stack->type != T_ELIF) {
error ("#elif after #else");
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (0, NULL, if_stack->fname, if_stack->lineno,
+ "matching conditional", 0, 0, 0);
+ #endif
fprintf (stderr, " (matches line %d", if_stack->lineno);
if (if_stack->fname != NULL && ip->fname != NULL &&
strcmp (if_stack->fname, ip->nominal_fname) != 0)
***************
*** 5733,5738 ****
--- 5710,5719 ----
if (if_stack->type != T_IF && if_stack->type != T_ELIF) {
error ("#else after #else");
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (0, NULL, if_stack->fname, if_stack->lineno,
+ "matching conditional", 0, 0, 0);
+ #endif
fprintf (stderr, " (matches line %d", if_stack->lineno);
if (strcmp (if_stack->fname, ip->nominal_fname) != 0)
fprintf (stderr, ", file %s", if_stack->fname);
***************
*** 6840,6845 ****
--- 6818,6829 ----
break;
}
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (0, NULL,
+ ip ? ip->nominal_fname : NULL,
+ ip ? ip->lineno : 0,
+ msg, arg1, arg2, arg3);
+ #endif
if (ip != NULL)
fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
fprintf (stderr, msg, arg1, arg2, arg3);
***************
*** 6866,6871 ****
--- 6848,6863 ----
break;
}
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (0, NULL,
+ ip ? ip->nominal_fname : NULL,
+ ip ? ip->lineno : 0,
+ "%s: %s", name,
+ (errno < sys_nerr)
+ ? sys_errlist[errno]
+ : "undocumented I/O error",
+ 0);
+ #endif
if (ip != NULL)
fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
***************
*** 6897,6902 ****
--- 6887,6898 ----
break;
}
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (1, NULL,
+ ip ? ip->nominal_fname : NULL,
+ ip ? ip->lineno : 0,
+ msg, arg1, arg2, arg3);
+ #endif
if (ip != NULL)
fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
fprintf (stderr, "warning: ");
***************
*** 6920,6925 ****
--- 6914,6924 ----
break;
}
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (0, NULL,
+ ip ? ip->nominal_fname : NULL,
+ line, msg, arg1, arg2, arg3);
+ #endif
if (ip != NULL)
fprintf (stderr, "%s:%d: ", ip->nominal_fname, line);
fprintf (stderr, msg, arg1, arg2, arg3);
***************
*** 6949,6954 ****
--- 6948,6957 ----
char *msg;
{
int i;
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (pedantic_errors ? 0 : 1,
+ NULL, file, line, msg, arg1, arg2, arg3);
+ #endif
if (file != NULL)
fprintf (stderr, "%s:%d: ", file, line);
if (!pedantic_errors)
***************
*** 7679,7684 ****
--- 7634,7642 ----
fatal (str, arg)
char *str, *arg;
{
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (0, progname, NULL, 0, str, arg, 0, 0);
+ #endif
fprintf (stderr, "%s: ", progname);
fprintf (stderr, str, arg);
fprintf (stderr, "\n");
*** /Net/ohio/redbird/mself/fsf/gcc.c Mon Jul 8 11:12:08 1991
--- ./gcc.c Thu Jul 18 17:02:28 1991
***************
*** 1708,1714 ****
if (argbuf_index > 0)
{
! int value = execute ();
if (value)
return value;
}
--- 1719,1731 ----
if (argbuf_index > 0)
{
! int value;
!
! #ifdef REPORT_EVENT
! if (spec == link_command_spec)
! REPORT_EVENT (-1, NULL, NULL, 0, "Linking", 0, 0, 0);
! #endif
! value = execute ();
if (value)
return value;
}
***************
*** 2341,2346 ****
--- 2358,2366 ----
else
input_suffix = "";
+ #ifdef REPORT_EVENT
+ REPORT_EVENT (-1, NULL, input_basename, 0, "Compiling", 0, 0, 0);
+ #endif
value = do_spec (cp->spec);
if (value < 0)
this_file_error = 1;