summaryrefslogtreecommitdiff
path: root/other/burneye/src/conf/tmp/functions.c
diff options
context:
space:
mode:
authorRoot THC2026-02-24 12:42:47 +0000
committerRoot THC2026-02-24 12:42:47 +0000
commitc9cbeced5b3f2bdd7407e29c0811e65954132540 (patch)
treeaefc355416b561111819de159ccbd86c3004cf88 /other/burneye/src/conf/tmp/functions.c
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/burneye/src/conf/tmp/functions.c')
-rw-r--r--other/burneye/src/conf/tmp/functions.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/other/burneye/src/conf/tmp/functions.c b/other/burneye/src/conf/tmp/functions.c
new file mode 100644
index 0000000..96af53c
--- /dev/null
+++ b/other/burneye/src/conf/tmp/functions.c
@@ -0,0 +1,66 @@
1/* fornax - distributed network
2 *
3 * by team teso
4 *
5 * function routines
6 */
7
8#include <stdio.h>
9#include <string.h>
10#include "functions.h"
11#include "functionlist.h"
12#include "symbol.h"
13
14
15int fnc_debug (sym_elem **stab);
16
17function gl_fnc[] = {
18 /* primitives */
19 { "nop", NULL },
20 { "debug", fnc_debug },
21
22 /* network */
23 { "net.listen", f_listen },
24
25 /* fornax system */
26 { "sys.self", node_self },
27
28 /* time management */
29 { "time.schedule", tt_schedule },
30 { "time.erase", tt_erase },
31
32 /* end of list */
33 { NULL, NULL },
34};
35
36
37fnc_handler
38fnc_find (function ftab[], char *name)
39{
40 int stp_p; /* step pointer */
41
42 for (stp_p = 0 ; ftab[stp_p].name != NULL ; ++stp_p) {
43 if (strcasecmp (ftab[stp_p].name, name) == 0)
44 return (ftab[stp_p].f_handler);
45 }
46
47 return (NULL);
48}
49
50
51int
52fnc_debug (sym_elem **stab)
53{
54 int n;
55
56 if (stab == NULL)
57 return (0);
58
59 for (n = 0 ; stab[n] != NULL ; ++n) {
60 printf ("%s . %s\n", (stab[n]->key == NULL) ? "NULL" : stab[n]->key,
61 (stab[n]->value == NULL) ? "NULL" : stab[n]->value);
62 }
63
64 return (0);
65}
66