diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-03-06 21:46:13 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-03-06 21:46:13 +0000 |
commit | 7ce03ea0b7d6bdf3d06cb0c7d16ad16f46f29405 (patch) | |
tree | 338d68cd430e37880e385f3f9fb2f4b9359a8756 /urt/cmd_name.c | |
parent | c49e2bfb92ebe11c4b04342dc0aa81898b53e8fc (diff) | |
download | netpbm-mirror-7ce03ea0b7d6bdf3d06cb0c7d16ad16f46f29405.tar.gz netpbm-mirror-7ce03ea0b7d6bdf3d06cb0c7d16ad16f46f29405.tar.xz netpbm-mirror-7ce03ea0b7d6bdf3d06cb0c7d16ad16f46f29405.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4294 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'urt/cmd_name.c')
-rw-r--r-- | urt/cmd_name.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/urt/cmd_name.c b/urt/cmd_name.c index 31fe5f42..4b3f169b 100644 --- a/urt/cmd_name.c +++ b/urt/cmd_name.c @@ -1,27 +1,27 @@ /* * This software is copyrighted as noted below. It may be freely copied, - * modified, and redistributed, provided that the copyright notice is + * modified, and redistributed, provided that the copyright notice is * preserved on all copies. - * + * * There is no warranty or other guarantee of fitness for this software, * it is provided solely "as is". Bug reports or fixes may be sent * to the author, who may or may not act on them as he desires. * * You may not include this software in a program or other software product - * without supplying the source, or without informing the end-user that the + * without supplying the source, or without informing the end-user that the * source is available for no extra charge. * * If you modify this software, you should include a notice giving the * name of the person performing the modification, the date of modification, * and the reason for such modification. */ -/* +/* * cmd_name.c - Extract command name from argv[0]. - * - * Author: Spencer W. Thomas - * EECS Dept. - * University of Michigan - * Date: Wed Jun 27 1990 + * + * Author: Spencer W. Thomas + * EECS Dept. + * University of Michigan + * Date: Wed Jun 27 1990 * Copyright (c) 1990, University of Michigan */ @@ -35,23 +35,23 @@ char * cmd_name( argv ) char **argv; { - register char *cp, *a; + char *cp, *a; /* Be paranoid. */ if ( !argv || !(a = *argv) ) - return no_name; + return no_name; /* Find end of file name. */ for ( cp = a; *cp; cp++ ) - ; + ; /* Find last / or beginning of command name. */ for ( cp--; *cp != '/' && cp > a; cp-- ) - ; - + ; + /* If it's a /, skip it. */ if ( *cp == '/' ) - cp++; + cp++; return cp; } |