Lines Matching defs:file
88 const char *out; /* compressed output file */
89 const char *in; /* compressed input file */
95 gzFile file;
98 file = gzopen(out, "wb");
99 if (file == NULL) {
103 gzputc(file, 'h');
104 if (gzputs(file, "ello") != 4) {
105 fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
108 if (gzprintf(file, ", %s!", "hello") != 8) {
109 fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
112 gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
113 gzclose(file);
115 file = gzopen(in, "rb");
116 if (file == NULL) {
121 uncomprLen = gzread(file, uncompr, (unsigned)uncomprLen);
123 fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
133 pos = gzseek(file, -8L, SEEK_CUR);
134 if (pos != 6 || gztell(file) != pos) {
136 (long)pos, (long)gztell(file));
140 if (gzgetc(file) != ' ') {
145 gzgets(file, (char*)uncompr, uncomprLen);
148 fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
158 gzclose(file);