From f9f14afec519be2a28badc8ce5474892f9e9570b Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 3 Mar 2013 01:03:33 +0000 Subject: [PATCH] Move */editor/func.c -> common/editor/func.c --- SConstruct | 3 +- {d1x-rebirth => common}/editor/func.c | 0 d2x-rebirth/editor/func.c | 111 -------------------------- 3 files changed, 1 insertion(+), 113 deletions(-) rename {d1x-rebirth => common}/editor/func.c (100%) delete mode 100644 d2x-rebirth/editor/func.c diff --git a/SConstruct b/SConstruct index f6647c011..283587aa5 100644 --- a/SConstruct +++ b/SConstruct @@ -252,6 +252,7 @@ class DXXArchive(DXXCommon): ] ] editor_sources = [os.path.join(srcdir, f) for f in [ +'editor/func.c', 'ui/button.c', 'ui/checkbox.c', 'ui/dialog.c', @@ -583,7 +584,6 @@ class D1XProgram(DXXProgram): 'editor/eobject.c', 'editor/eswitch.c', 'editor/fixseg.c', -'editor/func.c', 'editor/group.c', 'editor/kgame.c', 'editor/kmine.c', @@ -746,7 +746,6 @@ class D2XProgram(DXXProgram): 'editor/eobject.c', 'editor/eswitch.c', 'editor/fixseg.c', -'editor/func.c', 'editor/group.c', 'editor/kgame.c', 'editor/kmine.c', diff --git a/d1x-rebirth/editor/func.c b/common/editor/func.c similarity index 100% rename from d1x-rebirth/editor/func.c rename to common/editor/func.c diff --git a/d2x-rebirth/editor/func.c b/d2x-rebirth/editor/func.c deleted file mode 100644 index 367911b1b..000000000 --- a/d2x-rebirth/editor/func.c +++ /dev/null @@ -1,111 +0,0 @@ -/* -THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX -SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO -END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A -ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS -IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS -SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE -FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE -CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. -COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. -*/ - -/* - * - * . - * - */ - - -#include -#include - -#include "func.h" -#include "strutil.h" - -#define MAX_PARAMS 10 - -static FUNCTION * func_table = NULL; -static int func_size = 0; -static int initialized = 0; -static int func_params[MAX_PARAMS]; - -int func_howmany() -{ - return func_size; -} - -void func_init( FUNCTION * funtable, int size ) -{ - if (!initialized) - { - initialized = 1; - func_table = funtable; - func_size = size; - atexit( func_close ); - } -} - - -void func_close() -{ - if (initialized) - { - initialized = 0; - func_table = NULL; - func_size = 0; - } -} - -int (*func_get( char * name, int * numparams ))(void) -{ - int i; - - for (i=0; i