summaryrefslogtreecommitdiff
path: root/c,cc/filelib.h
blob: 587cddfefff39f868de712cbfc0d0fab087bf1af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef FILELIB_H
#define FILELIB_H

#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <zlib.h>
#include <assert.h>
#include "util.h"

#define GZIP_EXT ".gz"


typedef struct
{
  char* name; // relative
  bool gz;
} hFile;

hFile* makef(char* fname, const char* mode);
bool writeln(const char* s, hFile* f);


#endif