dtksh: move fsym() into widget.c where it belongs

This function is only used in one place, so move it there and delete
findsym.c
This commit is contained in:
Jon Trulson
2021-10-23 15:05:44 -06:00
parent f61316c4f4
commit efa6b6eadc
3 changed files with 27 additions and 72 deletions

View File

@@ -33,6 +33,7 @@
#include "name.h"
#include "shell.h"
#include <string.h>
#include <dlfcn.h>
#include <X11/Intrinsic.h>
#include <X11/IntrinsicP.h>
#include <X11/Shell.h>
@@ -576,6 +577,32 @@ fixupresources(
}
}
/*
* This function is currently only used to locate a widget class record,
* as requested by a DtLoadWidget request.
*/
static void *
fsym(
char *str,
int lib )
{
int i = 0;
void * addr;
if (liblist == NULL)
return (NULL);
while (liblist[i].dll)
{
if (addr = dlsym(liblist[i].dll, str))
return(addr);
i++;
}
return(0);
}
int
do_DtLoadWidget(
int argc,