1get_executable_name(3)          Allegro manual          get_executable_name(3)
2
3
4

NAME

6       get_executable_name  - Obtains the full path to the current executable.
7       Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void get_executable_name(char *buf, int size);
14

DESCRIPTION

16       Fills `buf' with the full path to the current  executable,  writing  at
17       most  `size'  bytes.   This  generally comes from `argv[0]' but on Unix
18       systems it tries to get the information  from  the  `/proc'  filesystem
19       first,  searching the directories specified in `$PATH' if necessary. If
20       this fails too, it tries to find the executable name from the output of
21       the  `ps'  command,  using `argv[0]' only as a last resort if all other
22       options fail. Example:
23
24          char name[200];
25          ...
26          get_executable_name(name, sizeof(name));
27          allegro_message("Running `%s'\n", name);
28
29
30
31
32Allegro                          version 4.4.3          get_executable_name(3)
Impressum