s/[gs]et_progname/[gs]etprogname/

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9704 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-02-20 01:44:56 +00:00
parent 8336a2da12
commit 67422a6b02
48 changed files with 55 additions and 55 deletions

View File

@@ -129,7 +129,7 @@ main(int argc, char **argv)
{
int optind = 0;
krb5_error_code ret;
set_progname(argv[0]);
setprogname(argv[0]);
ret = krb5_init_context(&context);
if (ret)
errx (1, "krb5_init_context failed: %d", ret);

View File

@@ -179,7 +179,7 @@ main(int argc, char **argv)
int num;
int ret = 0;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);

View File

@@ -46,7 +46,7 @@ main(int argc, char **argv)
char homedir[MaxPathLen];
struct servent *sp;
set_progname(argv[0]);
setprogname(argv[0]);
sp = getservbyname("ftp", "tcp");
if (sp == 0)
@@ -127,7 +127,7 @@ main(int argc, char **argv)
exit(0);
signal(SIGINT, intr);
signal(SIGPIPE, lostpeer);
xargv[0] = (char*)__progname;
xargv[0] = (char*)getprogname();
xargv[1] = argv[0];
xargv[2] = argv[1];
xargv[3] = argv[2];

View File

@@ -262,7 +262,7 @@ main(int argc, char **argv)
int optind = 0;
set_progname (argv[0]);
setprogname (argv[0]);
/* detach from any tickets and tokens */
{

View File

@@ -71,7 +71,7 @@ client_setup(krb5_context *context, int *argc, char **argv)
int port = 0;
int status;
set_progname (argv[0]);
setprogname (argv[0]);
status = krb5_init_context (context);
if (status)

View File

@@ -315,7 +315,7 @@ main(int argc, char **argv)
int port;
int ret;
set_progname (argv[0]);
setprogname (argv[0]);
roken_openlog (argv[0], LOG_ODELAY | LOG_PID,LOG_AUTH);
port = server_setup(&context, argc, argv);
ret = doit (port, service);

View File

@@ -690,7 +690,7 @@ main(int argc, char **argv)
int ret = 1;
char *host = NULL;
set_progname (argv[0]);
setprogname (argv[0]);
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,
&optind))

View File

@@ -708,7 +708,7 @@ main (int argc, char **argv)
int port;
int optind = 0;
set_progname (argv[0]);
setprogname (argv[0]);
roken_openlog ("kxd", LOG_ODELAY | LOG_PID, LOG_DAEMON);
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,

View File

@@ -650,7 +650,7 @@ main(int argc, char **argv)
int ask = 1;
struct sigaction sa;
set_progname(argv[0]);
setprogname(argv[0]);
#ifdef KRB5
{

View File

@@ -42,7 +42,7 @@ do_osfc2_magic(uid_t uid)
char *argv[2];
/* fake */
argv[0] = (char*)__progname;
argv[0] = (char*)getprogname();
argv[1] = NULL;
set_auth_parameters(1, argv);

View File

@@ -293,7 +293,7 @@ main (int argc, char **argv)
OtpAlgorithm *alg = otp_find_alg (OTP_ALG_DEFAULT);
int optind = 0;
set_progname (argv[0]);
setprogname (argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
if(help_flag)

View File

@@ -101,7 +101,7 @@ main (int argc, char **argv)
void (*fn)(OtpKey, char *, size_t);
OtpAlgorithm *alg = otp_find_alg (OTP_ALG_DEFAULT);
set_progname (argv[0]);
setprogname (argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
if(help_flag)

View File

@@ -215,7 +215,7 @@ main(int argc, char **argv)
int ret = 1;
int optind = 0;
set_progname(argv[0]);
setprogname(argv[0]);
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,
&optind))

View File

@@ -254,10 +254,10 @@ pop_init(POP *p,int argcount,char **argmessage)
/* Initialize the POP parameter block */
memset (p, 0, sizeof(POP));
set_progname(argmessage[0]);
setprogname(argmessage[0]);
/* Save my name in a global variable */
p->myname = (char*)__progname;
p->myname = (char*)getprogname();
/* Get the name of our host */
gethostname(p->myhost,MaxHostNameLen);

View File

@@ -714,7 +714,7 @@ main(int argc, char **argv)
const char *host, *user, *filename = NULL;
char *pobox = NULL;
set_progname (argv[0]);
setprogname (argv[0]);
#ifdef KRB5
{

View File

@@ -836,7 +836,7 @@ main(int argc, char **argv)
if (setuid (uid) || (uid != 0 && setuid(0) == 0))
err (1, "setuid");
set_progname (argv[0]);
setprogname (argv[0]);
if (argc >= 2 && argv[1][0] != '-') {
host = argv[host_index = 1];

View File

@@ -870,7 +870,7 @@ usage (int ret)
NULL,
"");
else
syslog (LOG_ERR, "Usage: %s [-ikxlvPL] [-p port]", __progname);
syslog (LOG_ERR, "Usage: %s [-ikxlvPL] [-p port]", getprogname());
exit (ret);
}
@@ -881,7 +881,7 @@ main(int argc, char **argv)
int optind = 0;
int port = 0;
set_progname (argv[0]);
setprogname (argv[0]);
roken_openlog ("rshd", LOG_ODELAY | LOG_PID, LOG_AUTH);
if (getarg(args, sizeof(args) / sizeof(args[0]), argc, argv,

View File

@@ -278,7 +278,7 @@ main(int argc, char **argv)
int ok = 0;
int kerberos_error=1;
set_progname (argv[0]);
setprogname (argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind))
usage(1);

View File

@@ -199,7 +199,7 @@ get_words(void)
static void
usage(void)
{
fprintf(stderr, "usage: %s [options] [message]\n", __progname);
fprintf(stderr, "usage: %s [options] [message]\n", getprogname());
fprintf(stderr, "-fg color foreground color\n");
fprintf(stderr, "-bg color background color\n");
fprintf(stderr, "-rv reverse foreground/background colors\n");
@@ -946,7 +946,7 @@ main (int argc, char **argv)
Widget override;
XGCValues gcvalues;
set_progname (argv[0]);
setprogname (argv[0]);
/*
* Must be setuid root to read /etc/shadow, copy encrypted

View File

@@ -146,7 +146,7 @@ main(int argc, char **argv)
{
int optind = 0;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind))
usage(1);
if (help_flag)

View File

@@ -225,7 +225,7 @@ main(int argc, char **argv)
int optind = 0;
int e;
set_progname(argv[0]);
setprogname(argv[0]);
ret = krb5_init_context(&context);
if (ret)

View File

@@ -98,7 +98,7 @@ main(int argc, char **argv)
krb5_log_facility *logf;
krb5_keytab keytab;
set_progname(argv[0]);
setprogname(argv[0]);
ret = krb5_init_context(&context);
if (ret)

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-2000 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997-2001 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*

View File

@@ -787,7 +787,7 @@ main(int argc, char **argv)
int type = 0;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);

View File

@@ -213,7 +213,7 @@ main(int argc, char **argv)
int fd_out = -1;
#endif
set_progname(argv[0]);
setprogname(argv[0]);
ret = krb5_init_context(&context);
if(ret)

View File

@@ -48,7 +48,7 @@ int
main(int argc, char **argv)
{
krb5_error_code ret;
set_progname(argv[0]);
setprogname(argv[0]);
ret = krb5_init_context(&context);
if (ret)

View File

@@ -176,7 +176,7 @@ main(int argc, char **argv)
int nreq;
char *end;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind))
usage(1);
argc -= optind;

View File

@@ -134,7 +134,7 @@ main(int argc, char **argv)
int nreq;
char *end;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind))
usage(1);
argc -= optind;

View File

@@ -103,7 +103,7 @@ main(int argc, char **argv)
krb5_creds in, *out;
int optind = 0;
set_progname (argv[0]);
setprogname (argv[0]);
ret = krb5_init_context (&context);
if (ret)

View File

@@ -68,7 +68,7 @@ main (int argc, char **argv)
int optind = 0;
int exit_val = 0;
set_progname (argv[0]);
setprogname (argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);

View File

@@ -65,7 +65,7 @@ main(int argc, char **argv)
krb5_creds in, *out;
int optind = 0;
set_progname (argv[0]);
setprogname (argv[0]);
ret = krb5_init_context (&context);
if (ret)

View File

@@ -339,7 +339,7 @@ main (int argc, char **argv)
krb5_addresses no_addrs;
char passwd[256];
set_progname (argv[0]);
setprogname (argv[0]);
memset(&cred, 0, sizeof(cred));
ret = krb5_init_context (&context);

View File

@@ -629,7 +629,7 @@ main (int argc, char **argv)
int optind = 0;
int exit_status = 0;
set_progname (argv[0]);
setprogname (argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind))
usage(1);

View File

@@ -224,7 +224,7 @@ main(int argc, char **argv)
{
int optind = 0;
set_progname (argv[0]);
setprogname (argv[0]);
initialize_asn1_error_table_r (&et_list);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);

View File

@@ -61,7 +61,7 @@ main(int argc, char **argv)
char *name = NULL;
int optind = 0;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
if(help_flag)

View File

@@ -493,7 +493,7 @@ siad_chg_password (sia_collect_func_t *collect,
char new_pw2[MAX_KPW_LEN+1];
static struct et_list *et_list;
set_progname(argv[0]);
setprogname(argv[0]);
SIA_DEBUG(("DEBUG", "siad_chg_password"));
if(collect == NULL)

View File

@@ -196,7 +196,7 @@ main(int argc, char **argv)
char *p;
int optind = 0;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
if(help_flag)

View File

@@ -136,7 +136,7 @@ main(int argc, char **argv)
int optind = 0;
int master_key_set = 0;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
krb5_std_usage(1, args, num_args);

View File

@@ -42,7 +42,7 @@ krb5_appdefault_boolean(krb5_context context, const char *appname,
{
if(appname == NULL)
appname = __progname;
appname = getprogname();
def_val = krb5_config_get_bool_default(context, NULL, def_val,
"appdefaults",
option,
@@ -76,7 +76,7 @@ krb5_appdefault_string(krb5_context context, const char *appname,
const char *def_val, char **ret_val)
{
if(appname == NULL)
appname = __progname;
appname = getprogname();
def_val = krb5_config_get_string_default(context, NULL, def_val,
"appdefaults",
option,

View File

@@ -55,7 +55,7 @@ krb5_program_setup(krb5_context *context, int argc, char **argv,
if(usage == NULL)
usage = krb5_std_usage;
set_progname(argv[0]);
setprogname(argv[0]);
ret = krb5_init_context(context);
if (ret)
errx (1, "krb5_init_context failed: %d", ret);

View File

@@ -67,7 +67,7 @@ main(int argc, char **argv)
char *error_message;
int optind = 0;
set_progname (argv[0]);
setprogname (argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind))
usage(1);

View File

@@ -112,7 +112,7 @@ main(int argc, char **argv)
int optind = 0;
int i;
set_progname (argv[0]);
setprogname (argv[0]);
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,
&optind))
@@ -122,7 +122,7 @@ main(int argc, char **argv)
usage (0);
if (version_flag) {
fprintf (stderr, "%s from %s-%s)\n", __progname, PACKAGE, VERSION);
fprintf (stderr, "%s from %s-%s)\n", getprogname(), PACKAGE, VERSION);
return 0;
}

View File

@@ -211,7 +211,7 @@ arg_printusage (struct getargs *args,
struct winsize ws;
if (progname == NULL)
progname = __progname;
progname = getprogname();
if(getenv("GETARGMANDOC")){
mandoc_template(args, num_args, progname, extra_string);

View File

@@ -49,7 +49,7 @@ print_version(const char *progname)
int i;
if(progname == NULL)
progname = __progname;
progname = getprogname();
if(num_args == 0)
msg = "no version information";

View File

@@ -88,7 +88,7 @@ pidfile(const char *basename)
if(pidfile_path != NULL)
return;
if(basename == NULL)
basename = __progname;
basename = getprogname();
pidfile_path = pid_file_write(basename);
atexit(pidfile_cleanup);
}

View File

@@ -213,7 +213,7 @@ main(int argc, char **argv)
{
int optind = 0;
set_progname(argv[0]);
setprogname(argv[0]);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
if(help_flag)

View File

@@ -76,8 +76,8 @@ mandoc_template(SL_cmd *cmds,
t = time(NULL);
strftime(timestr, sizeof(timestr), "%b %d, %Y", localtime(&t));
printf(".Dd %s\n", timestr);
p = strrchr(__progname, '/');
if(p) p++; else p = __progname;
p = strrchr(getprogname(), '/');
if(p) p++; else p = getprogname();
strncpy(cmd, p, sizeof(cmd));
cmd[sizeof(cmd)-1] = '\0';
strupr(cmd);

View File

@@ -49,7 +49,7 @@ print_version(const char *progname)
int i;
if(progname == NULL)
progname = __progname;
progname = getprogname();
if(num_args == 0)
msg = "no version information";