diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1998-07-24 07:13:57 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1998-07-24 07:13:57 +0000 |
| commit | 24db6e216fb4a96faf210de79aceaf9c6e336231 (patch) | |
| tree | 17398b64d567d29897db1f92c45ac55a8cfbcf11 /usr.bin/f2c | |
| parent | 19ce94466c7a161a54fee468a731c4543aca78b8 (diff) | |
Notes
Diffstat (limited to 'usr.bin/f2c')
| -rw-r--r-- | usr.bin/f2c/f2c.1 | 4 | ||||
| -rw-r--r-- | usr.bin/f2c/main.c | 4 | ||||
| -rw-r--r-- | usr.bin/f2c/proc.c | 26 |
3 files changed, 23 insertions, 11 deletions
diff --git a/usr.bin/f2c/f2c.1 b/usr.bin/f2c/f2c.1 index 4011fcbd434a..08e99ed1703d 100644 --- a/usr.bin/f2c/f2c.1 +++ b/usr.bin/f2c/f2c.1 @@ -33,7 +33,7 @@ .Nd Convert Fortran 77 to C or C++ .Sh SYNOPSIS .Nm f2c -.Op Fl AaCcEfgpRrsUuw +.Op Fl AaCcEfgpRrsUuvw .Op Fl C++ .Op Fl cd .Op Fl d Ar dir @@ -195,6 +195,8 @@ may change prototypes or declarations. .It Fl p Supply preprocessor definitions to make common-block members look like local variables. +.It Fl v +Echo the file name, program name, and procedure name(s) during compilation. .It Fl R Do not promote REAL functions and operations to DOUBLE PRECISION. Option .Fl !R diff --git a/usr.bin/f2c/main.c b/usr.bin/f2c/main.c index 41838552bb04..7237905d29fb 100644 --- a/usr.bin/f2c/main.c +++ b/usr.bin/f2c/main.c @@ -49,6 +49,7 @@ flag r8flag = NO; flag use_bs = YES; flag keepsubs = NO; flag byterev = NO; +flag echo = NO; int intr_omit; static int no_cd, no_i90; #ifdef TYQUAD @@ -128,6 +129,7 @@ static arg_info table[] = { f2c_entry ("Nl", P_ONE_ARG, P_INT, &maxlablist, 0), f2c_entry ("c", P_NO_ARGS, P_INT, &addftnsrc, YES), f2c_entry ("p", P_NO_ARGS, P_INT, &usedefsforcommon, YES), + f2c_entry ("v", P_NO_ARGS, P_INT, &echo, YES), f2c_entry ("R", P_NO_ARGS, P_INT, &forcedouble, NO), f2c_entry ("!R", P_NO_ARGS, P_INT, &forcedouble, YES), f2c_entry ("A", P_NO_ARGS, P_INT, &Ansi, YES), @@ -563,7 +565,7 @@ main(int argc, char **argv) if(inilex( copys(file_name) )) done(1); - if (filename0) { + if (filename0 && echo) { fprintf(diagfile, "%s:\n", file_name); fflush(diagfile); } diff --git a/usr.bin/f2c/proc.c b/usr.bin/f2c/proc.c index 6796d5219559..2273e24951a4 100644 --- a/usr.bin/f2c/proc.c +++ b/usr.bin/f2c/proc.c @@ -433,6 +433,8 @@ startproc(progname, class) startproc(Extsym *progname, int class) #endif { + extern flag echo; + register struct Entrypoint *p; p = ALLOC(Entrypoint); @@ -458,13 +460,15 @@ startproc(Extsym *progname, int class) entries = p; procclass = class; - fprintf(diagfile, " %s", (class==CLMAIN ? "MAIN" : "BLOCK DATA") ); - if(progname) { - fprintf(diagfile, " %s", progname->fextname); - procname = progname->cextname; + if (echo) { + fprintf(diagfile, " %s", (class==CLMAIN ? "MAIN" : "BLOCK DATA") ); + if(progname) { + fprintf(diagfile, " %s", progname->fextname); + procname = progname->cextname; + } + fprintf(diagfile, ":\n"); + fflush(diagfile); } - fprintf(diagfile, ":\n"); - fflush(diagfile); } /* subroutine or function statement */ @@ -521,15 +525,19 @@ entrypt(class, type, length, entry, args) entrypt(int class, int type, ftnint length, Extsym *entry, chainp args) #endif { + extern flag echo; + register Namep q; register struct Entrypoint *p; if(class != CLENTRY) puthead( procname = entry->cextname, class); - else + else if (echo) fprintf(diagfile, " entry "); - fprintf(diagfile, " %s:\n", entry->fextname); - fflush(diagfile); + if (echo){ + fprintf(diagfile, " %s:\n", entry->fextname); + fflush(diagfile); + } q = mkname(entry->fextname); if (type == TYSUBR) q->vstg = STGEXT; |
