File: data.c

package info (click to toggle)
icmake 6.22-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,120 kB
  • ctags: 1,045
  • sloc: ansic: 9,241; makefile: 1,138; asm: 126; sh: 124
file content (141 lines) | stat: -rw-r--r-- 2,430 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#include "icm-exec.h"

char
    nullstring [] = "",
    orgdir [_MAX_PATH],
    *arghead,
    *argtail,
    *bimname,
    *cmdhead,
    *cmdtail;

FILE
    *infile;

BIN_HEADER_
    *headerp;

int
    echo = 1,
    retval;

UNS16
    nvar,
    bp,
    sp = (UNS16) -1;

unsigned
    curoffs;

VAR_
    reg,
    *var,
    *stack;

void
    (*procfun[]) ARG ((void)) =
    {
        fun_jmp,
        fun_jmp_false,
        fun_jmp_true,
        fun_push_1_jmp_end,
        fun_push_0,
        fun_push_imm,
        fun_push_strconst,
        fun_push_var,
        fun_push_reg,
        fun_pop_var,
        fun_umin,
        fun_atoi,
        fun_itoa,
        fun_atol,
        fun_mul,
        fun_div,
        fun_mod,
        fun_add,
        fun_sub,
        fun_eq,
        fun_neq,
        fun_sm,
        fun_gr,
        fun_younger,
        fun_older,
        fun_smeq,
        fun_greq,
        fun_call_rss,
        fun_asp,
        fun_exit,
        fun_copy_var,
        fun_inc,
        fun_dec,
        fun_call,
        fun_frame,
        fun_ret,
        fun_pop_reg,
        fun_band,
        fun_bor,
        fun_bnot,
        fun_xor,
        fun_shl,
        fun_shr,

        /* fun_hlt does not exist, op_hlt is a dummy... */

    },

    (*builtinfun[]) ARG ((void)) =
    {
        fun_arg_head,
        fun_arg_tail,
        fun_ascii_int,
        fun_ascii_str,

        fun_c_base,
        fun_chdir,
        fun_c_ext,
        fun_cmd_head,
        fun_cmd_tail,
        fun_c_path,

        fun_echo,
        fun_element,
        fun_exec,
        fun_exec,                       /* dummy for compiler-used */
        fun_exists,                     /*     fun_execute */

        fun_fields,
        fun_fgets,
        fun_fprintf,

        fun_g_base,
        fun_getch,
        fun_gets,
        fun_g_ext,
        fun_g_path,

        fun_makelist,

        fun_printf,
        fun_putenv,

        fun_sizeoflist,
        fun_stat,
        fun_str_el,
        fun_empty,                      /* strlwr */
        fun_empty,                      /* strupr */
        fun_system,
        
        fun_empty,			/* strlen */
        fun_empty,			/* substr */
        fun_getpid,

        fun_empty,
        fun_empty,
        fun_empty,
        fun_empty,
        fun_empty,
        fun_empty,
        fun_empty,

        /* fun_hlt is non-existent.. f_hlt used to mark unexisting functions */
    };