mirror of
https://github.com/troglobit/libite.git
synced 2026-10-12 10:12:22 +00:00
Add UNIX lfile_t parser API to lite.h
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include <string.h> /* strlen(), strncmp(), strtok_r() */
|
||||
#include <sys/param.h> /* MAX() */
|
||||
|
||||
typedef struct {
|
||||
typedef struct lfile {
|
||||
FILE *fp;
|
||||
char buf[256];
|
||||
char *sep, *save;
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <sys/param.h> /* MAX(), isset(), setbit(), TRUE, FALSE, et consortes. :-) */
|
||||
#include <unistd.h>
|
||||
|
||||
typedef struct lfile lfile_t;
|
||||
|
||||
char *chomp (char *str);
|
||||
|
||||
int fexist (char *file);
|
||||
@@ -48,6 +50,13 @@ size_t fsendfile (FILE *src, FILE *dst, size_t len);
|
||||
|
||||
int ifconfig (char *ifname, char *addr, char *mask, int up);
|
||||
|
||||
lfile_t*lfopen (char *file, char *sep);
|
||||
void lfclose (lfile_t *lf);
|
||||
char *lftok (lfile_t *lf);
|
||||
char *lfgetkey (lfile_t *lf, char *key);
|
||||
int lfgetint (lfile_t *lf, char *key);
|
||||
int fgetint (char *file, char *sep, char *key);
|
||||
|
||||
int mkpath (char *dir, mode_t mode);
|
||||
int makepath (char *dir);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user