Solaris fixes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@1056 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2001-03-20 20:44:23 +00:00
commit 3741c5eb91
8 changed files with 73 additions and 48 deletions

View file

@ -276,3 +276,23 @@ void wad_find_object(WadFrame *f) {
f->object = wad_object_load(f->segment->mappath);
}
}
/* -----------------------------------------------------------------------------
* wad_file_check(void *addr)
*
* Given an address, this function checks to see if it corresponds to a file
* we already mapped.
* ----------------------------------------------------------------------------- */
int
wad_file_check(void *addr) {
WadFile *f = wad_files;
while (f) {
if ((((char *) f->addr) <= ((char *) addr)) &&
(((char *) addr) < (((char *) f->addr) + f->size))) {
return 1;
}
f = f->next;
}
return 0;
}