-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathind.h
57 lines (48 loc) · 1.18 KB
/
ind.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Copy me if you can.
* by 20h
*/
#ifndef IND_H
#define IND_H
#include <stdio.h>
extern int glfd;
typedef struct Elems Elems;
struct Elems {
char **e;
int num;
};
typedef struct Indexs Indexs;
struct Indexs {
Elems **n;
int num;
};
typedef struct filetype filetype;
struct filetype {
char *end;
char *type;
void (* f)(int, char *, char *, char *, char *, char *, char *,
char *, int);
};
filetype *gettype(char *filename);
void *xcalloc(size_t, size_t);
void *xmalloc(size_t);
void *xrealloc(void *, size_t);
char *xstrdup(const char *str);
int xsendfile(int, int);
Indexs *scanfile(char *fname);
Elems *getadv(char *str);
int pendingbytes(int sock);
void waitforpendingbytes(int sock);
int printelem(int fd, Elems *el, char *file, char *base, char *addr, char *port);
void addindexs(Indexs *idx, Elems *el);
void addelem(Elems *e, char *s);
void freeindex(Indexs *i);
void freeelem(Elems *e);
char *smprintf(char *fmt, ...);
char *reverselookup(char *host);
void setcgienviron(char *file, char *path, char *port, char *base,
char *args, char *sear, char *ohost, char *chost,
int istls);
char *humansize(off_t n);
char *humantime(const time_t *clock);
#endif