Removed prgname
This commit is contained in:
parent
25c77ac051
commit
b8b1c3c3ea
4 changed files with 1 additions and 27 deletions
|
@ -23,7 +23,6 @@
|
|||
##
|
||||
|
||||
MODULE = etlib
|
||||
MSRC = hash.c prgname.c
|
||||
MSRC = hash.c
|
||||
|
||||
SRC += $(addprefix $(MODULE)/,$(MSRC))
|
||||
HDRS += etlib/prgname.h
|
||||
|
|
|
@ -5,12 +5,8 @@
|
|||
* the error return for 'argument required' is a ':' not a '?'.
|
||||
* This makes it easier to differentiate between an 'illegal option' and
|
||||
* an 'argument required' error.
|
||||
*
|
||||
* Another extension: the external variable prgname is set from argv[0].
|
||||
*/
|
||||
|
||||
#include "prgname.h"
|
||||
|
||||
#define NULL 0
|
||||
#define EOF (-1)
|
||||
|
||||
|
@ -57,8 +53,6 @@ char **argv, *opts;
|
|||
register int c;
|
||||
register char *cp;
|
||||
|
||||
setprgname(argv[0]);
|
||||
|
||||
optarg = NULL;
|
||||
|
||||
if (sp == 1)
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
const char *prgname = 0;
|
||||
|
||||
extern char *strrchr(const char *, int);
|
||||
|
||||
void
|
||||
setprgname(char *str)
|
||||
{
|
||||
char *x = strrchr(str, '/');
|
||||
|
||||
prgname = x ? x+1 : str;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef ETLIB_PRGNAME_H
|
||||
#define ETLIB_PRGNAME_H
|
||||
|
||||
extern char *prgname;
|
||||
void setprgname(char *argv_0);
|
||||
|
||||
#endif /* ETLIB_PRGNAME_H */
|
Loading…
Add table
Reference in a new issue