🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.f77
Article #283

f77 & emacs

#283
From: mather
Date: Thu, 12 Dec 1985 15:26
37 lines
2201 bytes
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
Technical Details
Message-ID: <12900003@uicsl>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!uicsl!mather

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site uicsl
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!uicsl!mather
From: mather@uicsl.UUCP
Newsgroups: net.lang.f77
Subject: f77 & emacs
Message-ID: <12900003@uicsl>
Date: Thu, 12-Dec-85 10:26:00 EST
Article-I.D.: uicsl.12900003
Posted: Thu Dec 12 10:26:00 1985
Date-Received: Sat, 14-Dec-85 00:48:55 EST
Lines: 37
Nf-ID: #N:uicsl:12900003:000:1625
Nf-From: uicsl.UUCP!mather    Dec 12 09:26:00 1985