File: funcallr.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 (35 lines) | stat: -rw-r--r-- 999 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
/*
\funcref{fun\_call\_rss}{void fun\_call\_rss ()}
    {}
    {}
    {error(), getopcode()}
    {}
    {funcallr.c}
    {

        This function is executed when an {\em op\_call\_rss} opcode is
        encountered in the binary makefile. Following this opcode a function
        index is expected (an {\em char} value), indicating the function number
        to call (see the enumeration type {\em FUNNR\_} in the file {\em
        icrss.h}).

        If the index indicates a non-existing function, i.e., when the index
        exceeds or equals {\em f\_hlt}, an error occurs. Else, the indicated
        built in function is called (see the {\em builtinfun} array of function
        pointers, files {\em icm-exec.h} and {\em data.c}).
    }
*/

#include "icm-exec.h"

void fun_call_rss ()
{
    char
        funnr;

    funnr = (char) getopcode (infile);
    if (funnr >= f_hlt)
        error ("unexisting rss function call at %s", hexstring (curoffs, 4));

    builtinfun [ (int) funnr] ();
}