1 /*
2 * Uncompress a raster3d input file into a temporary file
3 */
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7
8 #ifdef __hpux
9 #define ungz_ ungz
10 #endif
11
ungz_(origname,tempname)12 int ungz_( origname, tempname )
13 char *origname, *tempname;
14 {
15 char command[128];
16 char *t;
17 int ierr;
18
19 #ifdef GUNZIP
20 t = tempnam( NULL, "R3D%%" );
21 sprintf( command, "gunzip -c %s > %s", origname, t );
22 ierr = system( command );
23 strcpy( tempname, t );
24 #else
25 fprintf(stderr," >> sorry, no decompression support\n");
26 ierr = -1;
27 #endif
28
29 return(ierr);
30 }
31