#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <stdarg.h>
gehe zum Quellcode dieser Datei
static char* get_str |
( |
char * |
s, |
|
|
char * |
d |
|
) |
| |
|
static |
Definiert in Zeile 28 der Datei gen_conf_lua.c.
30 while ((*
s ==
' ') || (*
s ==
'\t') || (*
s ==
','))
s++;
31 while (*
s && (*
s !=
' ') && (*
s !=
'\t') && (*
s !=
',') && (*
s !=
'=') && (*
s !=
')'))
35 while (*
s && (*
s !=
',') && (*
s !=
'=') && (*
s !=
')'))
40 while ((*
s ==
' ') || (*
s ==
'\t') || (*
s ==
','))
s++;
41 while (*
s && (*
s !=
' ') && (*
s !=
'\t') && (*
s !=
',') && (*
s !=
'=') && (*
s !=
')'))
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definiert in Zeile 60 der Datei gen_conf_lua.c.
69 if (f ==
NULL)
usage(
"failed to open conf.c file");
72 sprintf(conf_name,
" %s[]", argv[2]);
82 printf(
"--[[\nGENERATED %s TABLE\n--]]\nreturn {\n _config_id=%d,\n", argv[2], start);
92 s =
strstr(line,
"CONF_INFO(");
93 if (s == 0) { off = 11; s =
strstr(line,
"CONF_INFO2("); }
94 if (s == 0) { off = 11; s =
strstr(line,
"CONF_INFOP("); }
97 char *c =
strstr(line,
"//");
98 if ((c == 0) || (c > s))
102 if (
strcmp(nm+5,
"script_allow_lua_native_calls") != 0)
104 lastid =
atoi(val) + start;
108 printf(
" _first_entry=%d,\n", firstid);
110 printf(
" %s=%d,\n", nm+5, lastid);
117 s =
strstr(line, conf_name);
118 if (s != 0) found = 1;
122 printf(
" _last_entry=%d\n}\n", lastid);
static int read_line |
( |
FILE * |
f, |
|
|
char * |
buf |
|
) |
| |
|
static |
Definiert in Zeile 13 der Datei gen_conf_lua.c.
19 if (
fread(
buf,1,1,f) != 1) { eof = 1;
break; }
20 if ((*
buf == 0x0A) || (*
buf == 0x0D))
break;
25 return (eof == 0) || (len > 0);
Definiert in Zeile 54 der Datei gen_conf_lua.c.
56 fprintf(stderr,
"gen_conf_lua conf.c conf_name start_value - Error = %s\n",err);