From 7ce122a2018d8cd33d299f1fe143b79c09592dcf Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Thu, 24 Jun 1993 21:44:34 +0000 Subject: [PATCH] * gprof.c (main): Get whoami from argv, instead of hardcoding. Use it in usage message. Split usage message to fit in 80 cols. --- gprof/ChangeLog | 5 +++++ gprof/gprof.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gprof/ChangeLog b/gprof/ChangeLog index 0bfb7a86a19..293912ce080 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,8 @@ +Thu Jun 24 14:43:22 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * gprof.c (main): Get whoami from argv, instead of hardcoding. + Use it in usage message. Split usage message to fit in 80 cols. + Sun Jun 20 20:58:02 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) * Makefile.in: Undo 15 June change. diff --git a/gprof/gprof.c b/gprof/gprof.c index 5264eea2ca9..af54a9ded16 100644 --- a/gprof/gprof.c +++ b/gprof/gprof.c @@ -31,7 +31,7 @@ static char sccsid[] = "@(#)gprof.c 5.6 (Berkeley) 6/1/90"; bfd *abfd; -char *whoami = "gprof"; +char *whoami; /* * things which get -E excluded by default. @@ -48,6 +48,7 @@ main(argc, argv) char **sp; nltype **timesortnlp; + whoami = argv[0]; --argc; argv++; debug = 0; @@ -112,11 +113,10 @@ main(argc, argv) zflag = TRUE; break; default: - fprintf (stderr, "usage: gprof [-a] [-b] [-c] [-d[num]] \ -[-E function-name] [-e function-name] \ -[-F function-name] [-f function-name] \ -[-k from to] [-s] [-T] [-z] [image-file] \ -[profile file(s)]\n"); + fprintf (stderr, "\ +Usage: %s [-a] [-b] [-c] [-d[num]] [-E function-name] [-e function-name]\n\ + [-F function-name] [-f function-name] [-k from to] [-s] [-T] [-z]\n\ + [image-file] [profile-file...]\n", whoami); exit (1); } argv++; -- 2.30.2