jgh2@cisunx.UUCP (John G. Hardie) (04/20/89)
I've been having some trouble with ETAGS supplied with the 18.52 version of GNU emacs. I'm running under VMS 4.7a. The command ETAGS is defined as ETAGS :== $EMACS_LIBRARY:[ETC]ETAGS.EXE Using the following fortran program, c blah.for - show prob with etags subroutine blah(i) integer*2 i print*,i return end and putting it in a file named BLAH.FOR, the command "ETAGS BLAH.FOR" gives the following tag file. (formfeeds deleted) dua1:[iucf.jgh.analyzer]blah.for,28 c blah.for - show 2,38 Which isn't correct. However, renaming the fortran file to BLAH.F, and executing "ETAGS BLAH.F" gives dua1:[iucf.jgh.analyzer]blah.f,28 subroutine blah(2,38 Which is correct. I've looked at the source for ETAGS.C, but I can't see any reason for this to happen, since fortran mode is entered sort of by default. Admittedly, I haven't examined the code in detail, but I looked at the function which determines the language. (find_entries()) Does anyone know what's going on? Thanks, John -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John G. Hardie jgh2@unix.cis.pittsburgh.edu Dept. of Physics, Univ of Pittsburgh jgh2@vms.cis.pittsburgh.edu An ounce of inaccuracy saves a pound of explanation
jgh2@cisunx.UUCP (John G. Hardie) (04/20/89)
Awww Sh*t! Why is it that you always find the solution to a problem 5 minutes after posting a question asking for help? Anyway, the fix for ETAGS is the following. In find_entries(), change the follwing lines: /* if not a .c or .h or .y file, try fortran */ if (cp && (cp[1] != 'c' && cp[1] != 'h' && cp[1] != 'y') && cp[2] == '\0') { if (PF_funcs(inf) != 0) { fclose(inf); return; } rewind(inf); /* no fortran tags found, try C */ } to: /* if not a .c or .h or .y file, try fortran */ if (cp && (cp[1] != 'c' && cp[1] != 'h' && cp[1] != 'y')) { if (PF_funcs(inf) != 0) { fclose(inf); return; } rewind(inf); /* no fortran tags found, try C */ } Which removes the requirement that a fortran file have a one character extension. Sheesh! I hate it when this happens - makes me feel stupid. John-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John G. Hardie jgh2@unix.cis.pittsburgh.edu Dept. of Physics, Univ of Pittsburgh jgh2@vms.cis.pittsburgh.edu An ounce of inaccuracy saves a pound of explanation