diff options
author | Max Horn | 2009-02-16 00:17:27 +0000 |
---|---|---|
committer | Max Horn | 2009-02-16 00:17:27 +0000 |
commit | ffa7f53377d7891c8a06d04edb7816f2dbe1ae30 (patch) | |
tree | da6cad2e13b7b079e9065311c8ccb43d0fea27b2 /engines | |
parent | 7ecb41027c2ed21b6a53ab6d60a57873c96b4f85 (diff) | |
download | scummvm-rg350-ffa7f53377d7891c8a06d04edb7816f2dbe1ae30.tar.gz scummvm-rg350-ffa7f53377d7891c8a06d04edb7816f2dbe1ae30.tar.bz2 scummvm-rg350-ffa7f53377d7891c8a06d04edb7816f2dbe1ae30.zip |
SCI: Removed some unused files
svn-id: r38334
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/scicore/makefile.dos | 19 | ||||
-rw-r--r-- | engines/sci/scicore/modules.cpp | 150 |
2 files changed, 0 insertions, 169 deletions
diff --git a/engines/sci/scicore/makefile.dos b/engines/sci/scicore/makefile.dos deleted file mode 100644 index d456fb16de..0000000000 --- a/engines/sci/scicore/makefile.dos +++ /dev/null @@ -1,19 +0,0 @@ -# -# FreeSCI/DOS Makefile -# -# 19991220 rink created this file -# -# -TARGET : scicore.a - -FILES = console.o tools.o resource.o decompress0.o decompress1.o \ - script.o vocab.o vocab_debug.o old_objects.o sci_dos.o - -CC = gcc -CFLAGS = -g -c -I../include -I../.. -D_DOS -DHAVE_LIBPNG -DHAVE_UNISTD_H - -clean: - del *.o *.a - -scicore.a: ${FILES} - ar r scicore.a ${FILES} diff --git a/engines/sci/scicore/modules.cpp b/engines/sci/scicore/modules.cpp deleted file mode 100644 index 2b3cfabbaa..0000000000 --- a/engines/sci/scicore/modules.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/*************************************************************************** - modules.c Copyright (C) 2001 Christoph Reichenbach - - - This program may be modified and copied freely according to the terms of - the GNU general public license (GPL), as long as the above copyright - notice and the licensing information contained herein are preserved. - - Please refer to www.gnu.org for licensing details. - - This work is provided AS IS, without warranty of any kind, expressed or - implied, including but not limited to the warranties of merchantibility, - noninfringement, and fitness for a specific purpose. The author will not - be held liable for any damage caused by this work or derivatives of it. - - By using this source code, you agree to the licensing terms as stated - above. - - - Please contact the maintainer for bug reports or inquiries. - - Current Maintainer: - - Christoph Reichenbach (CR) <jameson@linuxgames.com> - -***************************************************************************/ - -#if 0 -#ifndef __BEOS__ - -#include <sci_memory.h> -#include <modules.h> -#include <dlfcn.h> - - -static sci_module_t * -_sci_try_open_module(char *filename, char *path, char *struct_name, void **handle) { - char *fullname = sci_malloc(strlen(path) + strlen(DIR_SEPARATOR_STR) - + strlen(filename)); - sci_module_t *module; - fprintf(stderr, "Trying module %s at %s\n", filename, path); - strcpy(fullname, path); - strcat(fullname, DIR_SEPARATOR_STR); - strcat(fullname, filename); - - fprintf(stderr, "Total name is %s\n", fullname); - *handle = dlopen(fullname, RTLD_NOW); - fprintf(stderr, "Could not open because: %s\n", dlerror()); - free(fullname); - - if (!*handle) - return NULL; - - module = (sci_module_t *) dlsym(*handle, struct_name); - if (!module) - fprintf(stderr, "%s: Failed to find symbol '%s'.\n", - fullname, struct_name); - - return module; -} - -void * -sci_find_module(char *path, char *name, char *type, char *struct_prefix, - char *file_suffix, int magic, int version, void **handle) { - char *module_name = sci_malloc(strlen(type) + strlen(DIR_SEPARATOR_STR) - + strlen(name) + strlen(file_suffix) - + strlen(MODULE_NAME_SUFFIX) + 1); - char *struct_name = sci_malloc(strlen(struct_prefix) + strlen(name) + 1); - char *dir_end; - char *path_pos = path; - char path_separator = PATH_SEPARATOR_STR[0]; - sci_module_t *module = NULL; - - strcpy(module_name, type); - strcat(module_name, DIR_SEPARATOR_STR); - strcat(module_name, name); - strcat(module_name, file_suffix); - strcat(module_name, MODULE_NAME_SUFFIX); - - strcpy(struct_name, struct_prefix); - strcat(struct_name, name); - - do { - dir_end = strchr(path_pos, path_separator); - if (dir_end) - *dir_end = 0; - - module = _sci_try_open_module(module_name, path_pos, - struct_name, handle); - - if (module) { - if (module->class_magic != magic) { - fprintf(stderr, "%s at %s is not a %s module, skipping...\n", - module_name, path_pos, type); - dlclose(*handle); - module = NULL; - } else if (module->class_version != version) { - fprintf(stderr, "%s at %s has %s module version %d," - " expected %d- skipping...\n", - module_name, path_pos, type, module->class_version, - version); - dlclose(*handle); - module = NULL; - } - } - - if (dir_end) { - *dir_end = path_separator; - path_pos = dir_end + 1; - } - - } while (!module && dir_end); - - if (!module) { - *handle = NULL; - fprintf(stderr, "%s module '%s' not found in path '%s'.\n", - type, name, path); - } else { - if (dir_end) - *dir_end = 0; - - printf("Using %s driver '%s', version %s, from '%s'.\n", - type, module->module_name, module->module_version, - path_pos); - - if (dir_end) - *dir_end = path_separator; - } - - free(module_name); - free(struct_name); - - return (void *) module; -} - - -void -sci_close_module(void *module, char *type, char *name) { - if (!module) - return; - - if (dlclose(module)) { - fprintf(stderr, "Error while closing %s module '%s': %s\n", - type, name, dlerror()); - } -} - -#endif /* !__BEOS__ */ - -#endif /* 0 */ |