Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!unido!nixpbe!schro From: schro@nixpbe.uucp Newsgroups: comp.editors Subject: Re: MicroEmacs macros Message-ID: <17000001@nixpbe> Date: 22 Feb 89 15:52:00 GMT References: <225600002@trsvax> Lines: 88 Nf-ID: #R:trsvax:225600002:nixpbe:17000001:000:2805 Nf-From: nixpbe.uucp!schro Feb 22 16:52:00 1989 hello, John Munsch wrote: > I was wondering if anybody had MicroEmacs macros that would automatically > process the error output of either the Turbo or Microsoft C compilers? this is errlin.cmd . it has been tested with microemacs 3.9e on output files from ms-c 4.0, ms-c 5.0, masm 4.0 and masm 5.1 . i don't have turbo . 1. execute-file errlin.cmd 2. enter the output file containing error messages 3. hit alt-f3 to go to the source-file and -line of the first/next error 4. hit alt-f3 to go back to output file 5. repeat step 3 and 4 for next error hope this helps . django #--------------------------------CUT HERE------------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -rw------- 1 schro pws 853 Feb 22 16:23 errlin.cmd # echo 'x - errlin.cmd' if test -f errlin.cmd; then echo 'shar: not overwriting errlin.cmd'; else sed 's/^X//' << '________This_Is_The_END________' > errlin.cmd X; Find-Error-Line Macro for MicroEMACS 3.9e and higher X; Author: W.F.Schroeder uunet!mcvax!unido!nixpbe!schroeder.pad X; Date: 22 Feb. 1989 X; X; Goes to file and line corresponding to error or warning in output file X; Tested with MS-C 4.0, MS-C 5.0, MASM 4.0 and MASM 5.1 X; X32 store-macro X !if %back2log X select-buffer %logbuf X set %back2log 0 X !else X set %logbuf $cbufname X add-mode "MAGIC" X search-forward "\.[a-z][a-z]*([1-9][0-9]*) *: *[ew]" X search-reverse "\." X previous-word X set-mark X search-forward "(" X backward-character X copy-region X set %srcfile $kill X search-forward "(" X set-mark X search-forward ")" X backward-character X copy-region X set %line $line X find-file %srcfile X $kill goto-line X write-message %line X set %back2log 1 X !endif X!endm X Xset %back2log 0 Xbind-to-key execute-macro-32 FNj ;ALT-F3 Xclear-message-line ________This_Is_The_END________ if test `wc -l < errlin.cmd` -ne 38; then echo 'shar: errlin.cmd was damaged during transit (should have been 38 bytes)' fi fi ; : end of overwriting check exit 0 +---------------+------------------------+-----------------------------+ | W.F.Schroeder | Workstation Software | Paper-: Nixdorf Computer AG | +---------------+------------------------+ mail : Dep. PE PC-SOFTWARE | | UUCP: {uunet,mcvax}!unido!nixpbe!schro | Pontanusstr. 55 | | Phone: nat-5251-14-6694 | D-4790 Paderborn | | AMPR: DL5YEC @ DB0BQ IP:44.130.16.15 | Fed. Rep of Germany | +----------------------------------------+-----------------------------+