Пример #1
0
void *
next_dlsym(void *handle, char *symbol)
{
	NXStream   *errorStream = OpenError();
	char		symbuf[1024];
	unsigned long symref = 0;

	snprintf(symbuf, sizeof(symbuf), "_%s", symbol);
	if (!rld_lookup(errorStream, symbuf, &symref))
		TransferError(errorStream);
	CloseError(errorStream);
	return (void *) symref;
}
Пример #2
0
Tcl_PackageInitProc *
TclpFindSymbol(
    Tcl_Interp *interp,
    Tcl_LoadHandle loadHandle,
    CONST char *symbol)
{
    Tcl_PackageInitProc *proc = NULL;
    if (symbol) {
	char sym[strlen(symbol) + 2];

	sym[0] = '_';
	sym[1] = 0;
	strcat(sym, symbol);
	rld_lookup(NULL, sym, (unsigned long *)&proc);
    }
    return proc;
}