2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00
Files
build/jam_src/native.c
Dave Abrahams c5f3926445 Fix up C++-isms in C code.
[SVN r21239]
2003-12-12 16:26:23 +00:00

35 lines
753 B
C

#include "native.h"
#include "hash.h"
# define P0 (PARSE *)0
# define C0 (char *)0
void declare_native_rule(char* module, char* rule, char** args,
LIST*(*f)(PARSE*, FRAME*))
{
module_t* m = bindmodule(module);
if (m->native_rules == 0) {
m->native_rules = hashinit( sizeof( native_rule_t ), "native rules");
}
{
native_rule_t n, *np = &n;
n.name = rule;
if (args)
{
n.arguments = args_new();
lol_build( n.arguments->data, args );
}
else
{
n.arguments = 0;
}
n.procedure = parse_make( f, P0, P0, P0, C0, C0, 0 );
hashenter(m->native_rules, (HASHDATA**)&np);
}
}