diff options
author | martijn <martijn@cvs.openbsd.org> | 2016-01-30 21:23:51 +0000 |
---|---|---|
committer | martijn <martijn@cvs.openbsd.org> | 2016-01-30 21:23:51 +0000 |
commit | e37fa6d215b2fdda463511b66a1c24c4b0f74933 (patch) | |
tree | d184a4d9d1749ff642e7748cd1b928166cff19af /usr.bin/vi/cl | |
parent | c48e96ce5b369c46967962e9f9f62eab8c7060a4 (diff) |
replace progname variable in gs structure with getprogname
OK zhuk@ and tb@
Diffstat (limited to 'usr.bin/vi/cl')
-rw-r--r-- | usr.bin/vi/cl/cl_main.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/usr.bin/vi/cl/cl_main.c b/usr.bin/vi/cl/cl_main.c index 840664f5086..b470e67376f 100644 --- a/usr.bin/vi/cl/cl_main.c +++ b/usr.bin/vi/cl/cl_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl_main.c,v 1.29 2016/01/27 22:38:12 martijn Exp $ */ +/* $OpenBSD: cl_main.c,v 1.30 2016/01/30 21:23:50 martijn Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -36,7 +36,7 @@ sigset_t __sigblockset; /* GLOBAL: Blocked signals. */ static void cl_func_std(GS *); static CL_PRIVATE *cl_init(GS *); -static GS *gs_init(char *); +static GS *gs_init(void); static int setsig(int, struct sigaction *, void (*)(int)); static void sig_end(GS *); static void term_init(char *); @@ -60,7 +60,7 @@ main(int argc, char *argv[]) abort(); /* Create and initialize the global structure. */ - __global_list = gp = gs_init(argv[0]); + __global_list = gp = gs_init(); /* Create and initialize the CL_PRIVATE structure. */ clp = cl_init(gp); @@ -141,22 +141,15 @@ main(int argc, char *argv[]) * Create and partially initialize the GS structure. */ static GS * -gs_init(char *name) +gs_init(void) { GS *gp; - char *p; - - /* Figure out what our name is. */ - if ((p = strrchr(name, '/')) != NULL) - name = p + 1; /* Allocate the global structure. */ CALLOC_NOMSG(NULL, gp, 1, sizeof(GS)); if (gp == NULL) err(1, NULL); - - gp->progname = name; return (gp); } |