mather@uicsl.UUCP (12/12/85)
Emacs has a nice feature for allowing one to compile C programs (make) and jump to syntax errors with ^X^N. Unfortunately, the F77 error output format is not the same as C and so emacs doesn't understand it. The following mods to the f77 compiler (f77pass1) will output errors diagnositics in the correct format. This approach was taken rather than writing a post f77 error filter because it is MUCH faster within emacs (no forking subshells, etc.) Unfortunately, it breaks the handling of errors for '/usr/ucb/error'. Sorry. We don't use /usr/ucb/error around here much. Most of our users are emacs-f77 users, so the change is helpful. This was done on bsd4.2. All other flavors are on their own. Use 'patch' to make the changes to /usr/src/usr.bin/f77/src/f77pass1/error.c This diff was made with: diff error.orig.c error.c ------------------------------cut here -------------------------------------- 13c13 < warn(s) --- > warn(s) /* mods for emacs compile diagnositics (mather 2-7-85)*/ 18c18,19 < fprintf(diagfile, "Warning on line %d of %s: %s\n", lineno, infname, s); --- > /* fprintf(diagfile, "Warning on line %d of %s: %s\n", lineno, infname, s); */ > fprintf(diagfile, "\"%s\", line %d: warning: %s\n", infname,lineno, s); 83c84,85 < fprintf(diagfile, "Error on line %d of %s: %s\n", lineno, infname, s); --- > /* fprintf(diagfile, "Error on line %d of %s: %s\n", lineno, infname, s); */ > fprintf(diagfile, "\"%s\", line %d: %s\n",infname,lineno,s); ------------------------------cut here -------------------------------------- ---- b.c.mather Software Surgeon uiucdcs!uicsl!mather