G_dump.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include "G.h"
00003 #include "glocale.h"
00004 int G_dump (int fd){
00005     fprintf(stderr,"G_dump: memory allocated to G__\n");
00006     fprintf(stderr,_("Size of cell in fp maps = %d\n"), G__.fp_nbytes);
00007     fprintf(stderr,_("type for writing floating maps = %d\n"), G__.fp_type);
00008     fprintf(stderr,_("current window = %p\n"),&G__.window);
00009     fprintf(stderr,_("Flag: window set? %d\n"),G__.window_set);
00010     fprintf(stderr,_("File descriptor for automatic mask %d\n"), G__.mask_fd);
00011     fprintf(stderr,_("Flag denoting automatic masking %d\n"),G__.auto_mask); 
00012     fprintf(stderr,_("CELL mask buffer %p\n"),G__.mask_buf);
00013     fprintf(stderr,_("buffer for reading null rows %p\n"),G__.null_buf);
00014     fprintf(stderr,_("Pre/post compressed data buffer %p\n"),G__.compressed_buf);
00015     fprintf(stderr,_("sizeof compressed_buf %d\n"),G__.compressed_buf_size);
00016     fprintf(stderr,_("work data buffer %p\n"), G__.work_buf);
00017     fprintf(stderr,_("sizeof work_buf %d\n"), G__.work_buf_size);
00018     fprintf(stderr,_("sizeof null_buf %d\n"), G__.null_buf_size);
00019     fprintf(stderr,_("sizeof mask_buf %d\n"), G__.mask_buf_size);
00020     fprintf(stderr,_("Histogram request %d\n"),G__.want_histogram);
00021 
00022     fprintf(stderr,_("G_dump: file #%d\n"), fd);
00023         fprintf(stderr,_("open mode = %d\n"),G__.fileinfo[fd].open_mode);
00024         fprintf(stderr,_("Cell header %p\n"),&G__.fileinfo[fd].cellhd);
00025         fprintf(stderr,_("Table reclass %p\n"),&G__.fileinfo[fd].reclass);
00026         fprintf(stderr,_("Cell stats %p\n"),&G__.fileinfo[fd].statf);
00027         fprintf(stderr,_("Range structure %p\n"),&G__.fileinfo[fd].range);
00028         fprintf(stderr,_("float Range structure %p\n"),&G__.fileinfo[fd].fp_range);
00029         fprintf(stderr,_("want histogram?  %d\n"),G__.fileinfo[fd].want_histogram);
00030         fprintf(stderr,_("Automatic reclass flag %d\n"),G__.fileinfo[fd].reclass_flag);
00031         fprintf(stderr,_("File row addresses %p\n"),G__.fileinfo[fd].row_ptr);
00032         fprintf(stderr,_("Data to window col mapping %p\n"),G__.fileinfo[fd].col_map);
00033         fprintf(stderr,_("Data to window row constants %f,%f\n"),G__.fileinfo[fd].C1,G__.fileinfo[fd].C2);
00034         fprintf(stderr,_("Current data row in memory %d\n"),G__.fileinfo[fd].cur_row);
00035         fprintf(stderr,_("Current null row in memory %d\n"),G__.fileinfo[fd].null_cur_row);
00036         fprintf(stderr,_("nbytes per cell for current row %d\n"),G__.fileinfo[fd].cur_nbytes);
00037         fprintf(stderr,_("Decompressed data buffer %s\n"),G__.fileinfo[fd].data);
00038         fprintf(stderr,_("bytes per cell %d\n"),G__.fileinfo[fd].nbytes);
00039         fprintf(stderr,_("type: int, float or double map %d\n"),G__.fileinfo[fd].map_type);
00040        fprintf(stderr,_("Temporary name for NEW files %s\n"),G__.fileinfo[fd].temp_name);
00041         fprintf(stderr,_("Temporary name for NEW NULL files %s\n"),G__.fileinfo[fd].null_temp_name);
00042         fprintf(stderr,_("for existing raster maps %d\n"),G__.fileinfo[fd].null_file_exists);
00043         fprintf(stderr,_("Name of open file %s\n"),G__.fileinfo[fd].name);
00044         fprintf(stderr,_("Mapset of open file %s\n"),G__.fileinfo[fd].mapset);
00045         fprintf(stderr,_("io error warning given %d\n"),G__.fileinfo[fd].io_error);
00046         fprintf(stderr,_("xdr stream for reading fp %p\n"),&G__.fileinfo[fd].xdrstream);
00047         fprintf(stderr,_("NULL_ROWS array[%d] = %p\n"),NULL_ROWS_INMEM,G__.fileinfo[fd].NULL_ROWS);
00048         fprintf(stderr,_("data buffer for reading null rows %p\n"),G__.fileinfo[fd].null_work_buf);
00049         fprintf(stderr,_("Minimum row null row number in memory %d\n"),G__.fileinfo[fd].min_null_row);
00050         fprintf(stderr,"Quant ptr = %p\n",&G__.fileinfo[fd].quant);
00051         fprintf(stderr,"G_dump: end\n");
00052 
00053     return 0;
00054 }

Generated on Sat Jul 22 22:06:14 2006 for GRASS by  doxygen 1.4.7