[go: up one dir, main page]

Menu

[897c37]: / modules / misc.lpc  Maximize  Restore  History

Download this file

53 lines (40 with data), 750 Bytes

#!/u/geoff/swlpc/bin/lpc

#if 0
/*
 *
 * LPC / C interface
 *
 */
#endif

int handle;

void reset()
{
    int x;

    handle = load_shared_object("modules/misc.so");
}

void query_destruct()
{
    unload_shared_object(handle);
}

int srandom(int seed)
{
    return ext_c_call(handle, "lpc_srandom", seed);
}

int random(int range)
{
    return ext_c_call(handle, "lpc_random", range);
}

int hash_value(ob)
{
    return ext_c_call(handle, "hash_value", ob);
}

string ctime(int time)
{
    return ext_c_call(handle, "lpc_ctime", time);
}

// lpc for now.
int array_index(array arrofarr, int nelement, match, int start)
{
    return ext_c_call(handle, "lpc_array_index", arrofarr, 
                                        nelement, match, start);

}