1 #include "csf.h" 2 #include "csfimpl.h" 3 4 /* global header (opt.) and cellsize's prototypes "" */ 5 6 7 /* headers of this app. modules called */ 8 9 /***************/ 10 /* EXTERNALS */ 11 /***************/ 12 13 /**********************/ 14 /* LOCAL DECLARATIONS */ 15 /**********************/ 16 17 /*********************/ 18 /* LOCAL DEFINITIONS */ 19 /*********************/ 20 21 /******************/ draw_unencoded_bitmap(ushort ** fbp,uchar * bmap,ushort * cmap,int cnt)22/* IMPLEMENTATION */ 23 /******************/ 24 25 26 /* get cell size 27 * returns the cell size or -1 in case of an error 28 * 29 * Merrno 30 * ILL_CELLSIZE 31 * ILLHANDLE 32 */ 33 REAL8 RgetCellSize( 34 const MAP *map) /* map handle */ 35 { 36 CHECKHANDLE(map); 37 if ( map->raster.cellSize != map->raster.cellSizeDupl) 38 { 39 M_ERROR(ILL_CELLSIZE); 40 return -1; 41 } 42 43 return(map->raster.cellSize); 44 } 45 46 /* put cell size 47 * returns the new cell size or -1 48 * in case of an error. 49 * 50 * Merrno 51 * ILLHANDLE 52 * NOACCESS 53 * ILL_CELLSIZE 54 */ 55 REAL8 RputCellSize( 56 MAP *map, /* map handle */ 57 REAL8 cellSize) /* new cell size */ 58 { 59 CHECKHANDLE_GOTO(map, error); 60 if(! WRITE_ENABLE(map)) 61 { 62 M_ERROR(NOACCESS); 63 goto error; 64 } 65 if (cellSize <= 0.0) 66 { 67 M_ERROR(ILL_CELLSIZE); 68 goto error; 69 } 70 map->raster.cellSize = cellSize; 71 map->raster.cellSizeDupl = cellSize; 72 return(cellSize); 73 error: return(-1.0); 74 } 75