Using flags
BAKERWL at UWYO.EDU
BAKERWL at UWYO.EDU
Thu Jun 2 13:06:30 EDT 1994
Have not tried to implement flags before and can't get it to work.
Anyone have an idea why the following produces a segmentation fault
(core dump)?:
struct Flag *run;
G_gisinit(argv[0]);
run = G_define_flag();
run->key = 'b';
run->description = "Run in background";
run->answer = 'f';
if (G_parser(argc,argv))
exit(-1);
printf("%s\n",run->answer);
The core dump is from the printf statement. It must be something
stupid I'm doing, but I can't see it...
Bill Baker
bakerwl at uwyo.edu
More information about the grass-dev
mailing list