equal
deleted
inserted
replaced
|
1 /* |
|
2 Portions Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
3 * ============================================================================ |
|
4 */ |
|
5 #include <sys/cdefs.h> |
|
6 __FBSDID("$FreeBSD: src/lib/libc/gen/setprogname.c,v 1.8 2002/03/29 22:43:41 markm Exp $"); |
|
7 |
|
8 #include <stdlib.h> |
|
9 #include <string.h> |
|
10 |
|
11 #include "libc_private.h" |
|
12 |
|
13 EXPORT_C void setprogname(const char *programname) |
|
14 { |
|
15 const char *p; |
|
16 p = strrchr(programname, '\\'); |
|
17 if (p != NULL) |
|
18 __progname = p + 1; |
|
19 else |
|
20 __progname = programname; |
|
21 } |