00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <string.h>
00017 #include <grass/gis.h>
00018
00019 static const char *name = "?" ;
00020
00021
00032 const char *G_program_name(void)
00033 {
00034 return name;
00035 }
00036
00037 int G_set_program_name(const char *s)
00038 {
00039 int i;
00040
00041 i = strlen (s);
00042 while (--i >= 0)
00043 {
00044 if (s[i] == '/')
00045 {
00046 s += i+1;
00047 break;
00048 }
00049 }
00050 name = G_store (s);
00051
00052 return 0;
00053 }