Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
dlight/cconf.h
Henrik Hautakoski b2df740514 Initial commit
2011-09-21 17:13:28 +02:00

43 lines
758 B
C

#ifndef CCONF_H
#define CCONF_H
/*
* data structure for 'Dlight compiled config' file format.
*/
/* \232 D C C */
#define CCONF_SIGNATURE 0xe8444343
struct cconf_header {
unsigned int signature;
unsigned int version;
unsigned char crc[20];
};
struct target {
char *src; /* source. (url) */
char *dest; /* destination, path on filesystem */
char **filter;
unsigned int nr;
};
struct cconf {
struct target *target;
unsigned int nr;
struct {
void *buf;
unsigned long size;
} map;
};
void cconf_free(struct cconf *c);
struct target* cconf_new_target(struct cconf *c);
void cconf_add_filter(struct target *t, char *filter);
int cconf_write(int fd, struct cconf *c);
struct cconf* cconf_read(const char *filename);
#endif /* CCONF_H */