OSDN Git Service

wwww
authorsparky4 <sparky4@cock.li>
Sat, 27 Jun 2015 17:32:16 +0000 (12:32 -0500)
committersparky4 <sparky4@cock.li>
Sat, 27 Jun 2015 17:32:16 +0000 (12:32 -0500)
Signed-off-by: sparky4 <sparky4@cock.li>
16.LIB
GFX.LIB
exmmtest.exe
makefile
makefile.gnu
src/exmmtest.c
src/lib/16_mm.c
src/lib/16_mm.h
src/lib/16_us.h [deleted file]

diff --git a/16.LIB b/16.LIB
index e78e27b..6967e3b 100644 (file)
Binary files a/16.LIB and b/16.LIB differ
diff --git a/GFX.LIB b/GFX.LIB
index 8a1b04b..628f961 100644 (file)
Binary files a/GFX.LIB and b/GFX.LIB differ
index 4b2cebf..18e3f4f 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 39c7739..d49ccf9 100644 (file)
--- a/makefile
+++ b/makefile
@@ -42,9 +42,6 @@ fonttest.exe: fonttest.$(OBJ) 16.lib
 inputest.exe: inputest.$(OBJ) 16.lib\r
        wcl $(FLAGS) inputest.$(OBJ) 16.lib\r
 \r
-exmmtest.exe: exmmtest.$(OBJ) 16.lib\r
-       wcl $(FLAGS) $(MFLAGS) exmmtest.$(OBJ) 16.lib\r
-\r
 pcxtest.exe: pcxtest.$(OBJ) 16.lib\r
        wcl $(FLAGS) pcxtest.$(OBJ) 16.lib\r
 \r
@@ -66,6 +63,9 @@ emsdump.exe: emsdump.$(OBJ) memory.$(OBJ)
 fmemtest.exe: fmemtest.$(OBJ)# memory.$(OBJ)\r
        wcl $(FLAGS) $(MFLAGS) fmemtest.$(OBJ)# memory.$(OBJ)\r
 \r
+exmmtest.exe: exmmtest.$(OBJ) 16_mm.$(OBJ)\r
+        wcl $(FLAGS) $(MFLAGS) exmmtest.$(OBJ) 16_mm.$(OBJ)\r
+\r
 #\r
 #executable's objects\r
 #\r
index 4bb02c3..1743f46 100644 (file)
@@ -42,9 +42,6 @@ fonttest.exe: fonttest.$(OBJ) 16.lib
 inputest.exe: inputest.$(OBJ) 16.lib\r
        wcl $(FLAGS) inputest.$(OBJ) 16.lib\r
 \r
-exmmtest.exe: exmmtest.$(OBJ) 16.lib\r
-       wcl $(FLAGS) $(MFLAGS) exmmtest.$(OBJ) 16.lib\r
-\r
 pcxtest.exe: pcxtest.$(OBJ) 16.lib\r
        wcl $(FLAGS) pcxtest.$(OBJ) 16.lib\r
 \r
@@ -66,6 +63,9 @@ emsdump.exe: emsdump.$(OBJ) memory.$(OBJ)
 fmemtest.exe: fmemtest.$(OBJ)# memory.$(OBJ)\r
        wcl $(FLAGS) $(MFLAGS) fmemtest.$(OBJ)# memory.$(OBJ)\r
 \r
+exmmtest.exe: exmmtest.$(OBJ) 16_mm.$(OBJ)\r
+        wcl $(FLAGS) $(MFLAGS) exmmtest.$(OBJ) 16_mm.$(OBJ)\r
+\r
 #\r
 #executable's objects\r
 #\r
index 2124d3f..db3059d 100644 (file)
@@ -27,5 +27,6 @@
 void
 main(int argc, char *argv[])
 {
-
+       MM_Startup();
+       MM_Shutdown();
 }
index 570ec34..44426a0 100644 (file)
@@ -1062,7 +1062,7 @@ strcat (scratch,"\n");
 
 //CA_CloseDebug ();
 
-       IN_Ack();
+//++++mh       IN_Ack();
 //**** VW_SetLineWidth(64);
        bufferofs = temp;
 }
@@ -1146,4 +1146,38 @@ void MM_BombOnError (boolean bomb)
        bombonerror = bomb;
 }
 
+///////////////////////////////////////////////////////////////////////////
+//
+//      US_CheckParm() - checks to see if a string matches one of a set of
+//              strings. The check is case insensitive. The routine returns the
+//              index of the string that matched, or -1 if no matches were found
+//
+///////////////////////////////////////////////////////////////////////////
+int
+US_CheckParm(char *parm,char **strings)
+{
+       char    cp,cs,
+                       *p,*s;
+       int             i;
+
+       while (!isalpha(*parm)) // Skip non-alphas
+               parm++;
+
+       for (i = 0;*strings && **strings;i++)
+       {
+               for (s = *strings++,p = parm,cs = cp = 0;cs == cp;)
+               {
+                       cs = *s++;
+                       if (!cs)
+                               return(i);
+                       cp = *p++;
+
+                       if (isupper(cs))
+                               cs = tolower(cs);
+                       if (isupper(cp))
+                               cp = tolower(cp);
+               }
+       }
+       return(-1);
+}
 
index e864d04..663c7df 100644 (file)
 #include <string.h>
 #include <malloc.h>
 #include "src/lib/lib_head.h"
-#include "src/lib/16_in.h"
+//++++mh       #include "src/lib/16_in.h"
 
-#if 1          // 1 == Debug/Dev  ;  0 == Production/final
+//****#if 1            // 1 == Debug/Dev  ;  0 == Production/final
 #define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%ld bytes"
-#else
-#define OUT_OF_MEM_MSG "\npee\n"
-#endif
+//****#else
+//****#define OUT_OF_MEM_MSG   "\npee\n"
+//****#endif
 
 
 #define SAVENEARHEAP   0x400           // space to leave in data segment
@@ -130,6 +130,8 @@ void                MML_ShutdownXMS (void);
 void           MML_UseSpace (unsigned segstart, unsigned seglength);
 void           MML_ClearBlock (void);
 
+int US_CheckParm(char *parm,char **strings);
+
 //==========================================================================
 
 #endif
diff --git a/src/lib/16_us.h b/src/lib/16_us.h
deleted file mode 100644 (file)
index 8bcfa00..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Catacomb Armageddon Source Code\r
- * Copyright (C) 1993-2014 Flat Rock Software\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License along\r
- * with this program; if not, write to the Free Software Foundation, Inc.,\r
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
- */\r
-\r
-//\r
-//     ID Engine\r
-//     ID_US.h - Header file for the User Manager\r
-//     v1.0d1\r
-//     By Jason Blochowiak\r
-//\r
-#ifndef        __ID_US__\r
-#define        __ID_US__
-
-#include "lib_head.h"\r
-\r
-#ifdef __DEBUG__\r
-#define        __DEBUG_UserMgr__\r
-#endif\r
-\r
-extern int             US_CheckParm(char *parm,char **strings);\r
-
-#endif\r