open_files.c 991 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*****************************************************************************/
  2. /*** ***/
  3. /*** open_files() ***/
  4. /*** Opens input and output raster maps. ***/
  5. /*** Jo Wood, Project ASSIST, 24th January 1993 ***/
  6. /*** ***/
  7. /*****************************************************************************/
  8. #include <grass/gis.h>
  9. #include <grass/raster.h>
  10. #include <grass/glocale.h>
  11. #include "param.h"
  12. void open_files(void)
  13. {
  14. /* Open existing file and set the input file descriptor. */
  15. fd_in = Rast_open_old(rast_in_name, "");
  16. /* Open new file and set the output file descriptor. */
  17. if (mparam != FEATURE)
  18. fd_out = Rast_open_new(rast_out_name, DCELL_TYPE);
  19. else
  20. fd_out = Rast_open_new(rast_out_name, CELL_TYPE);
  21. }