logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Description

       Fills  `buf'  with the full path to the current executable, writing at most `size' bytes.  This generally
       comes from `argv[0]' but on Unix systems it tries to get the  information  from  the  `/proc'  filesystem
       first,  searching  the directories specified in `$PATH' if necessary. If this fails too, it tries to find
       the executable name from the output of the `ps' command, using `argv[0]' only as a  last  resort  if  all
       other options fail. Example:

          char name[200];
          ...
          get_executable_name(name, sizeof(name));
          allegro_message("Running `%s'\n", name);

Allegro                                           version 4.4.3                     get_executable_name(3alleg4)

Name

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

Synopsis

#include<allegro.h>voidget_executable_name(char*buf,intsize);

See Also