Graphviz 13.0.0~dev.20250121.0651
Loading...
Searching...
No Matches
gv_find_me.h File Reference

platform abstraction for finding the path to yourself More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UTIL_API   /* nothing */
 

Functions

UTIL_API char * gv_find_me (void)
 

Macro Definition Documentation

◆ UTIL_API

#define UTIL_API   /* nothing */

hide the symbols this header declares by default

The expectation is that, while other libraries may not want to call gv_find_me, they may end up linking against it in order to use other libutil functionality. They almost certainly do not want to re-export gv_find_me.

This annotation is only correct while the containing library is built statically. If it were built as a shared library, gv_find_me would need to have default visibility (and thus be unavoidably re-exported) in order to be callable.

Definition at line 21 of file gv_find_me.h.

Function Documentation

◆ gv_find_me()

UTIL_API char * gv_find_me ( void  )

find an absolute path to the current executable

The caller is responsible for freeing the returned pointer.

It is assumed the containing executable is an on-disk file. If it is an in-memory executable with no actual path, results are undefined.

Returns
An absolute path to the containing executable on success or NULL on failure

Definition at line 65 of file gv_find_me.c.

References free(), NULL, and readln().

Referenced by find_me(), and find_share().

Here is the call graph for this function:
Here is the caller graph for this function: