Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* -*- buffer-read-only: t -*- vi: set ro: */ 00002 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 00003 /* Program name management. 00004 Copyright (C) 2001-2004, 2006, 2009-2011 Free Software Foundation, Inc. 00005 Written by Bruno Haible <bruno@clisp.org>, 2001. 00006 00007 This program is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00019 00020 #ifndef _PROGNAME_H 00021 #define _PROGNAME_H 00022 00023 /* Programs using this file should do the following in main(): 00024 set_program_name (argv[0]); 00025 */ 00026 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 00033 /* String containing name the program is called with. */ 00034 extern const char *program_name; 00035 00036 /* Set program_name, based on argv[0]. 00037 argv0 must be a string allocated with indefinite extent, and must not be 00038 modified after this call. */ 00039 extern void set_program_name (const char *argv0); 00040 00041 #if ENABLE_RELOCATABLE 00042 00043 /* Set program_name, based on argv[0], and original installation prefix and 00044 directory, for relocatability. */ 00045 extern void set_program_name_and_installdir (const char *argv0, 00046 const char *orig_installprefix, 00047 const char *orig_installdir); 00048 #undef set_program_name 00049 #define set_program_name(ARG0) \ 00050 set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) 00051 00052 /* Return the full pathname of the current executable, based on the earlier 00053 call to set_program_name_and_installdir. Return NULL if unknown. */ 00054 extern char *get_full_program_name (void); 00055 00056 #endif 00057 00058 00059 #ifdef __cplusplus 00060 } 00061 #endif 00062 00063 00064 #endif /* _PROGNAME_H */