Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
get_executable_name(3)		 Allegro manual 	  get_executable_name(3)

NAME
     get_executable_name  - Obtains the full path to the current executable. Al-
     legro game programming library.

SYNOPSIS
     #include <allegro.h>

     void get_executable_name(char *buf, int size);

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,  us-
     ing `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(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=get_executable_name&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help