diff --git a/usr.bin/ctags/ctags.1 b/usr.bin/ctags/ctags.1 index c8b7fadc1f00..d11dbbdcf3fc 100644 --- a/usr.bin/ctags/ctags.1 +++ b/usr.bin/ctags/ctags.1 @@ -84,7 +84,7 @@ that take arguments are tagged automatically. .It Fl f Places the tag descriptions in a file called .Ar tagsfile . -The default behavior is to place them in a file called +The default behaviour is to place them in a file called .Ar tags . .It Fl t create tags for typedefs, structs, unions, and enums. diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c index 3c6464b6de35..725dfb58a972 100644 --- a/usr.bin/ctags/ctags.c +++ b/usr.bin/ctags/ctags.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1987, 1993, 1994 + * Copyright (c) 1987, 1993, 1994, 1995 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,12 +33,12 @@ #ifndef lint static char copyright[] = -"@(#) Copyright (c) 1987, 1993, 1994\n\ +"@(#) Copyright (c) 1987, 1993, 1994, 1995\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)ctags.c 8.3 (Berkeley) 4/2/94"; +static char sccsid[] = "@(#)ctags.c 8.4 (Berkeley) 2/7/95"; #endif /* not lint */ #include @@ -77,6 +77,7 @@ char lbuf[LINE_MAX]; void init __P((void)); void find_entries __P((char *)); +static void usage __P((void)); int main(argc, argv) @@ -125,15 +126,12 @@ main(argc, argv) break; case '?': default: - goto usage; + usage(); } argv += optind; argc -= optind; - if (!argc) { -usage: (void)fprintf(stderr, - "usage: ctags [-BFadtuwvx] [-f tagsfile] file ...\n"); - exit(1); - } + if (!argc) + usage(); init(); @@ -175,6 +173,13 @@ usage: (void)fprintf(stderr, exit(exit_val); } +static void +usage() +{ + (void)fprintf(stderr, "usage: ctags [-BFadtuwvx] [-f tagsfile] file ...\n"); + exit(1); +} + /* * init -- * this routine sets up the boolean psuedo-functions which work by