This is Unofficial EPICS BASE Doxygen Site
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
osdgetexec.c
Go to the documentation of this file.
1
2
#include <string.h>
3
#include <stdlib.h>
4
5
#include <
osiFileName.h
>
6
7
char
*
epicsGetExecName
(
void
)
8
{
9
const
char
*raw = getexecname();
10
char
*ret =
NULL
;
11
/* manpage says getexecname() might return a relative path. we treat this as an error */
12
if
(raw[0]==
'/'
) {
13
ret =
strdup
(raw);
14
}
15
return
ret;
16
}
17
18
char
*
epicsGetExecDir
(
void
)
19
{
20
char
*ret =
epicsGetExecName
();
21
if
(ret) {
22
char
*sep = strrchr(ret,
'/'
);
23
if
(sep) {
24
/* nil the charactor after the / */
25
sep[1] =
'\0'
;
26
}
27
}
28
return
ret;
29
}
strdup
char * strdup(const char *)
NULL
#define NULL
Definition:
catime.c:38
epicsGetExecName
char * epicsGetExecName(void)
Definition:
osdgetexec.c:9
epicsGetExecDir
char * epicsGetExecDir(void)
Definition:
osdgetexec.c:38
osiFileName.h
modules
libcom
src
osi
os
solaris
osdgetexec.c
Generated by
1.8.11