|
Last change
on this file since 2404 was 924, checked in by (none), 22 years ago |
|
This commit was manufactured by cvs2svn to create branch 'FREEBSD'.
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
342 bytes
|
| Line | |
|---|
| 1 | #include <sys/cdefs.h>
|
|---|
| 2 | __FBSDID("$FreeBSD: src/lib/libc/gen/setprogname.c,v 1.8 2002/03/29 22:43:41 markm Exp $");
|
|---|
| 3 |
|
|---|
| 4 | #include <stdlib.h>
|
|---|
| 5 | #include <string.h>
|
|---|
| 6 |
|
|---|
| 7 | #include "libc_private.h"
|
|---|
| 8 |
|
|---|
| 9 | void
|
|---|
| 10 | setprogname(const char *progname)
|
|---|
| 11 | {
|
|---|
| 12 | const char *p;
|
|---|
| 13 |
|
|---|
| 14 | p = strrchr(progname, '/');
|
|---|
| 15 | if (p != NULL)
|
|---|
| 16 | __progname = p + 1;
|
|---|
| 17 | else
|
|---|
| 18 | __progname = progname;
|
|---|
| 19 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.