Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <grass/gis.h>
00029 #include <grass/glocale.h>
00030 #include <unistd.h>
00031 #include <stdlib.h>
00032 #include <grass/spawn.h>
00033 #define GEN_HELP "gen_help"
00034
00035 int G_gishelp(const char *helpfile, const char *request)
00036 {
00037 char file[1024];
00038
00039 if (request == NULL)
00040 request = GEN_HELP;
00041
00042 sprintf(file, "%s/txt/%s/%s", G_getenv("GISBASE"), helpfile, request);
00043
00044 if (!access(file, 04)) {
00045 fprintf(stderr, _("one moment...\n"));
00046 G_spawn(getenv("GRASS_PAGER"), getenv("GRASS_PAGER"), file, NULL);
00047 }
00048 else {
00049 fprintf(stderr, _("No help available for command [%s]\n"), request);
00050 }
00051
00052 return 0;
00053 }