#include <sys/types.h>#include <stdio.h>#include <stddef.h>#include <stdlib.h>#include <errno.h>#include <string.h>#include <time.h>#include <sys/stat.h>#include <ctype.h>#include <configfile.h>Include dependency graph for configfile.c:

Go to the source code of this file.
Data Structures | |
| struct | configfile |
| struct | firstconfig |
Defines | |
| #define | nil ((void*)0) |
| #define | fstat _fstat |
| #define | stat _stat |
| #define | _c |
| #define | configfilesize(len) (offsetof(configfile_t, name) + 1 + (len)) |
| #define | config0size() (offsetof(config_t, word)) |
| #define | configsize(len) (config0size() + 1 + (len)) |
| #define | firstconfigsize(len) (offsetof(firstconfig_t, config1) + configsize(len)) |
| #define | cfg2fcfg(p) ((firstconfig_t *) ((char *) (p) - offsetof(firstconfig_t, config1))) |
| #define | fcfg2cfg(p) (&(p)->config1) |
| #define | deallocate(mem) free(mem) |
Typedefs | |
| typedef configfile | configfile_t |
| typedef firstconfig | firstconfig_t |
Functions | |
| static void * | allocate (void *mem, size_t size) |
| static void | delete_filelist (configfile_t *cfgf) |
| static void | delete_config (config_t *cfg) |
| void | config_delete (config_t *cfg1) |
| static void | nextc (void) |
| static void | skipwhite (void) |
| static void | parse_err (void) |
| static config_t * | read_word (void) |
| static config_t * | read_file (const char *file) |
| static config_t * | read_list (void) |
| static config_t * | read_line (void) |
| config_t * | config_read (const char *file, int flags, config_t *cfg) |
| int | config_renewed (config_t *cfg) |
| size_t | config_length (config_t *cfg) |
Variables | |
| static configfile_t * | c_files |
| static int | c_flags |
| static FILE * | c_fp |
| static char * | c_file |
| static unsigned | c_line |
| static int | c |
|
|
Definition at line 25 of file configfile.c. |
|
|
Definition at line 50 of file configfile.c. Referenced by config_delete(), config_read(), and config_renewed(). |
|
|
Definition at line 44 of file configfile.c. Referenced by read_list(). |
|
|
Definition at line 35 of file configfile.c. Referenced by read_file(). |
|
|
Definition at line 45 of file configfile.c. Referenced by config_read(), and read_word(). |
|
|
Definition at line 72 of file configfile.c. Referenced by cache_reply(), chop_dlist(), close_relay(), config_delete(), dec(), del_asm86(), del_expr(), delete_filelist(), deltemp(), execjob(), explode(), file2cache(), force_expire(), forget(), get_prog(), get_query(), getattributes(), insert_query(), job_connect(), job_setup_connect(), linked(), pop_name(), set_file(), skip_token(), and tab_purge(). |
|
|
Definition at line 52 of file configfile.c. Referenced by config_read(). |
|
|
Definition at line 46 of file configfile.c. Referenced by config_read(). |
|
|
Definition at line 9 of file configfile.c. Referenced by allocbuf(), allowed(), ar_close(), ar_open(), cdiff(), comp_inodes(), copy(), cp_file(), diff(), do_login(), doit(), file_size(), file_time(), Find_Inode(), format_device(), fpathconf(), freopen(), from_cu(), geometry(), getch(), getzrxinit(), install_master(), main(), opendir(), rd_wrfile(), read_file(), sbx_fdlen(), SimpleFileOpen(), sizeup(), special(), strip(), test19e(), test26a(), test27a(), test27b(), test27c(), test39f(), test39g(), test39i(), test7c(), ttyname(), visitfile(), wall(), wcs(), wctxpn(), and wr_rdfile(). |
|
|
Definition at line 5 of file configfile.c. |
|
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 62 of file configfile.c. References c_file, c_line, exit(), fprintf(), nil, realloc(), and stderr. |
|
|
Definition at line 118 of file configfile.c. References cfg2fcfg, firstconfig::config1, deallocate, delete_config(), delete_filelist(), and firstconfig::filelist. Referenced by config_read(). |
|
|
Definition at line 498 of file configfile.c. References nil. Referenced by configtag(), and makedhcp(). |
|
||||||||||||||||
|
Definition at line 441 of file configfile.c. References allocate(), c_files, c_flags, cfg2fcfg, firstconfig::config1, config_delete(), configsize, configfile::ctime, delete_config(), delete_filelist(), ENOENT, errno, fcfg2cfg, firstconfig::filelist, firstconfigsize, memmove(), configfile::name, firstconfig::new, configfile::next, nil, read_file(), st, stat::st_ctime, stat, and strlen(). Referenced by initdhcpconf(). |
|
|
Definition at line 485 of file configfile.c. Referenced by initdhcpconf(). |
|
|
Definition at line 86 of file configfile.c. References list, next, and nil. Referenced by config_delete(), config_read(), and read_list(). |
|
|
Definition at line 74 of file configfile.c. References deallocate, configfile::next, and nil. Referenced by config_delete(), and config_read(). |
|
|
Definition at line 129 of file configfile.c. References c, c_file, c_fp, c_line, EOF, errno, exit(), ferror, fprintf(), getc, stderr, and strerror(). |
|
|
Definition at line 152 of file configfile.c. References c, c_file, c_line, EOF, exit(), fprintf(), and stderr. |
|
|
Definition at line 386 of file configfile.c. References allocate(), c, c_file, c_files, c_fp, c_line, configfilesize, configfile::ctime, ENOENT, EOF, errno, exit(), fclose(), fileno(), fopen(), fprintf(), fstat, memcpy(), configfile::name, configfile::next, nil, parse_err(), read_list(), slash(), st, stat::st_ctime, stderr, strcpy(), strerror(), strlen(), and strrchr(). |
|
|
Definition at line 301 of file configfile.c. References c, EOF, nil, parse_err(), and skipwhite(). |
|
|
Definition at line 341 of file configfile.c. References allocate(), c_file, CFG_SUBLIST, config0size, config_isatom, delete_config(), exit(), fprintf(), config::next, nil, p, read_file(), read_line(), stderr, and strcmp. Referenced by read_file(). |
|
|
Definition at line 164 of file configfile.c. References allocate(), c, c_file, c_line, configsize, i, nextc(), and nil. |
|
|
Definition at line 141 of file configfile.c. References c, EOF, isspace, and nextc(). Referenced by read_line(). |
|
|
Definition at line 60 of file configfile.c. |
|
|
Definition at line 58 of file configfile.c. Referenced by allocate(), nextc(), parse_err(), read_file(), read_list(), and read_word(). |
|
|
Definition at line 55 of file configfile.c. Referenced by config_read(), and read_file(). |
|
|
Definition at line 56 of file configfile.c. Referenced by compile(), config_read(), and processfiles(). |
|
|
Definition at line 57 of file configfile.c. Referenced by nextc(), and read_file(). |
|
|
Definition at line 59 of file configfile.c. Referenced by allocate(), copy_text(), copy_union(), nextc(), parse_err(), read_file(), and read_word(). |
1.4.6