#ifndef _PROGNAME_H
#define _PROGNAME_H

/* Programs using this file should do the following in |main()|:
     |set_program_name (argv[0]);| */

/* String containing name the program is called with.  */
extern const char *program_name;

/* Set |program_name|, based on |argv[0]|.  |argv0| must be a string
   allocated with indefinite extent, and must not be modified after
   this call.  */
extern void set_program_name(const char *argv0);

/* Return |program_name|. This is similar to getprogname for systems
   that don't support it. */
extern const char *get_program_name(void);

#endif