GRASS Programmer's Manual
6.4.2(2012)
|
00001 00015 #include <stdlib.h> 00016 #include <grass/segment.h> 00017 00018 00035 int segment_release(SEGMENT * SEG) 00036 { 00037 int i; 00038 00039 if (SEG->open != 1) 00040 return -1; 00041 00042 for (i = 0; i < SEG->nseg; i++) 00043 free(SEG->scb[i].buf); 00044 free(SEG->scb); 00045 00046 SEG->open = 0; 00047 00048 return 1; 00049 }