home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
SOURCE
/
CSSRC
/
FSYM.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-08
|
2KB
|
82 lines
/*
fsym.c 6/13/88 funcs list for use with sed files
% fsym_Find*
C-scape 3.2
Copyright (c) 1988, 1989 by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
7/22/89 jdc added fsym_FindNameFunc, fsym_FindNamePtr
8/08/89 jdc added string_funcs return in fsym_FindPtr
8/09/89 jdc changed oslist_GetSym to oslist_Get
1/21/90 jdc changed oslist stuff
1/24/90 jdc preened
3/28/90 jmd ansi-fied
9/07/90 jmd renamed oslist funcs
*/
#include "sed.h"
#include "fsymdecl.h"
#include "winspriv.h"
char *fsym_FindNameFunc(oslist_type list, VOID_FPTR fptr)
/*
*/
{
unsigned int i;
int h;
if (list != NULL) {
for (i = 0; i < oslist_GetSize(list); i++) {
h = oslist_GetAlphaHandle(list, i);
if (fptr == *((VOID_FPTR *)oslist_GetData(list, h))) {
return(oslist_GetSym(list, h));
}
}
}
return(NULL);
}
char *fsym_FindNamePtr(oslist_type list, VOID *ptr)
/*
*/
{
unsigned int i;
int h;
if (list != NULL) {
for (i = 0; i < oslist_GetSize(list); i++) {
h = oslist_GetAlphaHandle(list, i);
if (ptr == *((VOID **)oslist_GetData(list, h))) {
return(oslist_GetSym(list, h));
}
}
}
return(NULL);
}
VOID_FPTR fsym_FindFunc(oslist_type list, char *name, int *handlep)
{
if (list == NULL
|| (*handlep = oslist_FindHandle(list, name)) == OSLIST_BADNAME) {
return(FNULL);
}
return(*((VOID_FPTR *)oslist_GetData(list, *handlep)));
}
VOID *fsym_FindPtr(oslist_type list, char *name, int *handlep)
{
if (list == NULL
|| (*handlep = oslist_FindHandle(list, name)) == OSLIST_BADNAME) {
return(NULL);
}
return(*((VOID **)oslist_GetData(list, *handlep)));
}