Compare commits
70 Commits
amxmodx-1.
...
amxmodx-1.
Author | SHA1 | Date | |
---|---|---|---|
3db718799f | |||
146d77f819 | |||
06a9241bcf | |||
ce4b23b41a | |||
3184d1466e | |||
8793d8f8d5 | |||
a26a98cb98 | |||
5e69db511c | |||
468aaba79e | |||
a3aa086375 | |||
82ad133d91 | |||
250cb89479 | |||
121dc75451 | |||
69c06545ce | |||
9e5b5683af | |||
f01357aa7a | |||
7f13ae3e4f | |||
e5b990b8e0 | |||
99411af951 | |||
b318509687 | |||
37f7975416 | |||
40c1fee55a | |||
b0fe6c83e2 | |||
59fc122986 | |||
3ec6bbc2ce | |||
a431cb420b | |||
5a6c4ea408 | |||
7d9376a64b | |||
6e4f09366e | |||
6c22cb171d | |||
77e900585a | |||
86bfeec554 | |||
45343e6e27 | |||
944f608f09 | |||
ad960a64e2 | |||
e2a687d96d | |||
53e43b8f31 | |||
da2eb8ea66 | |||
088f109a64 | |||
9d65198786 | |||
49e3b748c3 | |||
5324c7c620 | |||
26d2a4f877 | |||
76d407b45a | |||
e783c4bfcb | |||
afc663a51a | |||
cb500636cc | |||
e6f4dfbfe2 | |||
1bfdda7e71 | |||
330fd1c2ae | |||
56b676eafb | |||
73e3e52057 | |||
56b53584d1 | |||
f43fcd6670 | |||
5984f0d442 | |||
1b75b0ba92 | |||
52f5723f4e | |||
eb6ab857fc | |||
24bfff9cf1 | |||
1d3f91be43 | |||
824d9953d9 | |||
b706108ed6 | |||
adab9c93a0 | |||
0f8c61c1e1 | |||
0b4f28fecf | |||
d97ab913cf | |||
2249f1e70c | |||
0f4ee9d91d | |||
5cc5ea4006 | |||
2145823971 |
24
.hgignore
Normal file
24
.hgignore
Normal file
@ -0,0 +1,24 @@
|
||||
# Binaries
|
||||
\.dll$
|
||||
\.exe$
|
||||
\.so$
|
||||
|
||||
# Files generated by Visual Studio
|
||||
\.aps$
|
||||
\.ncb$
|
||||
\.sdf$
|
||||
\.suo$
|
||||
\.user$
|
||||
|
||||
# Build directories
|
||||
/Debug.*
|
||||
/Release.*
|
||||
/JITDebug.*
|
||||
/JITRelease.*
|
||||
|
||||
# Files generated by Mac OS X Finder
|
||||
(^|/)\.DS_Store$
|
||||
|
||||
# Files generated by Windows Explorer
|
||||
(^|/)Desktop\.ini$
|
||||
(^|/)Thumbs\.db$
|
@ -153,7 +153,7 @@ void CmdMngr::setCmdLink(CmdLink** a, Command* c, bool sorted)
|
||||
{
|
||||
int i = strcmp(c->getCommand(), (*a)->cmd->getCommand());
|
||||
|
||||
if ((i < 0) || (i == 0) && (strcmp(c->getArgument(), (*a)->cmd->getArgument()) < 0))
|
||||
if ((i < 0) || ((i == 0) && (strcmp(c->getArgument(), (*a)->cmd->getArgument()) < 0)))
|
||||
break;
|
||||
|
||||
a = &(*a)->next;
|
||||
|
@ -144,7 +144,6 @@ public:
|
||||
class CSPForward
|
||||
{
|
||||
friend class CForwardMngr;
|
||||
const char *m_FuncName;
|
||||
int m_NumParams;
|
||||
|
||||
ForwardParam m_ParamTypes[FORWARD_MAX_PARAMS];
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "format.h"
|
||||
#include "amxmod_compat.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#define _snprintf snprintf
|
||||
#endif
|
||||
|
||||
@ -108,7 +108,7 @@ size_t CLangMngr::strip(char *str, char *newstr, bool makelower)
|
||||
int flag = 0;
|
||||
size_t strln = strlen(str);
|
||||
|
||||
for (i = strln - 1; i >= 0; i--)
|
||||
for (i = strln - 1; i < strln; i--)
|
||||
{
|
||||
if (str[i] == '\n' || str[i] == ' ' || str[i] == '\t')
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ void LogEventsMngr::CLogEvent::registerFilter(char* filter)
|
||||
filters = new LogCond(cmp->pos, aa, filters);
|
||||
}
|
||||
|
||||
void LogEventsMngr::setLogString(char* frmt, va_list& vaptr)
|
||||
void LogEventsMngr::setLogString(const char* frmt, va_list& vaptr)
|
||||
{
|
||||
++logCounter;
|
||||
int len = vsnprintf(logString, 255, frmt, vaptr);
|
||||
@ -128,7 +128,7 @@ void LogEventsMngr::setLogString(char* frmt, va_list& vaptr)
|
||||
logArgc = 0;
|
||||
}
|
||||
|
||||
void LogEventsMngr::setLogString(char* frmt, ...)
|
||||
void LogEventsMngr::setLogString(const char* frmt, ...)
|
||||
{
|
||||
++logCounter;
|
||||
va_list logArgPtr;
|
||||
|
@ -141,8 +141,8 @@ public:
|
||||
CLogEvent* registerLogEvent(CPluginMngr::CPlugin* plugin, int func, int pos);
|
||||
inline bool logEventsExist() { return arelogevents; }
|
||||
|
||||
void setLogString(char* frmt, va_list& vaptr);
|
||||
void setLogString(char* frmt, ...);
|
||||
void setLogString(const char* frmt, va_list& vaptr);
|
||||
void setLogString(const char* frmt, ...);
|
||||
void parseLogString();
|
||||
void executeLogEvents();
|
||||
|
||||
|
@ -342,7 +342,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
m_AuthData[sizeof(m_AuthData)-1]=0;
|
||||
m_AuthData[arraysize(m_AuthData)-1]=0;
|
||||
|
||||
};
|
||||
const cell *GetAuthID(void) const
|
||||
@ -361,7 +361,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
m_Password[sizeof(m_Password)-1]=0;
|
||||
m_Password[arraysize(m_Password)-1]=0;
|
||||
|
||||
};
|
||||
const cell *GetPass(void) const
|
||||
|
@ -220,7 +220,7 @@ bool CModule::queryModule()
|
||||
m_Handle = DLLOAD(m_Filename.c_str()); // load file
|
||||
if (!m_Handle)
|
||||
{
|
||||
#if defined __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
AMXXLOG_Log("[AMXX] Module \"%s\" failed to load (%s)", m_Filename.c_str(), dlerror());
|
||||
#endif
|
||||
m_Status = MODULE_BADLOAD;
|
||||
|
@ -244,7 +244,7 @@ public:
|
||||
|
||||
if (is_space(v[len-1]))
|
||||
{
|
||||
for (i=len-1; i>=0; i--)
|
||||
for (i=len-1; i<len; i--)
|
||||
{
|
||||
if (!is_space(v[i])
|
||||
|| (is_space(v[i]) && i==0))
|
||||
|
BIN
amxmodx/JIT/amxexecn-darwin.o
Normal file
BIN
amxmodx/JIT/amxexecn-darwin.o
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
amxmodx/JIT/amxjitsn-darwin.o
Normal file
BIN
amxmodx/JIT/amxjitsn-darwin.o
Normal file
Binary file not shown.
Binary file not shown.
BIN
amxmodx/JIT/helpers-darwin-x86.o
Normal file
BIN
amxmodx/JIT/helpers-darwin-x86.o
Normal file
Binary file not shown.
Binary file not shown.
BIN
amxmodx/JIT/natives-darwin-x86.o
Normal file
BIN
amxmodx/JIT/natives-darwin-x86.o
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
161
amxmodx/Makefile
161
amxmodx/Makefile
@ -1,18 +1,18 @@
|
||||
#(C)2004-2005 AMX Mod X Development Team
|
||||
# (C)2004-2013 AMX Mod X Development Team
|
||||
# Makefile written by David "BAILOPAN" Anderson
|
||||
|
||||
HLSDK = ../../hlsdk
|
||||
###########################################
|
||||
### EDIT THESE PATHS FOR YOUR OWN SETUP ###
|
||||
###########################################
|
||||
|
||||
HLSDK = ../../hlsdk/multiplayer
|
||||
MM_ROOT = ../../metamod/metamod
|
||||
|
||||
#####################################
|
||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||
#####################################
|
||||
|
||||
OPT_FLAGS = -O2 -fno-strict-aliasing -funroll-loops -s -fomit-frame-pointer -pipe -DNDEBUG
|
||||
DEBUG_FLAGS = -g -ggdb3
|
||||
CPP = gcc-4.1
|
||||
NAME = amxmodx
|
||||
|
||||
BIN_SUFFIX_32 = mm_i386.so
|
||||
BIN_SUFFIX_64 = mm_amd64.so
|
||||
PROJECT = amxmodx
|
||||
|
||||
OBJECTS = meta_api.cpp CFile.cpp CVault.cpp vault.cpp float.cpp file.cpp modules.cpp \
|
||||
CMisc.cpp CTask.cpp string.cpp amxmodx.cpp CEvent.cpp CCmd.cpp CLogEvent.cpp \
|
||||
@ -23,98 +23,125 @@ OBJECTS = meta_api.cpp CFile.cpp CVault.cpp vault.cpp float.cpp file.cpp modules
|
||||
amxmod_compat.cpp nongpl_matches.cpp CFlagManager.cpp datastructs.cpp \
|
||||
trie_natives.cpp
|
||||
|
||||
LINK = -lgcc -static-libgcc
|
||||
##############################################
|
||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||
##############################################
|
||||
|
||||
INCLUDE = -I. -I$(HLSDK) -I$(HLSDK)/dlls -I$(HLSDK)/engine -I$(HLSDK)/game_shared -I$(HLSDK)/game_shared \
|
||||
-I$(MM_ROOT) -Lzlib -I$(HLSDK)/common
|
||||
C_OPT_FLAGS = -DNDEBUG -O2 -funroll-loops -fomit-frame-pointer -pipe
|
||||
C_DEBUG_FLAGS = -D_DEBUG -DDEBUG -g -ggdb3
|
||||
C_GCC4_FLAGS = -fvisibility=hidden
|
||||
CPP_GCC4_FLAGS = -fvisibility-inlines-hidden
|
||||
CPP = gcc
|
||||
CPP_OSX = clang
|
||||
|
||||
GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
||||
LINK = -Lzlib
|
||||
|
||||
ifeq "$(GCC_VERSION)" "4"
|
||||
OPT_FLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
INCLUDE = -I. -I$(HLSDK) -I$(HLSDK)/common -I$(HLSDK)/dlls -I$(HLSDK)/engine -I$(HLSDK)/game_shared \
|
||||
-I$(MM_ROOT)
|
||||
|
||||
################################################
|
||||
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
||||
################################################
|
||||
|
||||
OS := $(shell uname -s)
|
||||
|
||||
ifeq "$(OS)" "Darwin"
|
||||
OBJECTS += JIT/amxexecn-darwin.o JIT/amxjitsn-darwin.o JIT/natives-darwin-x86.o \
|
||||
JIT/helpers-darwin-x86.o
|
||||
|
||||
CPP = $(CPP_OSX)
|
||||
LIB_EXT = dylib
|
||||
LIB_SUFFIX = _mm
|
||||
CFLAGS += -DOSX
|
||||
LINK += -dynamiclib -lstdc++ -mmacosx-version-min=10.5 -Wl,-read_only_relocs,suppress -lz-darwin
|
||||
else
|
||||
OBJECTS += JIT/amxexecn.o JIT/amxjitsn.o JIT/natives-x86.o JIT/helpers-x86.o
|
||||
|
||||
LIB_EXT = so
|
||||
LIB_SUFFIX = _mm_i386
|
||||
CFLAGS += -DLINUX
|
||||
LINK += -shared -lz
|
||||
endif
|
||||
|
||||
LINK += -m32 -lm -ldl
|
||||
|
||||
CFLAGS += -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DJIT -DASM32 -DHAVE_STDINT_H -fno-strict-aliasing \
|
||||
-m32 -Wall -Werror
|
||||
CPPFLAGS += -fno-exceptions -fno-rtti
|
||||
|
||||
BINARY = $(PROJECT)$(LIB_SUFFIX).$(LIB_EXT)
|
||||
|
||||
ifeq "$(DEBUG)" "true"
|
||||
BIN_DIR = Debug
|
||||
CFLAGS = $(DEBUG_FLAGS)
|
||||
CFLAGS += $(C_DEBUG_FLAGS)
|
||||
else
|
||||
BIN_DIR = Release
|
||||
CFLAGS = $(OPT_FLAGS)
|
||||
CFLAGS += $(C_OPT_FLAGS)
|
||||
LINK += -s
|
||||
endif
|
||||
|
||||
ifeq "$(BINLOG)" "true"
|
||||
NAME := $(NAME)_bl
|
||||
LIB_SUFFIX := _bl$(LIB_SUFFIX)
|
||||
BIN_DIR := $(BIN_DIR)BinLog
|
||||
OBJECTS += binlog.cpp
|
||||
CFLAGS += -DBINLOG_ENABLED
|
||||
endif
|
||||
|
||||
CFLAGS += -DLINUX -DAMX_NOPROPLIST -Wall -Werror -DHAVE_STDINT_H -static-libgcc -fno-rtti -fno-exceptions
|
||||
IS_CLANG := $(shell $(CPP) --version | head -1 | grep clang > /dev/null && echo "1" || echo "0")
|
||||
|
||||
ifeq "$(AMD64)" "true"
|
||||
BINARY = $(NAME)_$(BIN_SUFFIX_64)
|
||||
CFLAGS += -DPAWN_CELL_SIZE=64 -DHAVE_I64 -DAMD64 -m64
|
||||
LINK += -lz64
|
||||
OBJECTS += JIT/natives-amd64.o
|
||||
ifeq "$(IS_CLANG)" "1"
|
||||
CPP_MAJOR := $(shell $(CPP) --version | grep clang | sed "s/.*version \([0-9]\)*\.[0-9]*.*/\1/")
|
||||
CPP_MINOR := $(shell $(CPP) --version | grep clang | sed "s/.*version [0-9]*\.\([0-9]\)*.*/\1/")
|
||||
else
|
||||
BINARY = $(NAME)_$(BIN_SUFFIX_32)
|
||||
OBJECTS += JIT/amxexecn.o JIT/amxjitsn.o JIT/natives-x86.o
|
||||
OBJECTS += JIT/helpers-x86.o
|
||||
CFLAGS += -DPAWN_CELL_SIZE=32 -DJIT -DASM32
|
||||
LINK += -lz
|
||||
OPT_FLAGS += -march=i586
|
||||
CFLAGS += -m32
|
||||
CPP_MAJOR := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
||||
CPP_MINOR := $(shell $(CPP) -dumpversion >&1 | cut -b3)
|
||||
endif
|
||||
|
||||
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||
# Clang || GCC >= 4
|
||||
ifeq "$(shell expr $(IS_CLANG) \| $(CPP_MAJOR) \>= 4)" "1"
|
||||
CFLAGS += $(C_GCC4_FLAGS)
|
||||
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
||||
endif
|
||||
|
||||
# Clang >= 3 || GCC >= 4.7
|
||||
ifeq "$(shell expr $(IS_CLANG) \& $(CPP_MAJOR) \>= 3 \| $(CPP_MAJOR) \>= 4 \& $(CPP_MINOR) \>= 7)" "1"
|
||||
CFLAGS += -Wno-delete-non-virtual-dtor
|
||||
endif
|
||||
|
||||
# OS is Linux and not using clang
|
||||
ifeq "$(shell expr $(OS) \= Linux \& $(IS_CLANG) \= 0)" "1"
|
||||
LINK += -static-libgcc
|
||||
endif
|
||||
|
||||
OBJ_BIN := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||
|
||||
# This will break if we include other Makefiles, but is fine for now. It allows
|
||||
# us to make a copy of this file that uses altered paths (ie. Makefile.mine)
|
||||
# or other changes without mucking up the original.
|
||||
MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
|
||||
$(BIN_DIR)/%.o: %.cpp
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
all:
|
||||
mkdir -p $(BIN_DIR)
|
||||
$(MAKE) amxmodx
|
||||
|
||||
amd64:
|
||||
rm -f zlib/libz.a
|
||||
$(MAKE) all AMD64=true
|
||||
|
||||
amd64_debug:
|
||||
rm -f zlib/libz.a
|
||||
$(MAKE) all AMD64=true DEBUG=true
|
||||
|
||||
amd64_binlog:
|
||||
rm -f zlib/libz.a
|
||||
$(MAKE) all AMD64=true BINLOG=true
|
||||
|
||||
amd64_binlog_debug:
|
||||
rm -f zlib/libz.a
|
||||
$(MAKE) all AMD64=true BINLOG=true DEBUG=true
|
||||
$(MAKE) -f $(MAKEFILE_NAME) $(PROJECT)
|
||||
|
||||
binlog:
|
||||
$(MAKE) all BINLOG=true
|
||||
$(MAKE) -f $(MAKEFILE_NAME) all BINLOG=true
|
||||
|
||||
binlog_debug:
|
||||
$(MAKE) all BINLOG=true DEBUG=true
|
||||
$(MAKE) -f $(MAKEFILE_NAME) all BINLOG=true DEBUG=true
|
||||
|
||||
amxmodx: $(OBJ_LINUX)
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
||||
$(PROJECT): $(OBJ_BIN)
|
||||
$(CPP) $(INCLUDE) $(OBJ_BIN) $(LINK) -o $(BIN_DIR)/$(BINARY)
|
||||
|
||||
debug:
|
||||
$(MAKE) all DEBUG=true
|
||||
$(MAKE) -f $(MAKEFILE_NAME) all DEBUG=true
|
||||
|
||||
default: all
|
||||
|
||||
clean:
|
||||
rm -rf Release/*.o
|
||||
rm -rf Release/$(NAME)_$(BIN_SUFFIX_32)
|
||||
rm -rf Release/$(NAME)_$(BIN_SUFFIX_64)
|
||||
rm -rf ReleaseBinLog/*.o
|
||||
rm -rf ReleaseBinLog/$(NAME)_bl_$(BIN_SUFFIX_32)
|
||||
rm -rf ReleaseBinLog/$(NAME)_bl_$(BIN_SUFFIX_64)
|
||||
rm -rf Debug/*.o
|
||||
rm -rf Debug/$(NAME)_$(BIN_SUFFIX_32)
|
||||
rm -rf Debug/$(NAME)_$(BIN_SUFFIX_64)
|
||||
rm -rf DebugBinLog/*.o
|
||||
rm -rf DebugBinLog/$(NAME)_bl_$(BIN_SUFFIX_32)
|
||||
rm -rf DebugBinLog/$(NAME)_bl_$(BIN_SUFFIX_64)
|
||||
rm -rf $(BIN_DIR)/*.o
|
||||
rm -f $(BIN_DIR)/$(BINARY)
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amx.cpp 3707 2008-04-14 19:56:31Z sawce $
|
||||
*/
|
||||
|
||||
#define AMX_NODYNALOAD
|
||||
@ -48,7 +48,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "osdefs.h"
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#include <sclinux.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
@ -436,7 +436,7 @@ int AMXAPI amx_Callback(AMX *amx, cell index, cell *result, cell *params)
|
||||
hdr=(AMX_HEADER *)amx->base;
|
||||
assert(hdr->natives<=hdr->libraries);
|
||||
#if defined AMX_NATIVETABLE
|
||||
if (index<NULL) {
|
||||
if (index<0) {
|
||||
assert(-(index+1)<(sizeof(AMX_NATIVETABLE)/sizeof(AMX_NATIVETABLE)[0]));
|
||||
f=(AMX_NATIVETABLE)[-(index+1)];
|
||||
} else {
|
||||
@ -932,7 +932,7 @@ int AMXAPI amx_Init(AMX *amx, void *program)
|
||||
|
||||
#define ALIGN(addr) (addr)
|
||||
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
|
||||
/* Linux already has mprotect() */
|
||||
/* But wants the address aligned! */
|
||||
@ -1014,10 +1014,10 @@ int AMXAPI amx_InitJIT(AMX *amx,void *compiled_program,void *reloc_table)
|
||||
#if defined AMX_CLEANUP
|
||||
int AMXAPI amx_Cleanup(AMX *amx)
|
||||
{
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__) && !defined AMX_NODYNALOAD
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__) && !defined AMX_NODYNALOAD
|
||||
#if defined _Windows
|
||||
typedef int (FAR WINAPI *AMX_ENTRY)(AMX FAR *amx);
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
typedef int (*AMX_ENTRY)(AMX *amx);
|
||||
#endif
|
||||
AMX_HEADER *hdr;
|
||||
@ -1027,7 +1027,7 @@ int AMXAPI amx_Cleanup(AMX *amx)
|
||||
#endif
|
||||
|
||||
/* unload all extension modules */
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__) && !defined AMX_NODYNALOAD
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__) && !defined AMX_NODYNALOAD
|
||||
hdr=(AMX_HEADER *)amx->base;
|
||||
assert(hdr->magic==AMX_MAGIC);
|
||||
numlibraries=NUMENTRIES(hdr,libraries,pubvars);
|
||||
@ -1040,14 +1040,14 @@ int AMXAPI amx_Cleanup(AMX *amx)
|
||||
strcat(funcname,"Cleanup");
|
||||
#if defined _Windows
|
||||
libcleanup=(AMX_ENTRY)GetProcAddress((HINSTANCE)lib->address,funcname);
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
libcleanup=(AMX_ENTRY)dlsym((void*)lib->address,funcname);
|
||||
#endif
|
||||
if (libcleanup!=NULL)
|
||||
libcleanup(amx);
|
||||
#if defined _Windows
|
||||
FreeLibrary((HINSTANCE)lib->address);
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
dlclose((void*)lib->address);
|
||||
#endif
|
||||
} /* if */
|
||||
@ -3695,7 +3695,7 @@ int AMXAPI amx_GetAddr(AMX *amx,cell amx_addr,cell **phys_addr)
|
||||
data=(amx->data!=NULL) ? amx->data : amx->base+(int)hdr->dat;
|
||||
|
||||
assert(phys_addr!=NULL);
|
||||
if (amx_addr>=amx->hea && amx_addr<amx->stk || amx_addr<0 || amx_addr>=amx->stp) {
|
||||
if ((amx_addr>=amx->hea && amx_addr<amx->stk) || amx_addr<0 || amx_addr>=amx->stp) {
|
||||
*phys_addr=NULL;
|
||||
return AMX_ERR_MEMACCESS;
|
||||
} /* if */
|
||||
@ -4094,7 +4094,7 @@ int AMXAPI amx_GetLibraries(AMX *amx)
|
||||
return numLibraries;
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#define _snprintf snprintf
|
||||
#endif
|
||||
|
||||
|
@ -18,13 +18,13 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amx.h 3006 2006-08-28 11:08:18Z dvander $
|
||||
*/
|
||||
|
||||
#if defined FREEBSD && !defined __FreeBSD__
|
||||
#define __FreeBSD__
|
||||
#endif
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#include <sclinux.h>
|
||||
#endif
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#if defined __LCC__ || defined __DMC__ || defined LINUX
|
||||
#if defined __LCC__ || defined __DMC__ || defined LINUX || defined __APPLE__
|
||||
#if defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
@ -190,7 +190,7 @@ typedef int (AMXAPI *AMX_NATIVE_FILTER)(struct tagAMX *amx, int index);
|
||||
#endif
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
@ -442,7 +442,7 @@ int AMXAPI amx_GetStringOld(char *dest,const cell *source,int use_wchar);
|
||||
amx_Register((amx), amx_NativeInfo((name),(func)), 1);
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack() /* reset default packing */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=reset
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amxcore.cpp 1733 2005-07-25 06:03:43Z dvander $
|
||||
*/
|
||||
#if defined _UNICODE || defined __UNICODE__ || defined UNICODE
|
||||
# if !defined UNICODE /* for Windows */
|
||||
@ -180,7 +180,7 @@ static cell AMX_NATIVE_CALL setarg(AMX *amx, cell *params)
|
||||
/* adjust the address in "value" in case of an array access */
|
||||
value+=params[2]*sizeof(cell);
|
||||
/* verify the address */
|
||||
if (value<0 || value>=amx->hea && value<amx->stk)
|
||||
if (value<0 || (value>=amx->hea && value<amx->stk))
|
||||
return 0;
|
||||
/* set the value indirectly */
|
||||
* (cell *)(data+(int)value) = params[3];
|
||||
|
@ -20,7 +20,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amxdbg.cpp 2345 2006-02-10 19:47:09Z faluco $
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
@ -462,8 +462,8 @@ int AMXAPI dbg_GetVariable(AMX_DBG *amxdbg, const char *symname, ucell scopeaddr
|
||||
break;
|
||||
/* check the range, keep a pointer to the symbol with the smallest range */
|
||||
if (strcmp(amxdbg->symboltbl[index]->name, symname) == 0
|
||||
&& (codestart == 0 && codeend == 0
|
||||
|| amxdbg->symboltbl[index]->codestart >= codestart && amxdbg->symboltbl[index]->codeend <= codeend))
|
||||
&& ((codestart == 0 && codeend == 0)
|
||||
|| (amxdbg->symboltbl[index]->codestart >= codestart && amxdbg->symboltbl[index]->codeend <= codeend)))
|
||||
{
|
||||
*sym = amxdbg->symboltbl[index];
|
||||
codestart = amxdbg->symboltbl[index]->codestart;
|
||||
|
@ -21,7 +21,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amxdbg.h 2977 2006-08-27 02:17:18Z damagedsoul $
|
||||
*/
|
||||
|
||||
#ifndef AMXDBG_H_INCLUDED
|
||||
@ -49,7 +49,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
@ -156,7 +156,7 @@ int AMXAPI dbg_GetArrayDim(AMX_DBG *amxdbg, const AMX_DBG_SYMBOL *sym, const AMX
|
||||
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack() /* reset default packing */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=reset
|
||||
|
@ -303,14 +303,6 @@
|
||||
%endif
|
||||
%endmacro
|
||||
|
||||
|
||||
%ifdef WIN32
|
||||
section .data exec
|
||||
%else
|
||||
section .text
|
||||
%endif
|
||||
|
||||
|
||||
global asm_runJIT, _asm_runJIT
|
||||
global amx_exec_jit, _amx_exec_jit
|
||||
global getMaxCodeSize, _getMaxCodeSize
|
||||
@ -436,15 +428,6 @@ reloc_done:
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
; GWMV:
|
||||
; The code below modifies itself to store the arguments to the Pawn opcodes
|
||||
; in the compiled code. This is fine, but the .text section in an ELF executable
|
||||
; is usually marked read-only, that's why this code is in the .data section.
|
||||
|
||||
%ifndef WIN32
|
||||
section .data exec
|
||||
%endif
|
||||
|
||||
OP_LOAD_PRI:
|
||||
;nop;
|
||||
putval j_load_pri+2
|
||||
@ -1052,7 +1035,7 @@ OP_CALL:
|
||||
j_call:
|
||||
;call 12345678h ; tasm chokes on this out of a sudden
|
||||
_PUSH 0
|
||||
j_call_e8
|
||||
j_call_e8:
|
||||
db 0e8h, 0, 0, 0, 0
|
||||
CHECKCODESIZE j_call
|
||||
|
||||
@ -2591,4 +2574,4 @@ _amx_opcodelist_jit:
|
||||
DD OP_FLOAT_ROUND ; DA
|
||||
DD OP_FLOAT_CMP ; DA
|
||||
|
||||
END
|
||||
END:
|
||||
|
@ -146,7 +146,7 @@ static cell AMX_NATIVE_CALL server_print(AMX *amx, cell *params) /* 1 param */
|
||||
|
||||
static cell AMX_NATIVE_CALL engclient_print(AMX *amx, cell *params) /* 3 param */
|
||||
{
|
||||
int len;
|
||||
int len = 0;
|
||||
char *msg;
|
||||
|
||||
if (params[1] == 0)
|
||||
@ -481,7 +481,7 @@ static cell AMX_NATIVE_CALL is_dedicated_server(AMX *amx, cell *params)
|
||||
|
||||
static cell AMX_NATIVE_CALL is_linux_server(AMX *amx, cell *params)
|
||||
{
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
return 1;
|
||||
#else
|
||||
return 0;
|
||||
@ -1005,7 +1005,7 @@ static cell AMX_NATIVE_CALL get_user_team(AMX *amx, cell *params) /* 3 param */
|
||||
|
||||
if (params[3])
|
||||
{
|
||||
char *szTeam = "";
|
||||
const char *szTeam = "";
|
||||
|
||||
switch (iTeam)
|
||||
{
|
||||
@ -3843,7 +3843,7 @@ static cell AMX_NATIVE_CALL amx_mkdir(AMX *amx, cell *params)
|
||||
char *path = get_amxstring(amx, params[1], 0, len);
|
||||
char *realpath = build_pathname("%s", path);
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
return mkdir(realpath, 0700);
|
||||
#else
|
||||
return mkdir(realpath);
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef AMXMODX_H
|
||||
#define AMXMODX_H
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "sclinux.h"
|
||||
@ -86,7 +86,7 @@ extern AMX_NATIVE_INFO vector_Natives[];
|
||||
extern AMX_NATIVE_INFO g_SortNatives[];
|
||||
extern AMX_NATIVE_INFO g_DataStructNatives[];
|
||||
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32)
|
||||
#define DLLOAD(path) (DLHANDLE)LoadLibrary(path)
|
||||
#define DLPROC(m, func) GetProcAddress(m, func)
|
||||
#define DLFREE(m) FreeLibrary(m)
|
||||
@ -107,14 +107,14 @@ extern AMX_NATIVE_INFO g_DataStructNatives[];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32)
|
||||
typedef HINSTANCE DLHANDLE;
|
||||
#else
|
||||
typedef void* DLHANDLE;
|
||||
#define INFINITE 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32)
|
||||
#define PATH_SEP_CHAR '\\'
|
||||
#define ALT_SEP_CHAR '/'
|
||||
#else
|
||||
@ -139,7 +139,7 @@ int UTIL_ReadFlags(const char* c);
|
||||
void UTIL_ClientPrint(edict_t *pEntity, int msg_dest, char *msg);
|
||||
void UTIL_FakeClientCommand(edict_t *pEdict, const char *cmd, const char *arg1 = NULL, const char *arg2 = NULL);
|
||||
void UTIL_GetFlags(char* flags, int flag);
|
||||
void UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, char *pMessage);
|
||||
void UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, const char *pMessage);
|
||||
void UTIL_IntToString(int value, char *output);
|
||||
void UTIL_ShowMOTD(edict_t *client, char *motd, int mlen, const char *name);
|
||||
void UTIL_ShowMenu(edict_t* pEntity, int slots, int time, char *menu, int mlen);
|
||||
@ -276,8 +276,8 @@ void modules_callPluginsUnloaded();
|
||||
void modules_callPluginsUnloading();
|
||||
|
||||
cell* get_amxaddr(AMX *amx, cell amx_addr);
|
||||
char* build_pathname(char *fmt, ...);
|
||||
char* build_pathname_r(char *buffer, size_t maxlen, char *fmt, ...);
|
||||
char* build_pathname(const char *fmt, ...);
|
||||
char* build_pathname_r(char *buffer, size_t maxlen, const char *fmt, ...);
|
||||
char* format_amxstring(AMX *amx, cell *params, int parm, int& len);
|
||||
AMX* get_amxscript(int, void**, const char**);
|
||||
const char* get_amxscriptname(AMX* amx);
|
||||
@ -292,8 +292,8 @@ int unload_amxscript(AMX* amx, void** program);
|
||||
|
||||
void copy_amxmemory(cell* dest, cell* src, int len);
|
||||
void get_modname(char*);
|
||||
void print_srvconsole(char *fmt, ...);
|
||||
void report_error(int code, char* fmt, ...);
|
||||
void print_srvconsole(const char *fmt, ...);
|
||||
void report_error(int code, const char* fmt, ...);
|
||||
void* alloc_amxmemory(void**, int size);
|
||||
void free_amxmemory(void **ptr);
|
||||
// get_localinfo
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) ITB CompuPhase, 2001-2002
|
||||
* This file may be freely used. No warranties of any kind.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amxtime.cpp 2511 2006-04-06 12:56:45Z damagedsoul $
|
||||
*/
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
@ -42,7 +42,7 @@
|
||||
#define PACKED
|
||||
#endif
|
||||
|
||||
#if defined __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
#else
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
@ -127,7 +127,7 @@ CAmxxReader::CAmxxReader(const char *filename, int cellsize)
|
||||
|
||||
for (mint8_t i = 0; i < m_Bh.numPlugins; i++)
|
||||
{
|
||||
pe = &(m_Bh.plugins[i]);
|
||||
pe = &(m_Bh.plugins[(unsigned)i]);
|
||||
DATAREAD(&pe->cellsize, sizeof(mint8_t), 1);
|
||||
DATAREAD(&pe->disksize, sizeof(int32_t), 1);
|
||||
DATAREAD(&pe->imagesize, sizeof(int32_t), 1);
|
||||
@ -137,7 +137,7 @@ CAmxxReader::CAmxxReader(const char *filename, int cellsize)
|
||||
|
||||
for (mint8_t i = 0; i < m_Bh.numPlugins; i++)
|
||||
{
|
||||
pe = &(m_Bh.plugins[i]);
|
||||
pe = &(m_Bh.plugins[(unsigned)i]);
|
||||
|
||||
if (pe->cellsize == m_CellSize)
|
||||
{
|
||||
|
@ -35,12 +35,12 @@
|
||||
// 3 = HL Logs
|
||||
|
||||
#include <time.h>
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32)
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include "amxmodx.h"
|
||||
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32WIN32)
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
@ -137,7 +137,7 @@ void CLog::MapChange()
|
||||
{
|
||||
// create dir if not existing
|
||||
char file[256];
|
||||
#ifdef __linux
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
mkdir(build_pathname_r(file, sizeof(file)-1, "%s", g_log_dir.c_str()), 0700);
|
||||
#else
|
||||
mkdir(build_pathname_r(file, sizeof(file)-1, "%s", g_log_dir.c_str()));
|
||||
|
@ -46,7 +46,7 @@ bool BinLog::Open()
|
||||
if (!DirExists(path))
|
||||
{
|
||||
mkdir(path
|
||||
#if defined __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
, 0755
|
||||
#endif
|
||||
);
|
||||
|
@ -215,8 +215,7 @@ public:
|
||||
int ShiftUpFrom(size_t which)
|
||||
{
|
||||
// No point shifting this.
|
||||
if (this->count < 0 ||
|
||||
which > this->count)
|
||||
if (which > this->count)
|
||||
{
|
||||
|
||||
return 0;
|
||||
@ -254,8 +253,7 @@ public:
|
||||
int Delete(size_t which)
|
||||
{
|
||||
// No point shifting this.
|
||||
if (this->count < 0 ||
|
||||
which >= this->count)
|
||||
if (which >= this->count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -614,9 +614,9 @@ void Debugger::FmtGenericMsg(AMX *amx, int error, char buffer[], size_t maxLengt
|
||||
if (a)
|
||||
filename = (*a).getName();
|
||||
size_t len = strlen(filename);
|
||||
for (size_t i=len-1; i>=0; i--)
|
||||
for (size_t i=len-1; i<len; i--)
|
||||
{
|
||||
if (filename[i] == '/' || filename[i] == '\\' && i != len - 1)
|
||||
if ((filename[i] == '/' || filename[i] == '\\') && i != len - 1)
|
||||
{
|
||||
filename = &(filename[i+1]);
|
||||
break;
|
||||
|
@ -109,6 +109,7 @@ void Client_TeamInfo(void* mValue)
|
||||
char* msg = (char*)mValue;
|
||||
g_players[index].team.assign(msg);
|
||||
g_teamsIds.registerTeam(msg, -1);
|
||||
g_players[index].teamId = g_teamsIds.findTeamId(msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
// header file for unlink()
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define WINDOWS_LEAN_AND_MEAN
|
||||
@ -784,7 +784,7 @@ static cell AMX_NATIVE_CALL amx_ungetc(AMX *amx, cell *params)
|
||||
return ungetc(static_cast<int>(params[2]), fp);
|
||||
}
|
||||
|
||||
#if defined __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#define _rmdir rmdir
|
||||
#endif
|
||||
|
||||
@ -817,7 +817,7 @@ static cell AMX_NATIVE_CALL amx_rename(AMX *amx, cell *params)
|
||||
snprintf(f_new_r, sizeof(f_new_r)-1, "%s", fnew);
|
||||
}
|
||||
|
||||
#if defined __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
return (rename(f_old_r, f_new_r) == 0);
|
||||
#elif defined WIN32
|
||||
return MoveFileA(f_old_r, f_new_r);
|
||||
@ -855,6 +855,13 @@ static cell LoadFileForMe(AMX *amx, cell *params)
|
||||
return count;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL amx_fflush(AMX *amx, cell *params)
|
||||
{
|
||||
FILE *fp = (FILE *)params[1];
|
||||
|
||||
return fflush(fp);
|
||||
}
|
||||
|
||||
AMX_NATIVE_INFO file_Natives[] =
|
||||
{
|
||||
{"delete_file", delete_file},
|
||||
@ -891,5 +898,6 @@ AMX_NATIVE_INFO file_Natives[] =
|
||||
{"fputs", amx_fputs},
|
||||
{"rename_file", amx_rename},
|
||||
{"LoadFileForMe", LoadFileForMe},
|
||||
{"fflush", amx_fflush},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
@ -29,6 +29,11 @@
|
||||
return 0; \
|
||||
}
|
||||
|
||||
template size_t atcprintf<cell, cell>(cell *, size_t, const cell *, AMX *, cell *, int *);
|
||||
template size_t atcprintf<char, cell>(char *, size_t, const cell *, AMX *, cell *, int *);
|
||||
template size_t atcprintf<cell, char>(cell *, size_t, const char *, AMX *, cell *, int *);
|
||||
template size_t atcprintf<char, char>(char *, size_t, const char *, AMX *, cell *, int *);
|
||||
|
||||
THash<String, lang_err> BadLang_Table;
|
||||
|
||||
static cvar_t *amx_mldebug = NULL;
|
||||
@ -240,7 +245,7 @@ void AddFloat(U **buf_p, size_t &maxlen, double fval, int width, int prec, int f
|
||||
}
|
||||
|
||||
// write the fraction part
|
||||
if (maxlen)
|
||||
if (maxlen && prec)
|
||||
{
|
||||
*buf++ = '.';
|
||||
maxlen--;
|
||||
|
@ -43,7 +43,7 @@ _amxx_CpuSupport:
|
||||
.fail:
|
||||
xor eax, eax
|
||||
|
||||
.end
|
||||
.end:
|
||||
|
||||
pop ebx
|
||||
|
||||
|
@ -185,7 +185,7 @@ unsigned char *MD5::raw_digest(){
|
||||
|
||||
|
||||
|
||||
char *MD5::hex_digest(){
|
||||
const char *MD5::hex_digest(){
|
||||
|
||||
int i;
|
||||
char *s= new char[33];
|
||||
@ -205,7 +205,7 @@ char *MD5::hex_digest(){
|
||||
}
|
||||
|
||||
|
||||
char *MD5::hex_digest(char buffer[33]){
|
||||
const char *MD5::hex_digest(char buffer[33]){
|
||||
|
||||
int i;
|
||||
|
||||
|
@ -59,8 +59,8 @@ public:
|
||||
|
||||
// methods to acquire finalized result
|
||||
unsigned char *raw_digest (); // digest as a 16-byte binary array
|
||||
char * hex_digest (); // digest as a 33-byte ascii-hex string
|
||||
char * hex_digest (char buffer[33]); //same as above, passing buffer
|
||||
const char *hex_digest (); // digest as a 33-byte ascii-hex string
|
||||
const char *hex_digest (char buffer[33]); //same as above, passing buffer
|
||||
|
||||
|
||||
|
||||
|
@ -198,7 +198,7 @@ void BuildPluginFileList(const char *initialdir, CStack<String *> & files)
|
||||
}
|
||||
|
||||
_findclose(handle);
|
||||
#elif defined __linux__
|
||||
#elif defined(__linux__) || defined(__APPLE__)
|
||||
build_pathname_r(path, sizeof(path)-1, "%s/", initialdir);
|
||||
struct dirent *ep;
|
||||
DIR *dp;
|
||||
@ -254,7 +254,7 @@ void LoadExtraPluginsFromDir(const char *initialdir)
|
||||
|
||||
// Precache stuff from force consistency calls
|
||||
// or check for pointed files won't be done
|
||||
int C_PrecacheModel(char *s)
|
||||
int C_PrecacheModel(const char *s)
|
||||
{
|
||||
if (!g_forcedmodules)
|
||||
{
|
||||
@ -269,7 +269,7 @@ int C_PrecacheModel(char *s)
|
||||
RETURN_META_VALUE(MRES_IGNORED, 0);
|
||||
}
|
||||
|
||||
int C_PrecacheSound(char *s)
|
||||
int C_PrecacheSound(const char *s)
|
||||
{
|
||||
if (!g_forcedsounds)
|
||||
{
|
||||
@ -731,7 +731,7 @@ void C_ServerDeactivate_Post()
|
||||
time(&td);
|
||||
tm *curTime = localtime(&td);
|
||||
int i = 0;
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
mkdir(build_pathname("%s/memreports", get_localinfo("amxx_basedir", "addons/amxmodx")), 0700);
|
||||
#else
|
||||
mkdir(build_pathname("%s/memreports", get_localinfo("amxx_basedir", "addons/amxmodx")));
|
||||
@ -740,7 +740,7 @@ void C_ServerDeactivate_Post()
|
||||
{
|
||||
char buffer[256];
|
||||
sprintf(buffer, "%s/memreports/D%02d%02d%03d", get_localinfo("amxx_basedir", "addons/amxmodx"), curTime->tm_mon + 1, curTime->tm_mday, i);
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
mkdir(build_pathname("%s", g_log_dir.c_str()), 0700);
|
||||
if (mkdir(build_pathname(buffer), 0700) < 0)
|
||||
#else
|
||||
@ -1083,7 +1083,7 @@ void C_StartFrame_Post(void)
|
||||
tm *curTime = localtime(&td);
|
||||
|
||||
int i = 0;
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
mkdir(build_pathname("%s/memreports", get_localinfo("amxx_basedir", "addons/amxmodx")), 0700);
|
||||
#else
|
||||
mkdir(build_pathname("%s/memreports", get_localinfo("amxx_basedir", "addons/amxmodx")));
|
||||
@ -1092,7 +1092,7 @@ void C_StartFrame_Post(void)
|
||||
{
|
||||
char buffer[256];
|
||||
sprintf(buffer, "%s/memreports/D%02d%02d%03d", get_localinfo("amxx_basedir", "addons/amxmodx"), curTime->tm_mon + 1, curTime->tm_mday, i);
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
mkdir(build_pathname("%s", g_log_dir.c_str()), 0700);
|
||||
if (mkdir(build_pathname(buffer), 0700) < 0)
|
||||
#else
|
||||
@ -1285,7 +1285,7 @@ void C_TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
||||
void C_AlertMessage(ALERT_TYPE atype, char *szFmt, ...)
|
||||
void C_AlertMessage(ALERT_TYPE atype, const char *szFmt, ...)
|
||||
{
|
||||
if (atype != at_logged)
|
||||
{
|
||||
@ -1329,7 +1329,7 @@ void C_AlertMessage(ALERT_TYPE atype, char *szFmt, ...)
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
||||
void C_ChangeLevel(char *map, char *what)
|
||||
void C_ChangeLevel(const char *map, const char *what)
|
||||
{
|
||||
int ret = executeForwards(FF_ChangeLevel, map);
|
||||
if (ret)
|
||||
@ -1371,7 +1371,7 @@ void C_CvarValue2(const edict_t *pEdict, int requestId, const char *cvar, const
|
||||
RETURN_META(MRES_HANDLED);
|
||||
}
|
||||
|
||||
C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs)
|
||||
C_DLLEXPORT int Meta_Query(const char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs)
|
||||
{
|
||||
gpMetaUtilFuncs = pMetaUtilFuncs;
|
||||
*pPlugInfo = &Plugin_info;
|
||||
@ -1535,7 +1535,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// linux prototype
|
||||
C_DLLEXPORT void GiveFnptrsToDll(enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals)
|
||||
{
|
||||
|
@ -29,8 +29,11 @@
|
||||
* version.
|
||||
*/
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#if defined(__linux__)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include "sclinux.h"
|
||||
@ -86,7 +89,7 @@ bool DirExists(const char *dir)
|
||||
return false;
|
||||
}
|
||||
|
||||
void report_error(int code, char* fmt, ...)
|
||||
void report_error(int code, const char* fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char string[256];
|
||||
@ -106,7 +109,7 @@ void report_error(int code, char* fmt, ...)
|
||||
}
|
||||
}
|
||||
|
||||
void print_srvconsole(char *fmt, ...)
|
||||
void print_srvconsole(const char *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
static char string[384];
|
||||
@ -340,11 +343,14 @@ int load_amxscript(AMX *amx, void **program, const char *filename, char error[64
|
||||
if ((err = amx_InitJIT(amx, (void *)rt, (void *)np)) == AMX_ERR_NONE)
|
||||
{
|
||||
//amx->base = (unsigned char FAR *)realloc(np, amx->code_size);
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32)
|
||||
amx->base = (unsigned char *)VirtualAlloc(NULL, amx->code_size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
#else
|
||||
//posix_memalign((void **)&(amx->base), sysconf(_SC_PAGESIZE), amx->code_size);
|
||||
#elif defined(__GNUC__)
|
||||
# if defined(__APPLE__)
|
||||
amx->base = (unsigned char *)valloc(amx->code_size);
|
||||
# else
|
||||
amx->base = (unsigned char *)memalign(sysconf(_SC_PAGESIZE), amx->code_size);
|
||||
# endif
|
||||
mprotect((void *)amx->base, amx->code_size, PROT_READ|PROT_WRITE|PROT_EXEC);
|
||||
#endif
|
||||
if (amx->base)
|
||||
@ -641,7 +647,7 @@ int unload_amxscript(AMX* amx, void** program)
|
||||
return AMX_ERR_NONE;
|
||||
|
||||
#if defined JIT
|
||||
#if defined __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
if ((flags & AMX_FLAG_JITC) != AMX_FLAG_JITC)
|
||||
{
|
||||
delete [] prg;
|
||||
@ -720,7 +726,7 @@ void get_modname(char* buffer)
|
||||
strcpy(buffer, g_mod_name.c_str());
|
||||
}
|
||||
|
||||
char* build_pathname(char *fmt, ...)
|
||||
char* build_pathname(const char *fmt, ...)
|
||||
{
|
||||
static char string[256];
|
||||
int b;
|
||||
@ -746,7 +752,7 @@ char* build_pathname(char *fmt, ...)
|
||||
return string;
|
||||
}
|
||||
|
||||
char *build_pathname_r(char *buffer, size_t maxlen, char *fmt, ...)
|
||||
char *build_pathname_r(char *buffer, size_t maxlen, const char *fmt, ...)
|
||||
{
|
||||
snprintf(buffer, maxlen, "%s%c", g_mod_name.c_str(), PATH_SEP_CHAR);
|
||||
|
||||
@ -771,7 +777,7 @@ char *build_pathname_r(char *buffer, size_t maxlen, char *fmt, ...)
|
||||
}
|
||||
|
||||
// build pathname based on addons dir
|
||||
char* build_pathname_addons(char *fmt, ...)
|
||||
char* build_pathname_addons(const char *fmt, ...)
|
||||
{
|
||||
static char string[256];
|
||||
|
||||
@ -875,7 +881,7 @@ bool ConvertModuleName(const char *pathString, String &path)
|
||||
path.append(PATH_SEP_CHAR);
|
||||
path.append(tmpname);
|
||||
path.append("_amxx");
|
||||
#if defined __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#if defined AMD64 || PAWN_CELL_SIZE==64
|
||||
path.append("_amd64");
|
||||
#else
|
||||
@ -888,6 +894,8 @@ bool ConvertModuleName(const char *pathString, String &path)
|
||||
path.append(".dll");
|
||||
#elif defined __linux__
|
||||
path.append(".so");
|
||||
#elif defined __APPLE__
|
||||
path.append(".dylib");
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@ -1179,8 +1187,6 @@ void modules_callPluginsUnloading()
|
||||
// new functions
|
||||
int MNF_AddNatives(AMX_NATIVE_INFO* natives)
|
||||
{
|
||||
CList<CModule, const char *>::iterator a = g_modules.begin();
|
||||
|
||||
if (!g_CurrentlyCalledModule || g_ModuleCallReason != ModuleCall_Attach)
|
||||
return FALSE; // may only be called from attach
|
||||
|
||||
@ -1191,8 +1197,6 @@ int MNF_AddNatives(AMX_NATIVE_INFO* natives)
|
||||
|
||||
int MNF_AddNewNatives(AMX_NATIVE_INFO *natives)
|
||||
{
|
||||
CList<CModule, const char *>::iterator a = g_modules.begin();
|
||||
|
||||
if (!g_CurrentlyCalledModule || g_ModuleCallReason != ModuleCall_Attach)
|
||||
return FALSE; // may only be called from attach
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "amx.h"
|
||||
|
||||
#undef DLLEXPORT
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32)
|
||||
#define DLLEXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define DLLEXPORT __attribute__((visibility("default")))
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amxmodx_mm", "amxmodx_mm.vcproj", "{2BF64D1A-AC89-41B0-9D02-FB8CB610F850}"
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amxmodx_mm", "amxmodx_mm.vcxproj", "{2BF64D1A-AC89-41B0-9D02-FB8CB610F850}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
439
amxmodx/msvc10/amxmodx_mm.vcxproj
Normal file
439
amxmodx/msvc10/amxmodx_mm.vcxproj
Normal file
@ -0,0 +1,439 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="JITDebugBinLog|Win32">
|
||||
<Configuration>JITDebugBinLog</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="JITDebug|Win32">
|
||||
<Configuration>JITDebug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="JITReleaseBinLog|Win32">
|
||||
<Configuration>JITReleaseBinLog</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="JITRelease|Win32">
|
||||
<Configuration>JITRelease</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{2BF64D1A-AC89-41B0-9D02-FB8CB610F850}</ProjectGuid>
|
||||
<RootNamespace>amxmodx</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='JITDebugBinLog|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='JITDebugBinLog|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='JITDebugBinLog|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='JITDebugBinLog|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='JITDebugBinLog|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='JITDebugBinLog|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\debug/amxmodx.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(METAMOD)\metamod;$(HLSDK)\multiplayer\common;$(HLSDK)\multiplayer\engine;$(HLSDK)\multiplayer\dlls;$(HLSDK)\multiplayer\pm_shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;amxmodx_EXPORTS;PAWN_CELL_SIZE=32;ASM32;JIT;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>amxmodx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\jitdebug/amxmodx.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\jitdebug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\jitdebug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\jitdebug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\zlib\zlib.lib;..\JIT\amxjitsn.obj;..\JIT\amxexecn.obj;..\JIT\natives-x86.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<Version>0.1</Version>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\extra\lib_win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\jitdebug/amxx_mm.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\jitdebug/amxmodx_mm.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\release/amxmodx.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>$(METAMOD)\metamod;$(HLSDK)\multiplayer\common;$(HLSDK)\multiplayer\engine;$(HLSDK)\multiplayer\dlls;$(HLSDK)\multiplayer\pm_shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;amxmodx_EXPORTS;JIT;ASM32;PAWN_CELL_SIZE=32;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>amxmodx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\jitrelease/amxmodx.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\jitrelease/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\jitrelease/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\jitrelease/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<ShowIncludes>false</ShowIncludes>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\zlib\zlib.lib;..\JIT\amxjitsn.obj;..\JIT\amxexecn.obj;..\JIT\natives-x86.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\extra\lib_win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\jitrelease/amxmodx_mm.pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<ImportLibrary>.\jitrelease/amxmodx_mm.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='JITDebugBinLog|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\debug/amxmodx.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(METAMOD)\metamod;$(HLSDK)\multiplayer\common;$(HLSDK)\multiplayer\engine;$(HLSDK)\multiplayer\dlls;$(HLSDK)\multiplayer\pm_shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;amxmodx_EXPORTS;PAWN_CELL_SIZE=32;ASM32;JIT;BINLOG_ENABLED;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>amxmodx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\jitdebugbinlog/amxmodx.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\jitdebugbinlog/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\jitdebugbinlog/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\jitdebugbinlog/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\zlib\zlib.lib;..\JIT\amxjitsn.obj;..\JIT\amxexecn.obj;..\JIT\natives-x86.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<Version>0.1</Version>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\extra\lib_win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\jitdebugbinlog/amxmodx_bl_mm.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\jitdebugbinlog/amxmodx_bl_mm.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\release/amxmodx.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>$(METAMOD)\metamod;$(HLSDK)\multiplayer\common;$(HLSDK)\multiplayer\engine;$(HLSDK)\multiplayer\dlls;$(HLSDK)\multiplayer\pm_shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;amxmodx_EXPORTS;JIT;ASM32;PAWN_CELL_SIZE=32;BINLOG_ENABLED;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>amxmodx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\jitreleasebinlog/amxmodx.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\jitreleasebinlog/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\jitreleasebinlog/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\jitreleasebinlog/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\zlib\zlib.lib;..\JIT\amxjitsn.obj;..\JIT\amxexecn.obj;..\JIT\natives-x86.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\extra\lib_win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\jitreleasebinlog/amxmodx_bl_mm.pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<ImportLibrary>.\jitreleasebinlog/amxmodx_bl_mm.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\amx.cpp" />
|
||||
<ClCompile Include="..\amxcore.cpp" />
|
||||
<ClCompile Include="..\amxdbg.cpp" />
|
||||
<ClCompile Include="..\amxmod_compat.cpp" />
|
||||
<ClCompile Include="..\amxmodx.cpp" />
|
||||
<ClCompile Include="..\amxtime.cpp" />
|
||||
<ClCompile Include="..\amxxfile.cpp" />
|
||||
<ClCompile Include="..\amxxlog.cpp" />
|
||||
<ClCompile Include="..\binlog.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCmd.cpp" />
|
||||
<ClCompile Include="..\CEvent.cpp" />
|
||||
<ClCompile Include="..\CFile.cpp" />
|
||||
<ClCompile Include="..\CFlagManager.cpp" />
|
||||
<ClCompile Include="..\CForward.cpp" />
|
||||
<ClCompile Include="..\CLang.cpp" />
|
||||
<ClCompile Include="..\CLogEvent.cpp" />
|
||||
<ClCompile Include="..\CMenu.cpp" />
|
||||
<ClCompile Include="..\CMisc.cpp" />
|
||||
<ClCompile Include="..\CModule.cpp" />
|
||||
<ClCompile Include="..\CPlugin.cpp" />
|
||||
<ClCompile Include="..\CTask.cpp" />
|
||||
<ClCompile Include="..\CVault.cpp" />
|
||||
<ClCompile Include="..\debugger.cpp" />
|
||||
<ClCompile Include="..\emsg.cpp" />
|
||||
<ClCompile Include="..\fakemeta.cpp" />
|
||||
<ClCompile Include="..\file.cpp" />
|
||||
<ClCompile Include="..\float.cpp" />
|
||||
<ClCompile Include="..\format.cpp">
|
||||
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'">AssemblyAndSourceCode</AssemblerOutput>
|
||||
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">AssemblyAndSourceCode</AssemblerOutput>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\libraries.cpp" />
|
||||
<ClCompile Include="..\md5.cpp" />
|
||||
<ClCompile Include="..\messages.cpp" />
|
||||
<ClCompile Include="..\meta_api.cpp" />
|
||||
<ClCompile Include="..\modules.cpp" />
|
||||
<ClCompile Include="..\natives.cpp" />
|
||||
<ClCompile Include="..\newmenus.cpp" />
|
||||
<ClCompile Include="..\nongpl_matches.cpp" />
|
||||
<ClCompile Include="..\optimizer.cpp" />
|
||||
<ClCompile Include="..\power.cpp" />
|
||||
<ClCompile Include="..\sorting.cpp" />
|
||||
<ClCompile Include="..\srvcmd.cpp" />
|
||||
<ClCompile Include="..\string.cpp">
|
||||
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'">All</AssemblerOutput>
|
||||
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">All</AssemblerOutput>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\strptime.cpp" />
|
||||
<ClCompile Include="..\trie_natives.cpp" />
|
||||
<ClCompile Include="..\util.cpp" />
|
||||
<ClCompile Include="..\vault.cpp" />
|
||||
<ClCompile Include="..\vector.cpp" />
|
||||
<ClCompile Include="..\datastructs.cpp" />
|
||||
<ClCompile Include="..\sdk\amxxmodule.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='JITDebugBinLog|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='JITDebug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='JITReleaseBinLog|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='JITRelease|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\amx.h" />
|
||||
<ClInclude Include="..\amxdbg.h" />
|
||||
<ClInclude Include="..\amxmod_compat.h" />
|
||||
<ClInclude Include="..\amxmodx.h" />
|
||||
<ClInclude Include="..\amxxfile.h" />
|
||||
<ClInclude Include="..\amxxlog.h" />
|
||||
<ClInclude Include="..\binlog.h" />
|
||||
<ClInclude Include="..\CCmd.h" />
|
||||
<ClInclude Include="..\CEvent.h" />
|
||||
<ClInclude Include="..\CFile.h" />
|
||||
<ClInclude Include="..\CFlagManager.h" />
|
||||
<ClInclude Include="..\CForward.h" />
|
||||
<ClInclude Include="..\CLang.h" />
|
||||
<ClInclude Include="..\CList.h" />
|
||||
<ClInclude Include="..\CLogEvent.h" />
|
||||
<ClInclude Include="..\CMenu.h" />
|
||||
<ClInclude Include="..\CMisc.h" />
|
||||
<ClInclude Include="..\CModule.h" />
|
||||
<ClInclude Include="..\CPlugin.h" />
|
||||
<ClInclude Include="..\CQueue.h" />
|
||||
<ClInclude Include="..\CString.h" />
|
||||
<ClInclude Include="..\CTask.h" />
|
||||
<ClInclude Include="..\CVault.h" />
|
||||
<ClInclude Include="..\CVector.h" />
|
||||
<ClInclude Include="..\datastructs.h" />
|
||||
<ClInclude Include="..\debugger.h" />
|
||||
<ClInclude Include="..\fakemeta.h" />
|
||||
<ClInclude Include="..\format.h" />
|
||||
<ClInclude Include="..\libraries.h" />
|
||||
<ClInclude Include="..\md5.h" />
|
||||
<ClInclude Include="..\messages.h" />
|
||||
<ClInclude Include="..\modules.h" />
|
||||
<ClInclude Include="..\natives.h" />
|
||||
<ClInclude Include="..\newmenus.h" />
|
||||
<ClInclude Include="..\nongpl_matches.h" />
|
||||
<ClInclude Include="..\optimizer.h" />
|
||||
<ClInclude Include="..\resource.h" />
|
||||
<ClInclude Include="..\sh_list.h" />
|
||||
<ClInclude Include="..\sh_stack.h" />
|
||||
<ClInclude Include="..\sh_tinyhash.h" />
|
||||
<ClInclude Include="..\svn_version.h" />
|
||||
<ClInclude Include="..\trie_natives.h" />
|
||||
<ClInclude Include="..\zlib\zconf.h" />
|
||||
<ClInclude Include="..\zlib\zlib.h" />
|
||||
<ClInclude Include="..\sdk\amxxmodule.h" />
|
||||
<ClInclude Include="..\sdk\moduleconfig.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\version.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\amxdefn.asm" />
|
||||
<None Include="..\amxexecn.asm" />
|
||||
<None Include="..\amxjitsn.asm" />
|
||||
<None Include="..\helpers-x86.asm" />
|
||||
<None Include="..\natives-amd64.asm" />
|
||||
<None Include="..\natives-x86.asm" />
|
||||
<None Include="..\..\plugins\include\amxconst.inc" />
|
||||
<None Include="..\..\plugins\include\amxmisc.inc" />
|
||||
<None Include="..\..\plugins\include\amxmodx.inc" />
|
||||
<None Include="..\..\plugins\include\core.inc" />
|
||||
<None Include="..\..\plugins\include\file.inc" />
|
||||
<None Include="..\..\plugins\include\float.inc" />
|
||||
<None Include="..\..\plugins\include\lang.inc" />
|
||||
<None Include="..\..\plugins\include\message_const.inc" />
|
||||
<None Include="..\..\plugins\include\message_stocks.inc" />
|
||||
<None Include="..\..\plugins\include\messages.inc" />
|
||||
<None Include="..\..\plugins\include\sorting.inc" />
|
||||
<None Include="..\..\plugins\include\string.inc" />
|
||||
<None Include="..\..\plugins\include\svn_version.inc" />
|
||||
<None Include="..\..\plugins\include\time.inc" />
|
||||
<None Include="..\..\plugins\include\vault.inc" />
|
||||
<None Include="..\..\plugins\include\vector.inc" />
|
||||
<None Include="..\..\plugins\include\xs.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\amxmod.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\maths.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\mysql.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\translator.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\Vexd_Utilities.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\VexdUM.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\VexdUM_const.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\VexdUM_stock.inc" />
|
||||
<None Include="..\..\plugins\include\amxmod_compat\xtrafun.inc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Object Include="..\Jit\helpers-x86.obj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
426
amxmodx/msvc10/amxmodx_mm.vcxproj.filters
Normal file
426
amxmodx/msvc10/amxmodx_mm.vcxproj.filters
Normal file
@ -0,0 +1,426 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{0d31fe96-c452-4d62-8c7c-0f0f8d69efa8}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{6e1c49c6-6432-4873-bb9a-9d30996955b2}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{721333c3-98b9-4888-a3ec-637a2bd46091}</UniqueIdentifier>
|
||||
<Extensions>rc</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Assembly">
|
||||
<UniqueIdentifier>{e347f4b5-ec94-43d6-b45b-85ab3f146a45}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Assembly\Builds">
|
||||
<UniqueIdentifier>{1cec296a-ddcc-44da-97c4-2a4d0f4d6fc7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SDK">
|
||||
<UniqueIdentifier>{bbfaec3e-7d17-45ea-8b84-093fa5714022}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Pawn Includes">
|
||||
<UniqueIdentifier>{4022451d-eb5f-4f14-b8d8-2ce23fec6e59}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Pawn Includes\AMX Mod Compat">
|
||||
<UniqueIdentifier>{d4419052-0ddd-415e-bb16-4393b99751be}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\amx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\amxcore.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\amxdbg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\amxmod_compat.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\amxmodx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\amxtime.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\amxxfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\amxxlog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\binlog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCmd.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CEvent.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CFlagManager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CForward.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CLang.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CLogEvent.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CMenu.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CMisc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CModule.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CPlugin.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CTask.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CVault.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\debugger.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\emsg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\fakemeta.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\file.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\float.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\format.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\libraries.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\md5.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\messages.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\meta_api.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\modules.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\natives.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\newmenus.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\nongpl_matches.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\optimizer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\power.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\sorting.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\srvcmd.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\string.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\strptime.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\trie_natives.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\util.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\vault.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\vector.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\datastructs.cpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\sdk\amxxmodule.cpp">
|
||||
<Filter>SDK</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\amx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\amxdbg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\amxmod_compat.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\amxmodx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\amxxfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\amxxlog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\binlog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCmd.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CEvent.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CFlagManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CForward.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CLang.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CList.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CLogEvent.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CMenu.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CMisc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CModule.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CPlugin.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CQueue.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CString.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CTask.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CVault.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CVector.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\datastructs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\debugger.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\fakemeta.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\format.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\libraries.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\md5.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\messages.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\modules.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\natives.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\newmenus.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\nongpl_matches.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\optimizer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sh_list.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sh_stack.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sh_tinyhash.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\svn_version.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\trie_natives.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\zlib\zconf.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\zlib\zlib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sdk\amxxmodule.h">
|
||||
<Filter>SDK</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sdk\moduleconfig.h">
|
||||
<Filter>SDK</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\version.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\amxdefn.asm">
|
||||
<Filter>Assembly</Filter>
|
||||
</None>
|
||||
<None Include="..\amxexecn.asm">
|
||||
<Filter>Assembly</Filter>
|
||||
</None>
|
||||
<None Include="..\amxjitsn.asm">
|
||||
<Filter>Assembly</Filter>
|
||||
</None>
|
||||
<None Include="..\helpers-x86.asm">
|
||||
<Filter>Assembly</Filter>
|
||||
</None>
|
||||
<None Include="..\natives-amd64.asm">
|
||||
<Filter>Assembly</Filter>
|
||||
</None>
|
||||
<None Include="..\natives-x86.asm">
|
||||
<Filter>Assembly</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxconst.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmisc.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmodx.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\core.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\file.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\float.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\lang.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\message_const.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\message_stocks.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\messages.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\sorting.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\string.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\svn_version.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\time.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\vault.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\vector.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\xs.inc">
|
||||
<Filter>Pawn Includes</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\amxmod.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\maths.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\mysql.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\translator.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\Vexd_Utilities.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\VexdUM.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\VexdUM_const.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\VexdUM_stock.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
<None Include="..\..\plugins\include\amxmod_compat\xtrafun.inc">
|
||||
<Filter>Pawn Includes\AMX Mod Compat</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Object Include="..\Jit\helpers-x86.obj">
|
||||
<Filter>Assembly\Builds</Filter>
|
||||
</Object>
|
||||
</ItemGroup>
|
||||
</Project>
|
File diff suppressed because it is too large
Load Diff
@ -35,8 +35,11 @@
|
||||
#include "libraries.h"
|
||||
#include "format.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#if defined(__linux__)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include "sclinux.h"
|
||||
@ -479,12 +482,16 @@ static cell AMX_NATIVE_CALL register_native(AMX *amx, cell *params)
|
||||
//we'll apply a safety buffer too
|
||||
//make our function
|
||||
int size = amxx_DynaCodesize();
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32)
|
||||
DWORD temp;
|
||||
pNative->pfn = new char[size + 10];
|
||||
VirtualProtect(pNative->pfn, size+10, PAGE_EXECUTE_READWRITE, &temp);
|
||||
#else
|
||||
#elif defined(__GNUC__)
|
||||
# if defined(__APPLE__)
|
||||
pNative->pfn = (char *)valloc(size+10);
|
||||
# else
|
||||
pNative->pfn = (char *)memalign(sysconf(_SC_PAGESIZE), size+10);
|
||||
# endif
|
||||
mprotect((void *)pNative->pfn, size+10, PROT_READ|PROT_WRITE|PROT_EXEC);
|
||||
#endif
|
||||
|
||||
|
@ -39,6 +39,10 @@
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined __APPLE__
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* Linux NOW has these */
|
||||
#if !defined BIG_ENDIAN
|
||||
#define BIG_ENDIAN 4321
|
||||
|
@ -20,10 +20,10 @@
|
||||
#define stricmp(a,b) strcasecmp(a,b)
|
||||
#define strnicmp(a,b,c) strncasecmp(a,b,c)
|
||||
|
||||
#if defined __linux__ && !defined _snprintf
|
||||
#if ( defined(__linux__) || defined(__APPLE__) ) && !defined _snprintf
|
||||
#define _snprintf snprintf
|
||||
#endif
|
||||
#if defined __linux__ && !defined _vsnprintf
|
||||
#if ( defined(__linux__) || defined(__APPLE__) ) && !defined _vsnprintf
|
||||
//#define _vsnprintf vsnprintf
|
||||
#endif
|
||||
|
||||
@ -40,6 +40,10 @@
|
||||
*/
|
||||
#if !defined __BYTE_ORDER
|
||||
# include <stdlib.h>
|
||||
# if defined __APPLE__
|
||||
# include <sys/types.h>
|
||||
# define __BYTE_ORDER BYTE_ORDER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined __OpenBSD__
|
||||
|
@ -2240,7 +2240,7 @@ static META_FUNCTIONS g_MetaFunctions_Table =
|
||||
GetEngineFunctions_Post
|
||||
};
|
||||
|
||||
C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs)
|
||||
C_DLLEXPORT int Meta_Query(const char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs)
|
||||
{
|
||||
if ((int) CVAR_GET_FLOAT("developer") != 0)
|
||||
UTIL_LogPrintf("[%s] dev: called: Meta_Query; version=%s, ours=%s\n",
|
||||
@ -2334,7 +2334,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
|
||||
|
||||
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
// linux prototype
|
||||
C_DLLEXPORT void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) {
|
||||
|
||||
@ -3050,7 +3050,7 @@ char* UTIL_VarArgs( char *format, ... )
|
||||
// UTIL_LogPrintf - Prints a logged message to console.
|
||||
// Preceded by LOG: ( timestamp ) < message >
|
||||
//=========================================================
|
||||
void UTIL_LogPrintf( char *fmt, ... )
|
||||
void UTIL_LogPrintf( const char *fmt, ... )
|
||||
{
|
||||
va_list argptr;
|
||||
static char string[1024];
|
||||
|
@ -20,11 +20,16 @@
|
||||
|
||||
// DLL Export
|
||||
#undef DLLEXPORT
|
||||
#ifndef __linux__
|
||||
#if defined(_WIN32)
|
||||
#define DLLEXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define DLLEXPORT __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && !defined(LINUX)
|
||||
#define LINUX
|
||||
#elif defined(__APPLE__) && !defined(OSX)
|
||||
#define OSX
|
||||
#endif
|
||||
|
||||
#undef C_DLLEXPORT
|
||||
@ -66,7 +71,7 @@ struct amxx_module_info_s
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#if defined __LCC__ || defined __DMC__ || defined LINUX
|
||||
#if defined __LCC__ || defined __DMC__ || defined LINUX || defined __APPLE__
|
||||
#if defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
@ -308,7 +313,7 @@ typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx);
|
||||
#endif
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
@ -395,7 +400,7 @@ enum {
|
||||
};
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#pragma pack() /* reset default packing */
|
||||
#else
|
||||
#pragma pack(pop) /* reset previous packing */
|
||||
@ -406,7 +411,7 @@ enum {
|
||||
// ***** declare functions *****
|
||||
|
||||
#ifdef USE_METAMOD
|
||||
void UTIL_LogPrintf( char *fmt, ... );
|
||||
void UTIL_LogPrintf( const char *fmt, ... );
|
||||
void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage);
|
||||
short FixedSigned16( float value, float scale );
|
||||
unsigned short FixedUnsigned16( float value, float scale );
|
||||
@ -833,11 +838,11 @@ int FN_AllowLagCompensation_Post(void);
|
||||
|
||||
|
||||
#ifdef FN_PrecacheModel
|
||||
int FN_PrecacheModel(char *s);
|
||||
int FN_PrecacheModel(const char *s);
|
||||
#endif // FN_PrecacheModel
|
||||
|
||||
#ifdef FN_PrecacheSound
|
||||
int FN_PrecacheSound(char *s);
|
||||
int FN_PrecacheSound(const char *s);
|
||||
#endif // FN_PrecacheSound
|
||||
|
||||
#ifdef FN_SetModel
|
||||
@ -857,7 +862,7 @@ void FN_SetSize(edict_t *e, const float *rgflMin, const float *rgflMax);
|
||||
#endif // FN_SetSize
|
||||
|
||||
#ifdef FN_ChangeLevel
|
||||
void FN_ChangeLevel(char *s1, char *s2);
|
||||
void FN_ChangeLevel(const char *s1, const char *s2);
|
||||
#endif // FN_ChangeLevel
|
||||
|
||||
#ifdef FN_GetSpawnParms
|
||||
@ -1261,19 +1266,19 @@ char *FN_GetInfoKeyBuffer(edict_t *e);
|
||||
#endif // FN_GetInfoKeyBuffer
|
||||
|
||||
#ifdef FN_InfoKeyValue
|
||||
char *FN_InfoKeyValue(char *infobuffer, char *key);
|
||||
char *FN_InfoKeyValue(char *infobuffer, const char *key);
|
||||
#endif // FN_InfoKeyValue
|
||||
|
||||
#ifdef FN_SetKeyValue
|
||||
void FN_SetKeyValue(char *infobuffer, char *key, char *value);
|
||||
void FN_SetKeyValue(char *infobuffer, const char *key, const char *value);
|
||||
#endif // FN_SetKeyValue
|
||||
|
||||
#ifdef FN_SetClientKeyValue
|
||||
void FN_SetClientKeyValue(int clientIndex, char *infobuffer, char *key, char *value);
|
||||
void FN_SetClientKeyValue(int clientIndex, char *infobuffer, const char *key, const char *value);
|
||||
#endif // FN_SetClientKeyValue
|
||||
|
||||
#ifdef FN_IsMapValid
|
||||
int FN_IsMapValid(char *filename);
|
||||
int FN_IsMapValid(const char *filename);
|
||||
#endif // FN_IsMapValid
|
||||
|
||||
#ifdef FN_StaticDecal
|
||||
@ -1281,7 +1286,7 @@ void FN_StaticDecal(const float *origin, int decalIndex, int entityIndex, int mo
|
||||
#endif // FN_StaticDecal
|
||||
|
||||
#ifdef FN_PrecacheGeneric
|
||||
int FN_PrecacheGeneric(char *s);
|
||||
int FN_PrecacheGeneric(const char *s);
|
||||
#endif // FN_PrecacheGeneric
|
||||
|
||||
#ifdef FN_GetPlayerUserId
|
||||
@ -1414,11 +1419,11 @@ const char *FN_GetPlayerAuthId(edict_t *e);
|
||||
|
||||
|
||||
#ifdef FN_PrecacheModel_Post
|
||||
int FN_PrecacheModel_Post(char *s);
|
||||
int FN_PrecacheModel_Post(const char *s);
|
||||
#endif // FN_PrecacheModel_Post
|
||||
|
||||
#ifdef FN_PrecacheSound_Post
|
||||
int FN_PrecacheSound_Post(char *s);
|
||||
int FN_PrecacheSound_Post(const char *s);
|
||||
#endif // FN_PrecacheSound_Post
|
||||
|
||||
#ifdef FN_SetModel_Post
|
||||
@ -1438,7 +1443,7 @@ void FN_SetSize_Post(edict_t *e, const float *rgflMin, const float *rgflMax);
|
||||
#endif // FN_SetSize_Post
|
||||
|
||||
#ifdef FN_ChangeLevel_Post
|
||||
void FN_ChangeLevel_Post(char *s1, char *s2);
|
||||
void FN_ChangeLevel_Post(const char *s1, const char *s2);
|
||||
#endif // FN_ChangeLevel_Post
|
||||
|
||||
#ifdef FN_GetSpawnParms_Post
|
||||
@ -1842,19 +1847,19 @@ char *FN_GetInfoKeyBuffer_Post(edict_t *e);
|
||||
#endif // FN_GetInfoKeyBuffer_Post
|
||||
|
||||
#ifdef FN_InfoKeyValue_Post
|
||||
char *FN_InfoKeyValue_Post(char *infobuffer, char *key);
|
||||
char *FN_InfoKeyValue_Post(char *infobuffer, const char *key);
|
||||
#endif // FN_InfoKeyValue_Post
|
||||
|
||||
#ifdef FN_SetKeyValue_Post
|
||||
void FN_SetKeyValue_Post(char *infobuffer, char *key, char *value);
|
||||
void FN_SetKeyValue_Post(char *infobuffer, const char *key, const char *value);
|
||||
#endif // FN_SetKeyValue_Post
|
||||
|
||||
#ifdef FN_SetClientKeyValue_Post
|
||||
void FN_SetClientKeyValue_Post(int clientIndex, char *infobuffer, char *key, char *value);
|
||||
void FN_SetClientKeyValue_Post(int clientIndex, char *infobuffer, const char *key, const char *value);
|
||||
#endif // FN_SetClientKeyValue_Post
|
||||
|
||||
#ifdef FN_IsMapValid_Post
|
||||
int FN_IsMapValid_Post(char *filename);
|
||||
int FN_IsMapValid_Post(const char *filename);
|
||||
#endif // FN_IsMapValid_Post
|
||||
|
||||
#ifdef FN_StaticDecal_Post
|
||||
@ -1862,7 +1867,7 @@ void FN_StaticDecal_Post(const float *origin, int decalIndex, int entityIndex, i
|
||||
#endif // FN_StaticDecal_Post
|
||||
|
||||
#ifdef FN_PrecacheGeneric_Post
|
||||
int FN_PrecacheGeneric_Post(char *s);
|
||||
int FN_PrecacheGeneric_Post(const char *s);
|
||||
#endif // FN_PrecacheGeneric_Post
|
||||
|
||||
#ifdef FN_GetPlayerUserId_Post
|
||||
@ -2116,7 +2121,7 @@ typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
|
||||
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
|
||||
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
|
||||
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
|
||||
typedef void (*PFN_PRINT_SRVCONSOLE) (char * /*format*/, ...);
|
||||
typedef void (*PFN_PRINT_SRVCONSOLE) (const char * /*format*/, ...);
|
||||
typedef const char * (*PFN_GET_MODNAME) (void);
|
||||
typedef const char * (*PFN_GET_AMXSCRIPTNAME) (int /*id*/);
|
||||
typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/);
|
||||
@ -2175,8 +2180,8 @@ typedef void (*PFN_DEALLOCATOR) (const char* /*filename*/, const unsigned i
|
||||
typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*index*/);
|
||||
typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/);
|
||||
typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/);
|
||||
typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/);
|
||||
typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/);
|
||||
typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, const char* /*func name*/, int* /*index*/);
|
||||
typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, const char* /*func name*/, int* /*index*/);
|
||||
typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/, int /* debug */);
|
||||
typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/);
|
||||
typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#endif
|
||||
|
||||
#include <new>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
//namespace SourceHook
|
||||
//{
|
||||
|
@ -54,12 +54,12 @@
|
||||
typedef List<THashNode *> * NodePtr;
|
||||
public:
|
||||
class const_iterator;
|
||||
THash() : m_Buckets(NULL), m_numBuckets(0), m_percentUsed(0.0f), m_items(0)
|
||||
THash() : m_Buckets(NULL), m_numBuckets(0), m_percentUsed(0.0f)
|
||||
{
|
||||
_Refactor();
|
||||
}
|
||||
THash(const THash &other) : m_Buckets(new NodePtr[other.m_numBuckets]),
|
||||
m_numBuckets(other.m_numBuckets), m_percentUsed(other.m_percentUsed), m_items(0)
|
||||
m_numBuckets(other.m_numBuckets), m_percentUsed(other.m_percentUsed)
|
||||
{
|
||||
for (size_t i=0; i<m_numBuckets; i++)
|
||||
m_Buckets[i] = NULL;
|
||||
@ -82,10 +82,6 @@
|
||||
_Clear();
|
||||
_Refactor();
|
||||
}
|
||||
size_t size()
|
||||
{
|
||||
return m_items;
|
||||
}
|
||||
size_t GetBuckets()
|
||||
{
|
||||
return m_numBuckets;
|
||||
@ -122,7 +118,6 @@
|
||||
delete [] m_Buckets;
|
||||
m_Buckets = NULL;
|
||||
m_numBuckets = 0;
|
||||
m_items = 0;
|
||||
}
|
||||
public:
|
||||
template <typename U>
|
||||
@ -229,8 +224,6 @@
|
||||
}
|
||||
}
|
||||
public:
|
||||
friend class iterator;
|
||||
friend class const_iterator;
|
||||
class iterator
|
||||
{
|
||||
friend class THash;
|
||||
@ -304,8 +297,6 @@
|
||||
*this = tmp;
|
||||
|
||||
// :TODO: Maybe refactor to a lower size if required
|
||||
|
||||
m_items--;
|
||||
}
|
||||
private:
|
||||
void _Inc()
|
||||
@ -454,6 +445,8 @@
|
||||
const THash *hash;
|
||||
bool end;
|
||||
};
|
||||
friend class iterator;
|
||||
friend class const_iterator;
|
||||
public:
|
||||
iterator begin()
|
||||
{
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
#include <new>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
enum NodeType
|
||||
|
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include "amxmodx.h"
|
||||
#include "svn_version.h"
|
||||
|
||||
void amx_command()
|
||||
{
|
||||
@ -200,8 +201,9 @@ void amx_command()
|
||||
print_srvconsole("Authors:\n\tDavid \"BAILOPAN\" Anderson, Pavol \"PM OnoTo\" Marko\n");
|
||||
print_srvconsole("\tFelix \"SniperBeamer\" Geyer, Jonny \"Got His Gun\" Bergstrom\n");
|
||||
print_srvconsole("\tLukasz \"SidLuke\" Wlasinski, Christian \"Basic-Master\" Hammacher\n");
|
||||
print_srvconsole("\tBorja \"faluco\" Ferrer, Scott \"Damaged Soul\" Ehlert\n");
|
||||
print_srvconsole("\tBorja \"faluco\" Ferrer, Scott \"DS\" Ehlert\n");
|
||||
print_srvconsole("Compiled: %s\n", __DATE__ ", " __TIME__);
|
||||
print_srvconsole("Build ID: %s\n", SVN_BUILD_ID);
|
||||
#if defined JIT && !defined ASM32
|
||||
print_srvconsole("Core mode: JIT Only\n");
|
||||
#elif !defined JIT && defined ASM32
|
||||
|
@ -1035,7 +1035,7 @@ static cell AMX_NATIVE_CALL n_strfind(AMX *amx, cell *params)
|
||||
if (params[4] > len)
|
||||
return -1;
|
||||
|
||||
char *find = strstr(str, sub);
|
||||
char *find = strstr(str + params[4], sub);
|
||||
|
||||
if (!find)
|
||||
return -1;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#define strnicmp strncasecmp
|
||||
#endif
|
||||
|
||||
@ -336,8 +336,10 @@ char *strptime(const char *buf, const char *fmt, struct tm *tm, short addthem)
|
||||
if (0 <= ti.qS) (*defoper) ( &tm->tm_sec , ti.qS );
|
||||
if (0 <= ti.qM) (*defoper) ( &tm->tm_min , ti.qM ); //tm->tm_min = ti.qM;
|
||||
if (0 <= ti.qI)
|
||||
{
|
||||
if (0 <= ti.qp) ti.qH = ti.qI % 12 + ti.qp * 12;
|
||||
else (*defoper) ( &tm->tm_hour , ti.qI ); //tm->tm_hour = ti.qI;
|
||||
}
|
||||
if (0 <= ti.qH) (*defoper) ( &tm->tm_hour , ti.qH ); //tm->tm_hour = ti.qH;
|
||||
if (0 <= ti.qZ) (*defoper) ( &tm->tm_isdst , ti.qZ - 1 ); //tm->tm_isdst = ti.qZ - 1;
|
||||
if (0 <= ti.qy) ti.qY = ti.qy;
|
||||
|
@ -1,8 +1,9 @@
|
||||
#ifndef _INCLUDE_SVN_VERSION_H_
|
||||
#define _INCLUDE_SVN_VERSION_H_
|
||||
|
||||
#define SVN_VERSION_STRING "1.8.1.3746"
|
||||
#define SVN_VERSION_DWORD 1,8,1,3746
|
||||
#define SVN_VERSION_PRODUCT "1.8.1"
|
||||
#define SVN_VERSION_STRING "1.8.2-dev"
|
||||
#define SVN_VERSION_DWORD 1,8,2,0
|
||||
#define SVN_VERSION_PRODUCT "1.8.2"
|
||||
#define SVN_BUILD_ID SVN_VERSION_STRING " 9:7ff502465eae"
|
||||
|
||||
#endif //_INCLUDE_SVN_VERSION_H_
|
||||
|
@ -1,8 +1,9 @@
|
||||
#ifndef _INCLUDE_SVN_VERSION_H_
|
||||
#define _INCLUDE_SVN_VERSION_H_
|
||||
|
||||
#define SVN_VERSION_STRING "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_VERSION_DWORD $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SVN_VERSION_STRING "$PMAJOR$.$PMINOR$.$PREVISION$$BUILD_STRING$"
|
||||
#define SVN_VERSION_DWORD $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
#define SVN_VERSION_PRODUCT "$PMAJOR$.$PMINOR$.$PREVISION$"
|
||||
#define SVN_BUILD_ID SVN_VERSION_STRING " $BUILD_ID$"
|
||||
|
||||
#endif //_INCLUDE_SVN_VERSION_H_
|
||||
|
@ -108,7 +108,7 @@ static cell AMX_NATIVE_CALL TrieSetString(AMX *amx, cell *params)
|
||||
// native TrieSetArray(Trie:handle, const key[], const any:buffer[], buffsize)
|
||||
static cell AMX_NATIVE_CALL TrieSetArray(AMX *amx, cell *params)
|
||||
{
|
||||
celltrie *t = g_TrieHandles.lookup(params[2]);
|
||||
celltrie *t = g_TrieHandles.lookup(params[1]);
|
||||
|
||||
if (t == NULL)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <time.h>
|
||||
#include "amxmodx.h"
|
||||
|
||||
#if defined __linux__ && !defined _vsnprintf
|
||||
#if ( defined(__linux__) || defined(__APPLE__) ) && !defined _vsnprintf
|
||||
#define _vsnprintf vsnprintf
|
||||
#endif
|
||||
|
||||
@ -157,8 +157,8 @@ void UTIL_IntToString(int value, char *output)
|
||||
|
||||
if (tho)
|
||||
{
|
||||
aaa += sprintf(&output[aaa], words[tho]);
|
||||
aaa += sprintf(&output[aaa], words[29]);
|
||||
aaa += sprintf(&output[aaa], "%s", words[tho]);
|
||||
aaa += sprintf(&output[aaa], "%s", words[29]);
|
||||
value = value % 1000;
|
||||
}
|
||||
|
||||
@ -166,8 +166,8 @@ void UTIL_IntToString(int value, char *output)
|
||||
|
||||
if (hun)
|
||||
{
|
||||
aaa += sprintf(&output[aaa], words[hun]);
|
||||
aaa += sprintf(&output[aaa], words[28]);
|
||||
aaa += sprintf(&output[aaa], "%s", words[hun]);
|
||||
aaa += sprintf(&output[aaa], "%s", words[28]);
|
||||
value = value % 100;
|
||||
}
|
||||
|
||||
@ -175,10 +175,10 @@ void UTIL_IntToString(int value, char *output)
|
||||
int unit = value % 10;
|
||||
|
||||
if (ten)
|
||||
aaa += sprintf(&output[aaa], words[(ten > 1) ? (ten + 18) : (unit + 10)]);
|
||||
aaa += sprintf(&output[aaa], "%s", words[(ten > 1) ? (ten + 18) : (unit + 10)]);
|
||||
|
||||
if (ten != 1 && (unit || (!value && !hun && !tho)))
|
||||
sprintf(&output[aaa], words[unit]);
|
||||
sprintf(&output[aaa], "%s", words[unit]);
|
||||
}
|
||||
|
||||
char* UTIL_SplitHudMessage(const char *src)
|
||||
@ -242,7 +242,7 @@ short FixedSigned16(float value, float scale)
|
||||
return (short)output;
|
||||
}
|
||||
|
||||
void UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, char *pMessage)
|
||||
void UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, const char *pMessage)
|
||||
{
|
||||
if (pEntity)
|
||||
MESSAGE_BEGIN(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, NULL, pEntity);
|
||||
|
BIN
amxmodx/zlib/libz-darwin.a
Normal file
BIN
amxmodx/zlib/libz-darwin.a
Normal file
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
/* @(#) $Id: zconf.h 3734 2008-08-16 09:48:39Z damagedsoul $ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
@ -1,46 +1,107 @@
|
||||
#(C)2004-2005 AMX Mod X Development Team
|
||||
# (C)2004-2013 AMX Mod X Development Team
|
||||
# Makefile written by David "BAILOPAN" Anderson
|
||||
|
||||
#####################################
|
||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||
#####################################
|
||||
|
||||
OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
||||
DEBUG_FLAGS = -g -ggdb3
|
||||
CPP = gcc-4.1
|
||||
BINARY = amxxpc
|
||||
|
||||
PROJECT = amxxpc
|
||||
OBJECTS = amx.cpp amxxpc.cpp Binary.cpp
|
||||
|
||||
LINK = -lz /lib32/libstdc++.a
|
||||
##############################################
|
||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||
##############################################
|
||||
|
||||
INCLUDE = -I. -L.
|
||||
C_OPT_FLAGS = -DNDEBUG -O2 -funroll-loops -fomit-frame-pointer -pipe
|
||||
C_DEBUG_FLAGS = -D_DEBUG -DDEBUG -g -ggdb3
|
||||
C_GCC4_FLAGS = -fvisibility=hidden
|
||||
CPP_GCC4_FLAGS = -fvisibility-inlines-hidden
|
||||
CPP = gcc
|
||||
CPP_OSX = clang
|
||||
|
||||
LINK =
|
||||
|
||||
INCLUDE = -I.
|
||||
|
||||
################################################
|
||||
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
||||
################################################
|
||||
|
||||
OS := $(shell uname -s)
|
||||
|
||||
ifeq "$(OS)" "Darwin"
|
||||
CPP = $(CPP_OSX)
|
||||
LIB_SUFFIX = _osx
|
||||
CFLAGS += -DOSX
|
||||
LINK += -lstdc++ -mmacosx-version-min=10.5 -lz-darwin
|
||||
else
|
||||
LIB_SUFFIX =
|
||||
CFLAGS += -DLINUX
|
||||
LINK += -lz /lib32/libstdc++.a
|
||||
endif
|
||||
|
||||
LINK += -m32 -lm -ldl -L.
|
||||
|
||||
CFLAGS += -DAMX_ANSIONLY -DHAVE_STDINT_H -fno-strict-aliasing \
|
||||
-m32 -Wall -Werror
|
||||
CPPFLAGS += -fexceptions -fno-rtti
|
||||
|
||||
BINARY = $(PROJECT)$(LIB_SUFFIX)
|
||||
|
||||
ifeq "$(DEBUG)" "true"
|
||||
BIN_DIR = Debug
|
||||
CFLAGS = $(DEBUG_FLAGS)
|
||||
CFLAGS += $(C_DEBUG_FLAGS)
|
||||
else
|
||||
BIN_DIR = Release
|
||||
CFLAGS = $(OPT_FLAGS)
|
||||
CFLAGS += $(C_OPT_FLAGS)
|
||||
endif
|
||||
|
||||
CFLAGS += -DLINUX -DNDEBUG -Wno-deprecated -fexceptions -DHAVE_STDINT_H -DAMX_ANSIONLY -fno-rtti -static-libgcc
|
||||
IS_CLANG := $(shell $(CPP) --version | head -1 | grep clang > /dev/null && echo "1" || echo "0")
|
||||
|
||||
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||
ifeq "$(IS_CLANG)" "1"
|
||||
CPP_MAJOR := $(shell $(CPP) --version | grep clang | sed "s/.*version \([0-9]\)*\.[0-9]*.*/\1/")
|
||||
CPP_MINOR := $(shell $(CPP) --version | grep clang | sed "s/.*version [0-9]*\.\([0-9]\)*.*/\1/")
|
||||
else
|
||||
CPP_MAJOR := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
||||
CPP_MINOR := $(shell $(CPP) -dumpversion >&1 | cut -b3)
|
||||
endif
|
||||
|
||||
# Clang || GCC >= 4
|
||||
ifeq "$(shell expr $(IS_CLANG) \| $(CPP_MAJOR) \>= 4)" "1"
|
||||
CFLAGS += $(C_GCC4_FLAGS)
|
||||
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
||||
endif
|
||||
|
||||
# Clang >= 3 || GCC >= 4.7
|
||||
ifeq "$(shell expr $(IS_CLANG) \& $(CPP_MAJOR) \>= 3 \| $(CPP_MAJOR) \>= 4 \& $(CPP_MINOR) \>= 7)" "1"
|
||||
CFLAGS += -Wno-delete-non-virtual-dtor
|
||||
endif
|
||||
|
||||
# OS is Linux and not using clang
|
||||
ifeq "$(shell expr $(OS) \= Linux \& $(IS_CLANG) \= 0)" "1"
|
||||
LINK += -static-libgcc
|
||||
endif
|
||||
|
||||
OBJ_BIN := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||
|
||||
# This will break if we include other Makefiles, but is fine for now. It allows
|
||||
# us to make a copy of this file that uses altered paths (ie. Makefile.mine)
|
||||
# or other changes without mucking up the original.
|
||||
MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
|
||||
$(BIN_DIR)/%.o: %.cpp
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) -m32 -o $@ -c $<
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
all:
|
||||
mkdir -p $(BIN_DIR)
|
||||
$(MAKE) amxxpc
|
||||
$(MAKE) -f $(MAKEFILE_NAME) $(PROJECT)
|
||||
|
||||
amxxpc: $(OBJ_LINUX)
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) -m32 $(OBJ_LINUX) $(LINK) -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
||||
$(PROJECT): $(OBJ_BIN)
|
||||
$(CPP) $(INCLUDE) $(OBJ_BIN) $(LINK) -o $(BIN_DIR)/$(BINARY)
|
||||
|
||||
default: all
|
||||
|
||||
clean:
|
||||
rm -rf Release/*.o
|
||||
rm -rf Release/$(BINARY)
|
||||
rm -rf Debug/*.o
|
||||
rm -rf Debug/$(BINARY)
|
||||
rm -rf $(BIN_DIR)/*.o
|
||||
rm -f $(BIN_DIR)/$(BINARY)
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amx.cpp 1728 2005-07-25 00:01:54Z dvander $
|
||||
*/
|
||||
|
||||
#if BUILD_PLATFORM == WINDOWS && BUILD_TYPE == RELEASE && BUILD_COMPILER == MSVC && PAWN_CELL_SIZE == 64
|
||||
@ -42,7 +42,7 @@
|
||||
#include <stddef.h> /* for wchar_t */
|
||||
#include <string.h>
|
||||
#include "osdefs.h"
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#include <sclinux.h>
|
||||
#if !defined AMX_NODYNALOAD
|
||||
#include <dlfcn.h>
|
||||
@ -815,12 +815,12 @@ static void expand(unsigned char *code, long codesize, long memsize)
|
||||
int AMXAPI amx_Init(AMX *amx,void *program)
|
||||
{
|
||||
AMX_HEADER *hdr;
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__) && !defined AMX_NODYNALOAD
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__) && !defined AMX_NODYNALOAD
|
||||
char libname[sNAMEMAX+8]; /* +1 for '\0', +3 for 'amx' prefix, +4 for extension */
|
||||
#if defined _Windows
|
||||
typedef int (FAR WINAPI *AMX_ENTRY)(AMX _FAR *amx);
|
||||
HINSTANCE hlib;
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
typedef int (*AMX_ENTRY)(AMX *amx);
|
||||
void *hlib;
|
||||
#endif
|
||||
@ -965,7 +965,7 @@ int AMXAPI amx_Init(AMX *amx,void *program)
|
||||
amx_BrowseRelocate(amx);
|
||||
|
||||
/* load any extension modules that the AMX refers to */
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__) && !defined AMX_NODYNALOAD
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__) && !defined AMX_NODYNALOAD
|
||||
hdr=(AMX_HEADER *)amx->base;
|
||||
numlibraries=NUMENTRIES(hdr,libraries,pubvars);
|
||||
for (i=0; i<numlibraries; i++) {
|
||||
@ -981,7 +981,7 @@ int AMXAPI amx_Init(AMX *amx,void *program)
|
||||
if (hlib<=HINSTANCE_ERROR)
|
||||
hlib=NULL;
|
||||
#endif
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
strcat(libname,".so");
|
||||
hlib=dlopen(libname,RTLD_NOW);
|
||||
#endif
|
||||
@ -995,7 +995,7 @@ int AMXAPI amx_Init(AMX *amx,void *program)
|
||||
strcat(funcname,"Init");
|
||||
#if defined _Windows
|
||||
libinit=(AMX_ENTRY)GetProcAddress(hlib,funcname);
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
libinit=(AMX_ENTRY)dlsym(hlib,funcname);
|
||||
#endif
|
||||
if (libinit!=NULL)
|
||||
@ -1029,7 +1029,7 @@ int AMXAPI amx_Init(AMX *amx,void *program)
|
||||
return !VirtualProtect(addr, len, p, &prev);
|
||||
}
|
||||
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
|
||||
/* Linux already has mprotect() */
|
||||
|
||||
@ -1104,10 +1104,10 @@ int AMXAPI amx_InitJIT(AMX *amx,void *compiled_program,void *reloc_table)
|
||||
#if defined AMX_CLEANUP
|
||||
int AMXAPI amx_Cleanup(AMX *amx)
|
||||
{
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__) && !defined AMX_NODYNALOAD
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__) && !defined AMX_NODYNALOAD
|
||||
#if defined _Windows
|
||||
typedef int (FAR WINAPI *AMX_ENTRY)(AMX FAR *amx);
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
typedef int (*AMX_ENTRY)(AMX *amx);
|
||||
#endif
|
||||
AMX_HEADER *hdr;
|
||||
@ -1117,7 +1117,7 @@ int AMXAPI amx_Cleanup(AMX *amx)
|
||||
#endif
|
||||
|
||||
/* unload all extension modules */
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__) && !defined AMX_NODYNALOAD
|
||||
#if (defined _Windows || defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__) && !defined AMX_NODYNALOAD
|
||||
hdr=(AMX_HEADER *)amx->base;
|
||||
assert(hdr->magic==AMX_MAGIC);
|
||||
numlibraries=NUMENTRIES(hdr,libraries,pubvars);
|
||||
@ -1130,14 +1130,14 @@ int AMXAPI amx_Cleanup(AMX *amx)
|
||||
strcat(funcname,"Cleanup");
|
||||
#if defined _Windows
|
||||
libcleanup=(AMX_ENTRY)GetProcAddress((HINSTANCE)lib->address,funcname);
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
libcleanup=(AMX_ENTRY)dlsym((void*)lib->address,funcname);
|
||||
#endif
|
||||
if (libcleanup!=NULL)
|
||||
libcleanup(amx);
|
||||
#if defined _Windows
|
||||
FreeLibrary((HINSTANCE)lib->address);
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
dlclose((void*)lib->address);
|
||||
#endif
|
||||
} /* if */
|
||||
@ -1666,7 +1666,7 @@ int AMXAPI amx_PushString(AMX *amx, cell *amx_addr, cell **phys_addr, const char
|
||||
* fast "indirect threaded" interpreter.
|
||||
*/
|
||||
|
||||
#define NEXT(cip) goto **cip++
|
||||
#define NEXT(cip) goto *(const void *)*cip++
|
||||
|
||||
int AMXAPI amx_Exec(AMX *amx, cell *retval, int index)
|
||||
{
|
||||
@ -1846,14 +1846,14 @@ static const void * const amx_opcodelist[] = {
|
||||
NEXT(cip);
|
||||
op_load_i:
|
||||
/* verify address */
|
||||
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
|
||||
if ((pri>=hea && pri<stk) || (ucell)pri>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
pri= * (cell *)(data+(int)pri);
|
||||
NEXT(cip);
|
||||
op_lodb_i:
|
||||
GETPARAM(offs);
|
||||
/* verify address */
|
||||
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
|
||||
if ((pri>=hea && pri<stk) || (ucell)pri>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
switch (offs) {
|
||||
case 1:
|
||||
@ -1919,14 +1919,14 @@ static const void * const amx_opcodelist[] = {
|
||||
NEXT(cip);
|
||||
op_stor_i:
|
||||
/* verify address */
|
||||
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
|
||||
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
*(cell *)(data+(int)alt)=pri;
|
||||
NEXT(cip);
|
||||
op_strb_i:
|
||||
GETPARAM(offs);
|
||||
/* verify address */
|
||||
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
|
||||
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
switch (offs) {
|
||||
case 1:
|
||||
@ -1943,7 +1943,7 @@ static const void * const amx_opcodelist[] = {
|
||||
op_lidx:
|
||||
offs=pri*sizeof(cell)+alt;
|
||||
/* verify address */
|
||||
if (offs>=hea && offs<stk || (ucell)offs>=(ucell)amx->stp)
|
||||
if ((offs>=hea && offs<stk) || (ucell)offs>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
pri= * (cell *)(data+(int)offs);
|
||||
NEXT(cip);
|
||||
@ -1951,7 +1951,7 @@ static const void * const amx_opcodelist[] = {
|
||||
GETPARAM(offs);
|
||||
offs=(pri << (int)offs)+alt;
|
||||
/* verify address */
|
||||
if (offs>=hea && offs<stk || (ucell)offs>=(ucell)amx->stp)
|
||||
if ((offs>=hea && offs<stk) || (ucell)offs>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
pri= * (cell *)(data+(int)offs);
|
||||
NEXT(cip);
|
||||
@ -2388,13 +2388,13 @@ static const void * const amx_opcodelist[] = {
|
||||
/* verify top & bottom memory addresses, for both source and destination
|
||||
* addresses
|
||||
*/
|
||||
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
|
||||
if ((pri>=hea && pri<stk) || (ucell)pri>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
if ((pri+offs)>hea && (pri+offs)<stk || (ucell)(pri+offs)>(ucell)amx->stp)
|
||||
if (((pri+offs)>hea && (pri+offs)<stk) || (ucell)(pri+offs)>(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
|
||||
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
if ((alt+offs)>hea && (alt+offs)<stk || (ucell)(alt+offs)>(ucell)amx->stp)
|
||||
if (((alt+offs)>hea && (alt+offs)<stk) || (ucell)(alt+offs)>(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
memcpy(data+(int)alt, data+(int)pri, (int)offs);
|
||||
NEXT(cip);
|
||||
@ -2403,22 +2403,22 @@ static const void * const amx_opcodelist[] = {
|
||||
/* verify top & bottom memory addresses, for both source and destination
|
||||
* addresses
|
||||
*/
|
||||
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
|
||||
if ((pri>=hea && pri<stk) || (ucell)pri>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
if ((pri+offs)>hea && (pri+offs)<stk || (ucell)(pri+offs)>(ucell)amx->stp)
|
||||
if (((pri+offs)>hea && (pri+offs)<stk) || (ucell)(pri+offs)>(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
|
||||
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
if ((alt+offs)>hea && (alt+offs)<stk || (ucell)(alt+offs)>(ucell)amx->stp)
|
||||
if (((alt+offs)>hea && (alt+offs)<stk) || (ucell)(alt+offs)>(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
pri=memcmp(data+(int)alt, data+(int)pri, (int)offs);
|
||||
NEXT(cip);
|
||||
op_fill:
|
||||
GETPARAM(offs);
|
||||
/* verify top & bottom memory addresses */
|
||||
if (alt>=hea && alt<stk || (ucell)alt>=(ucell)amx->stp)
|
||||
if ((alt>=hea && alt<stk) || (ucell)alt>=(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
if ((alt+offs)>hea && (alt+offs)<stk || (ucell)(alt+offs)>(ucell)amx->stp)
|
||||
if (((alt+offs)>hea && (alt+offs)<stk) || (ucell)(alt+offs)>(ucell)amx->stp)
|
||||
ABORT(amx,AMX_ERR_MEMACCESS);
|
||||
for (i=(int)alt; offs>=(int)sizeof(cell); i+=sizeof(cell), offs-=sizeof(cell))
|
||||
*(cell *)(data+i) = pri;
|
||||
@ -3592,7 +3592,7 @@ int AMXAPI amx_GetAddr(AMX *amx,cell amx_addr,cell **phys_addr)
|
||||
data=(amx->data!=NULL) ? amx->data : amx->base+(int)hdr->dat;
|
||||
|
||||
assert(phys_addr!=NULL);
|
||||
if (amx_addr>=amx->hea && amx_addr<amx->stk || amx_addr<0 || amx_addr>=amx->stp) {
|
||||
if ((amx_addr>=amx->hea && amx_addr<amx->stk) || amx_addr<0 || amx_addr>=amx->stp) {
|
||||
*phys_addr=NULL;
|
||||
return AMX_ERR_MEMACCESS;
|
||||
} /* if */
|
||||
|
@ -18,13 +18,13 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amx.h 3736 2008-08-16 20:13:12Z damagedsoul $
|
||||
*/
|
||||
|
||||
#if defined FREEBSD && !defined __FreeBSD__
|
||||
#define __FreeBSD__
|
||||
#endif
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#include <sclinux.h>
|
||||
#endif
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#if defined __LCC__ || defined __DMC__ || defined LINUX
|
||||
#if defined __LCC__ || defined __DMC__ || defined LINUX || defined __APPLE__
|
||||
#if defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
@ -188,7 +188,7 @@ typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx);
|
||||
#endif
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
@ -416,7 +416,7 @@ int AMXAPI amx_UTF8Put(char *string, char **endptr, int maxchars, cell value);
|
||||
amx_Register((amx), amx_NativeInfo((name),(func)), 1);
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack() /* reset default packing */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=reset
|
||||
|
@ -21,7 +21,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amxdbg.h 3736 2008-08-16 20:13:12Z damagedsoul $
|
||||
*/
|
||||
|
||||
#ifndef AMXDBG_H_INCLUDED
|
||||
@ -49,7 +49,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
@ -156,7 +156,7 @@ int AMXAPI dbg_GetArrayDim(AMX_DBG *amxdbg, const AMX_DBG_SYMBOL *sym, const AMX
|
||||
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack() /* reset default packing */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=reset
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) | defined (__APPLE__)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
@ -29,28 +29,29 @@ void WriteBh(BinaryWriter *bw, BinPlugin *bh);
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct abl pl32;
|
||||
struct abl pl64;
|
||||
|
||||
#ifdef _DEBUG
|
||||
printf("debug clamp\n");
|
||||
getchar();
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__)
|
||||
HINSTANCE lib = NULL;
|
||||
if (FileExists("./amxxpc32.so"))
|
||||
lib = dlmount("./amxxpc32.so");
|
||||
else
|
||||
lib = dlmount("amxxpc32.so");
|
||||
#elif defined(__APPLE__)
|
||||
HINSTANCE lib = dlmount("amxxpc32.dylib");
|
||||
#else
|
||||
HINSTANCE lib = dlmount("amxxpc32.dll");
|
||||
#endif
|
||||
if (!lib)
|
||||
{
|
||||
#ifdef __linux__
|
||||
printf("32bit compiler failed to instantiate: %s\n", dlerror());
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
printf("compiler failed to instantiate: %s\n", dlerror());
|
||||
#else
|
||||
printf("32bit compiler failed to instantiate: %d\n", GetLastError());
|
||||
printf("compiler failed to instantiate: %d\n", GetLastError());
|
||||
#endif
|
||||
exit(0);
|
||||
}
|
||||
@ -60,16 +61,16 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!sc32 || !pc_printf)
|
||||
{
|
||||
#ifdef __linux__
|
||||
printf("32bit compiler failed to link: %p.\n",sc32);
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
printf("compiler failed to link: %p.\n",sc32);
|
||||
#else
|
||||
printf("32bit compiler failed to link: %d.\n", GetLastError());
|
||||
printf("compiler failed to link: %d.\n", GetLastError());
|
||||
#endif
|
||||
exit(0);
|
||||
}
|
||||
|
||||
pc_printf("Welcome to the AMX Mod X %s Compiler.\n", VERSION_STRING);
|
||||
pc_printf("Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team\n\n");
|
||||
pc_printf("Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team\n\n");
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
@ -112,61 +113,12 @@ int main(int argc, char **argv)
|
||||
|
||||
unlink(file);
|
||||
|
||||
HINSTANCE lib64 = NULL;
|
||||
#ifdef __linux__
|
||||
if (FileExists("./amxxpc64.so"))
|
||||
lib64 = dlmount("./amxxpc64.so");
|
||||
else
|
||||
lib64 = dlmount("amxxpc64.so");
|
||||
#else
|
||||
lib64 = dlmount("amxxpc64.dll");
|
||||
#endif
|
||||
if (!lib64)
|
||||
{
|
||||
pc_printf("64bit compiler failed to instantiate.\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
COMPILER sc64 = (COMPILER)dlsym(lib64, "Compile64");
|
||||
|
||||
if (!sc64)
|
||||
{
|
||||
#ifdef __linux__
|
||||
pc_printf("64bit compiler failed to link: %s.\n", dlerror());
|
||||
#else
|
||||
pc_printf("64bit compiler failed to link: %d.\n", GetLastError());
|
||||
#endif
|
||||
exit(0);
|
||||
}
|
||||
|
||||
sc64(argc, argv);
|
||||
|
||||
dlclose(lib64);
|
||||
|
||||
if (file == NULL)
|
||||
{
|
||||
pc_printf("Could not locate the output file on second pass.\n");
|
||||
exit(0);
|
||||
} else {
|
||||
FILE *fp = fopen(file, "rb");
|
||||
if (fp == NULL)
|
||||
{
|
||||
pc_printf("Could not locate output file on second pass (compile failed).\n");
|
||||
exit(0);
|
||||
}
|
||||
ReadFileIntoPl(&pl64, fp);
|
||||
pl64.cellsize = 8;
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
/////////////
|
||||
// COMPRSSION
|
||||
/////////////
|
||||
|
||||
CompressPl(&pl32);
|
||||
|
||||
CompressPl(&pl64);
|
||||
|
||||
char *newfile = new char[strlen(file)+3];
|
||||
strcpy(newfile, file);
|
||||
if (!strstr(file, ".amxx") && !strstr(file, ".AMXX"))
|
||||
@ -179,34 +131,33 @@ int main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
BinPlugin bh32, bh64;
|
||||
BinPlugin bh32;
|
||||
|
||||
Pl2Bh(&pl32, &bh32);
|
||||
Pl2Bh(&pl64, &bh64);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
static const int kEntries = 1;
|
||||
|
||||
//entry is 4 ints and a byte
|
||||
static const int kEntrySize = (sizeof(int32_t) * 4) + sizeof(int8_t);
|
||||
|
||||
BinaryWriter bw(fp);
|
||||
|
||||
bw.WriteUInt32(MAGIC_HEADER2);
|
||||
bw.WriteUInt16(MAGIC_VERSION);
|
||||
bw.WriteUInt8(2);
|
||||
bw.WriteUInt8(kEntries);
|
||||
|
||||
//base header
|
||||
int baseaddr = sizeof(int32_t) + sizeof(int16_t) + sizeof(int8_t);
|
||||
//entry is 4 ints and a byte
|
||||
int entrysize = (sizeof(int32_t) * 4) + sizeof(int8_t);
|
||||
//extend this by the two entries we have
|
||||
baseaddr += entrysize * 2;
|
||||
//extend this by the entries we have
|
||||
baseaddr += kEntrySize * kEntries;
|
||||
|
||||
bh32.offs = baseaddr;
|
||||
bh64.offs = bh32.offs + bh32.disksize;
|
||||
|
||||
WriteBh(&bw, &bh32);
|
||||
WriteBh(&bw, &bh64);
|
||||
bw.WriteChars(pl32.cmp, pl32.cmpsize);
|
||||
bw.WriteChars(pl64.cmp, pl64.cmpsize);
|
||||
} catch (...) {
|
||||
fclose(fp);
|
||||
unlink(file);
|
||||
@ -293,7 +244,7 @@ char *swiext(const char *file, const char *ext, int isO)
|
||||
int i = 0, pos = -1, j = 0;
|
||||
int fileLen = strlen(file);
|
||||
int extLen = strlen(ext);
|
||||
int max = 0, odirFlag = -1;
|
||||
int odirFlag = -1;
|
||||
|
||||
for (i=fileLen-1; i>=0; i--)
|
||||
{
|
||||
@ -389,7 +340,7 @@ void show_help()
|
||||
printf("\t-r[name] write cross reference report to console or to specified file\n");
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
bool FileExists(const char *file)
|
||||
{
|
||||
FILE *fp = fopen(file, "rb");
|
||||
|
@ -5,7 +5,7 @@
|
||||
#define MAGIC_HEADER2 0x414D5858
|
||||
#define MAGIC_VERSION 0x0300
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
# include <dlfcn.h>
|
||||
#else
|
||||
# include <windows.h>
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
# define dlmount(x) dlopen(x, RTLD_NOW|RTLD_GLOBAL)
|
||||
typedef void* HINSTANCE;
|
||||
#else
|
||||
@ -65,7 +65,7 @@ struct BinPlugin
|
||||
int32_t offs; //file offset
|
||||
};
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
bool FileExists(const char *file);
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amxxpc", "amxxpc.vcproj", "{39412290-D01C-472F-A439-AB5592A04C08}"
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amxxpc", "amxxpc.vcxproj", "{39412290-D01C-472F-A439-AB5592A04C08}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -1,258 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="amxxpc"
|
||||
ProjectGUID="{39412290-D01C-472F-A439-AB5592A04C08}"
|
||||
RootNamespace="amxxpc"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="zlib.lib"
|
||||
OutputFile="$(OutDir)/amxxpc.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/amxxpc.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="0"
|
||||
StructMemberAlignment="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="zlib.lib"
|
||||
OutputFile="$(OutDir)/amxxpc.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\amx.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\amxxpc.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Binary.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\amx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\amxdbg.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\amxxpc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Binary.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\osdefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sclinux.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zconf.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\amxxpc1.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
115
compiler/amxxpc/amxxpc.vcxproj
Normal file
115
compiler/amxxpc/amxxpc.vcxproj
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{39412290-D01C-472F-A439-AB5592A04C08}</ProjectGuid>
|
||||
<RootNamespace>amxxpc</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)amxxpc.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="amx.cpp" />
|
||||
<ClCompile Include="amxxpc.cpp" />
|
||||
<ClCompile Include="Binary.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="amx.h" />
|
||||
<ClInclude Include="amxdbg.h" />
|
||||
<ClInclude Include="amxxpc.h" />
|
||||
<ClInclude Include="Binary.h" />
|
||||
<ClInclude Include="osdefs.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="resource1.h" />
|
||||
<ClInclude Include="sclinux.h" />
|
||||
<ClInclude Include="zconf.h" />
|
||||
<ClInclude Include="zlib.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="amxxpc1.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
65
compiler/amxxpc/amxxpc.vcxproj.filters
Normal file
65
compiler/amxxpc/amxxpc.vcxproj.filters
Normal file
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="amx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="amxxpc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Binary.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="amx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="amxdbg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="amxxpc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Binary.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="osdefs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource1.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sclinux.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="zconf.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="zlib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="amxxpc1.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
#include "windows.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
BIN
compiler/amxxpc/libz-darwin.a
Normal file
BIN
compiler/amxxpc/libz-darwin.a
Normal file
Binary file not shown.
@ -39,6 +39,10 @@
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined __APPLE__
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* Linux NOW has these */
|
||||
#if !defined BIG_ENDIAN
|
||||
#define BIG_ENDIAN 4321
|
||||
|
@ -32,6 +32,10 @@
|
||||
*/
|
||||
#if !defined __BYTE_ORDER
|
||||
# include <stdlib.h>
|
||||
# if defined __APPLE__
|
||||
# include <sys/types.h>
|
||||
# define __BYTE_ORDER BYTE_ORDER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined __OpenBSD__ || defined __FreeBSD__
|
||||
|
@ -3,7 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
/* @(#) $Id: zconf.h 3734 2008-08-16 09:48:39Z damagedsoul $ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
@ -1,56 +1,108 @@
|
||||
#(C)2004-2005 AMX Mod X Development Team
|
||||
# (C)2004-2013 AMX Mod X Development Team
|
||||
# Makefile written by David "BAILOPAN" Anderson
|
||||
|
||||
#####################################
|
||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||
#####################################
|
||||
|
||||
OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing -fvisibility=hidden
|
||||
DEBUG_FLAGS = -g -ggdb3
|
||||
CPP = gcc-4.1
|
||||
NAME = amxxpc
|
||||
PROJECT = amxxpc32
|
||||
OBJECTS = sc1.c sc2.c sc3.c sc4.c sc5.c sc6.c sc7.c scvars.c scmemfil.c scstate.c sclist.c sci18n.c \
|
||||
scexpand.c pawncc.c libpawnc.c prefix.c memfile.c
|
||||
|
||||
OBJECTS = sc1.c sc2.c sc3.c sc4.c sc5.c sc6.c sc7.c scvars.c scmemfil.c \
|
||||
scstate.c sclist.c sci18n.c scexpand.c pawncc.c libpawnc.c prefix.c \
|
||||
memfile.c
|
||||
##############################################
|
||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||
##############################################
|
||||
|
||||
C_OPT_FLAGS = -DNDEBUG -O2 -funroll-loops -fomit-frame-pointer -pipe
|
||||
C_DEBUG_FLAGS = -D_DEBUG -DDEBUG -g -ggdb3
|
||||
C_GCC4_FLAGS = -fvisibility=hidden
|
||||
CPP_GCC4_FLAGS = -fvisibility-inlines-hidden
|
||||
CPP = gcc
|
||||
CPP_OSX = clang
|
||||
|
||||
LINK = -lpthread
|
||||
|
||||
INCLUDE = -I.
|
||||
|
||||
ifeq "$(PAWN64)" "true"
|
||||
BINARY = $(NAME)64.so
|
||||
BIN_DIR = Release64
|
||||
CFLAGS += -DPAWN_CELL_SIZE=64 -DHAVE_I64 -Dpc_printf=pc_printf64
|
||||
################################################
|
||||
### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ###
|
||||
################################################
|
||||
|
||||
OS := $(shell uname -s)
|
||||
|
||||
ifeq "$(OS)" "Darwin"
|
||||
CPP = $(CPP_OSX)
|
||||
LIB_EXT = dylib
|
||||
CFLAGS += -DOSX
|
||||
LINK += -dynamiclib -mmacosx-version-min=10.5
|
||||
else
|
||||
BINARY = $(NAME)32.so
|
||||
BIN_DIR = Release32
|
||||
CFLAGS += -DPAWN_CELL_SIZE=32
|
||||
LIB_EXT = so
|
||||
CFLAGS += -DLINUX
|
||||
LINK += -shared
|
||||
endif
|
||||
|
||||
CFLAGS += -DLINUX -DNDEBUG -DHAVE_STDINT_H -DENABLE_BINRELOC -DNO_MAIN -DPAWNC_DLL -static-libgcc
|
||||
LINK += -m32 -lm -ldl
|
||||
|
||||
CFLAGS += $(OPT_FLAGS)
|
||||
OBJ_LINUX := $(OBJECTS:%.c=$(BIN_DIR)/%.o)
|
||||
CFLAGS += -DENABLE_BINRELOC -DNO_MAIN -DPAWNC_DLL -DHAVE_STDINT_H -fno-strict-aliasing -m32 -Wall \
|
||||
-Werror
|
||||
CPPFLAGS += -fexceptions -fno-rtti
|
||||
|
||||
BINARY = $(PROJECT).$(LIB_EXT)
|
||||
|
||||
ifeq "$(DEBUG)" "true"
|
||||
BIN_DIR = Debug
|
||||
CFLAGS += $(C_DEBUG_FLAGS)
|
||||
else
|
||||
BIN_DIR = Release
|
||||
CFLAGS += $(C_OPT_FLAGS)
|
||||
endif
|
||||
|
||||
IS_CLANG := $(shell $(CPP) --version | head -1 | grep clang > /dev/null && echo "1" || echo "0")
|
||||
|
||||
ifeq "$(IS_CLANG)" "1"
|
||||
CPP_MAJOR := $(shell $(CPP) --version | grep clang | sed "s/.*version \([0-9]\)*\.[0-9]*.*/\1/")
|
||||
CPP_MINOR := $(shell $(CPP) --version | grep clang | sed "s/.*version [0-9]*\.\([0-9]\)*.*/\1/")
|
||||
else
|
||||
CPP_MAJOR := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
||||
CPP_MINOR := $(shell $(CPP) -dumpversion >&1 | cut -b3)
|
||||
endif
|
||||
|
||||
# Clang || GCC >= 4
|
||||
ifeq "$(shell expr $(IS_CLANG) \| $(CPP_MAJOR) \>= 4)" "1"
|
||||
CFLAGS += $(C_GCC4_FLAGS)
|
||||
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
||||
endif
|
||||
|
||||
# Clang >= 3 || GCC >= 4.7
|
||||
ifeq "$(shell expr $(IS_CLANG) \& $(CPP_MAJOR) \>= 3 \| $(CPP_MAJOR) \>= 4 \& $(CPP_MINOR) \>= 7)" "1"
|
||||
CFLAGS += -Wno-delete-non-virtual-dtor
|
||||
endif
|
||||
|
||||
# OS is Linux and not using clang
|
||||
ifeq "$(shell expr $(OS) \= Linux \& $(IS_CLANG) \= 0)" "1"
|
||||
LINK += -static-libgcc
|
||||
endif
|
||||
|
||||
OBJ_BIN := $(OBJECTS:%.c=$(BIN_DIR)/%.o)
|
||||
|
||||
# This will break if we include other Makefiles, but is fine for now. It allows
|
||||
# us to make a copy of this file that uses altered paths (ie. Makefile.mine)
|
||||
# or other changes without mucking up the original.
|
||||
MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
|
||||
$(BIN_DIR)/%.o: %.c
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) -m32 -o $@ -c $<
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
all:
|
||||
mkdir -p Release32
|
||||
mkdir -p Release64
|
||||
$(MAKE) pawn_make
|
||||
$(MAKE) pawn_make PAWN64=true
|
||||
mkdir -p $(BIN_DIR)
|
||||
$(MAKE) -f $(MAKEFILE_NAME) $(PROJECT)
|
||||
|
||||
pawn_make: $(OBJ_LINUX)
|
||||
$(CPP) $(INCLUDE) $(CFLAGS) -m32 $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
||||
|
||||
debug:
|
||||
$(MAKE) all DEBUG=true
|
||||
$(PROJECT): $(OBJ_BIN)
|
||||
$(CPP) $(INCLUDE) $(OBJ_BIN) $(LINK) -o $(BIN_DIR)/$(BINARY)
|
||||
|
||||
default: all
|
||||
|
||||
clean:
|
||||
rm -rf Release32/*.o
|
||||
rm -rf Release32/$(BINARY)
|
||||
rm -rf Release64/*.o
|
||||
rm -rf Release64/$(BINARY)
|
||||
rm -rf $(BIN_DIR)/*.o
|
||||
rm -f $(BIN_DIR)/$(BINARY)
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amx.h 3736 2008-08-16 20:13:12Z damagedsoul $
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@ -33,7 +33,7 @@
|
||||
#if defined FREEBSD && !defined __FreeBSD__
|
||||
#define __FreeBSD__
|
||||
#endif
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#include <sclinux.h>
|
||||
#endif
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
#if defined HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#if defined __LCC__ || defined __DMC__ || defined LINUX
|
||||
#if defined __LCC__ || defined __DMC__ || defined LINUX || defined __APPLE__
|
||||
#if defined HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
@ -197,7 +197,7 @@ typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx);
|
||||
#endif
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
@ -425,7 +425,7 @@ int AMXAPI amx_UTF8Put(char *string, char **endptr, int maxchars, cell value);
|
||||
amx_Register((amx), amx_NativeInfo((name),(func)), 1);
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack() /* reset default packing */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=reset
|
||||
|
@ -21,7 +21,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: amxdbg.h 3736 2008-08-16 20:13:12Z damagedsoul $
|
||||
*/
|
||||
|
||||
#ifndef AMXDBG_H_INCLUDED
|
||||
@ -49,7 +49,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
@ -156,7 +156,7 @@ int AMXAPI dbg_GetArrayDim(AMX_DBG *amxdbg, const AMX_DBG_SYMBOL *sym, const AMX
|
||||
|
||||
|
||||
#if !defined AMX_NO_ALIGN
|
||||
#if defined LINUX || defined __FreeBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __APPLE__
|
||||
#pragma pack() /* reset default packing */
|
||||
#elif defined MACOS && defined __MWERKS__
|
||||
#pragma options align=reset
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: dllmain.c 1724 2005-07-24 20:00:55Z dvander $
|
||||
*/
|
||||
|
||||
#if defined _UNICODE || defined __UNICODE__ || defined UNICODE
|
||||
|
@ -20,7 +20,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: libpawnc.c 2969 2006-08-25 00:28:36Z dvander $
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
#if defined PAWNC_DLL
|
||||
|
||||
#ifndef __linux__
|
||||
#if !defined(__linux__) && !defined(__APPLE__)
|
||||
#include "dllmain.c"
|
||||
#endif
|
||||
|
||||
@ -39,9 +39,6 @@
|
||||
# define UNUSED_PARAM(p) ((void)(p))
|
||||
# endif
|
||||
|
||||
static char *argv[MAX_ARGS];
|
||||
static int argc;
|
||||
|
||||
#if PAWN_CELL_SIZE==32
|
||||
#define EXCOMPILER Compile32
|
||||
#else
|
||||
|
@ -1,24 +1,18 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpc300", "libpc300.vcproj", "{19B72687-080B-437A-917A-12AEB0031635}"
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpc300", "libpc300.vcxproj", "{19B72687-080B-437A-917A-12AEB0031635}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug32|Win32 = Debug32|Win32
|
||||
Debug64|Win32 = Debug64|Win32
|
||||
Release32|Win32 = Release32|Win32
|
||||
Release64|Win32 = Release64|Win32
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Debug32|Win32.ActiveCfg = Debug32|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Debug32|Win32.Build.0 = Debug32|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Release32|Win32.ActiveCfg = Release32|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Release32|Win32.Build.0 = Release32|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{19B72687-080B-437A-917A-12AEB0031635}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1,443 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="libpc300"
|
||||
ProjectGUID="{19B72687-080B-437A-917A-12AEB0031635}"
|
||||
RootNamespace="libpc300"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release32|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBPC300_EXPORTS;PAWNC_DLL;PAWN_CELL_SIZE=32;NO_MAIN;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/amxxpc32.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/libpc300.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release64|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBPC300_EXPORTS;PAWNC_DLL;PAWN_CELL_SIZE=64;NO_MAIN;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/amxxpc64.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/libpc300.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug32|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBPC300_EXPORTS;PAWNC_DLL;PAWN_CELL_SIZE=32;NO_MAIN;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="1"
|
||||
RuntimeLibrary="1"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/amxxpc32.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/libpc300.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/libpc300.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug64|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBPC300_EXPORTS;PAWNC_DLL;PAWN_CELL_SIZE=64;NO_MAIN;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="1"
|
||||
RuntimeLibrary="1"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/amxxpc64.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/libpc300.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/libpc300.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\libpawnc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\memfile.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc3.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc4.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc6.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc7.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scexpand.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sci18n.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sclist.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scmemfil.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scstate.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scvars.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\amx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\memfile.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\libpawnc.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc5.scp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sc7.scp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
124
compiler/libpc300/libpc300.vcxproj
Normal file
124
compiler/libpc300/libpc300.vcxproj
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{19B72687-080B-437A-917A-12AEB0031635}</ProjectGuid>
|
||||
<RootNamespace>libpc300</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">amxxpc32</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">amxxpc32</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBPC300_EXPORTS;PAWNC_DLL;PAWN_CELL_SIZE=32;NO_MAIN;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>$(OutDir)libpc300.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBPC300_EXPORTS;PAWNC_DLL;PAWN_CELL_SIZE=32;NO_MAIN;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>StackFrameRuntimeCheck</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)libpc300.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<ImportLibrary>$(OutDir)libpc300.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="libpawnc.c" />
|
||||
<ClCompile Include="memfile.c" />
|
||||
<ClCompile Include="sc1.c" />
|
||||
<ClCompile Include="sc2.c" />
|
||||
<ClCompile Include="sc3.c" />
|
||||
<ClCompile Include="sc4.c" />
|
||||
<ClCompile Include="sc5.c" />
|
||||
<ClCompile Include="sc6.c" />
|
||||
<ClCompile Include="sc7.c" />
|
||||
<ClCompile Include="scexpand.c" />
|
||||
<ClCompile Include="sci18n.c" />
|
||||
<ClCompile Include="sclist.c" />
|
||||
<ClCompile Include="scmemfil.c" />
|
||||
<ClCompile Include="scstate.c" />
|
||||
<ClCompile Include="scvars.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="amx.h" />
|
||||
<ClInclude Include="memfile.h" />
|
||||
<ClInclude Include="sc.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="libpawnc.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="sc5.scp" />
|
||||
<None Include="sc7.scp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
88
compiler/libpc300/libpc300.vcxproj.filters
Normal file
88
compiler/libpc300/libpc300.vcxproj.filters
Normal file
@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="libpawnc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="memfile.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc1.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc3.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc4.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc5.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc6.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc7.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="scexpand.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sci18n.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sclist.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="scmemfil.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="scstate.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="scvars.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="amx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="memfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="libpawnc.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="sc5.scp">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="sc7.scp">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -10,6 +10,7 @@ memfile_t *memfile_creat(const char *name, size_t init)
|
||||
mf.size = init;
|
||||
mf.base = (char *)malloc(init);
|
||||
mf.usedoffs = 0;
|
||||
mf.name = NULL;
|
||||
if (!mf.base)
|
||||
{
|
||||
return NULL;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct memfile_s
|
||||
{
|
||||
|
@ -41,6 +41,10 @@
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if defined __APPLE__
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* Linux NOW has these */
|
||||
#if !defined BIG_ENDIAN
|
||||
#define BIG_ENDIAN 4321
|
||||
|
@ -20,7 +20,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: pawncc.c 1724 2005-07-24 20:00:55Z dvander $
|
||||
*/
|
||||
#include "sc.h"
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: sc.h 3460 2007-04-24 13:36:36Z sawce $
|
||||
*/
|
||||
#ifndef SC_H_INCLUDED
|
||||
#define SC_H_INCLUDED
|
||||
@ -63,7 +63,7 @@
|
||||
#define PREPROC_TERM '\x7f'/* termination character for preprocessor expressions (the "DEL" code) */
|
||||
#define sDEF_PREFIX "default.inc" /* default prefix filename */
|
||||
|
||||
#if defined WIN32
|
||||
#if defined WIN32 || defined __clang__
|
||||
#define INVISIBLE
|
||||
#else
|
||||
#define INVISIBLE __attribute__((visibility("protected")))
|
||||
|
@ -20,7 +20,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: sc1.c 3460 2007-04-24 13:36:36Z sawce $
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
@ -35,9 +35,10 @@
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#include <sclinux.h>
|
||||
#include <prefix.h> /* from BinReloc, see www.autopackage.org */
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined FORTIFY
|
||||
@ -421,7 +422,7 @@ int pc_compile(int argc, char *argv[])
|
||||
void *inpfmark;
|
||||
int lcl_packstr,lcl_needsemicolon,lcl_tabsize;
|
||||
#if !defined SC_LIGHT
|
||||
int hdrsize;
|
||||
int hdrsize=0;
|
||||
#endif
|
||||
|
||||
/* set global variables to their initial value */
|
||||
@ -1248,9 +1249,9 @@ static void setconfig(char *root)
|
||||
/* add the default "include" directory */
|
||||
#if defined __WIN32__ || defined _WIN32
|
||||
GetModuleFileName(NULL,path,_MAX_PATH);
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#elif defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
/* see www.autopackage.org for the BinReloc module */
|
||||
ptr = SELFPATH;
|
||||
ptr = (char *)SELFPATH;
|
||||
if (!ptr)
|
||||
ptr = root;
|
||||
strncpy(path,ptr,sizeof path);
|
||||
@ -1922,7 +1923,7 @@ static int declloc(int fstatic)
|
||||
int dim[sDIMEN_MAX];
|
||||
int numdim;
|
||||
int fconst;
|
||||
int staging_start;
|
||||
int staging_start=0;
|
||||
|
||||
fconst=matchtoken(tCONST);
|
||||
do {
|
||||
@ -1948,7 +1949,7 @@ static int declloc(int fstatic)
|
||||
* level might indicate a bug.
|
||||
* NOTE - don't bother with the error if there's no valid function!
|
||||
*/
|
||||
if ((sym=findloc(name))!=NULL && sym->compound!=nestlevel || findglb(name)!=NULL)
|
||||
if (((sym=findloc(name))!=NULL && sym->compound!=nestlevel) || findglb(name)!=NULL)
|
||||
if (curfunc!=NULL && (curfunc->usage & uNATIVE))
|
||||
error(219,name); /* variable shadows another symbol */
|
||||
while (matchtoken('[')){
|
||||
@ -2863,7 +2864,7 @@ static int operatoradjust(int opertok,symbol *sym,char *opername,int resulttag)
|
||||
error(62); /* number or placement of the operands does not fit the operator */
|
||||
} /* switch */
|
||||
|
||||
if (tags[0]==0 && (opertok!='=' && tags[1]==0 || opertok=='=' && resulttag==0))
|
||||
if (tags[0]==0 && ((opertok!='=' && tags[1]==0) || (opertok=='=' && resulttag==0)))
|
||||
error(64); /* cannot change predefined operators */
|
||||
|
||||
/* change the operator name */
|
||||
@ -3045,7 +3046,7 @@ static void funcstub(int native)
|
||||
|
||||
tok=lex(&val,&str);
|
||||
if (native) {
|
||||
if (tok==tPUBLIC || tok==tSTOCK || tok==tSTATIC || tok==tSYMBOL && *str==PUBLIC_CHAR)
|
||||
if (tok==tPUBLIC || tok==tSTOCK || tok==tSTATIC || (tok==tSYMBOL && *str==PUBLIC_CHAR))
|
||||
error(42); /* invalid combination of class specifiers */
|
||||
} else {
|
||||
if (tok==tPUBLIC || tok==tSTOCK || tok==tSTATIC)
|
||||
@ -3166,7 +3167,7 @@ static int newfunc(char *firstname,int firsttag,int fpublic,int fstatic,int stoc
|
||||
tag= (firsttag>=0) ? firsttag : pc_addtag(NULL);
|
||||
tok=lex(&val,&str);
|
||||
assert(!fpublic);
|
||||
if (tok==tNATIVE || tok==tPUBLIC && stock)
|
||||
if (tok==tNATIVE || (tok==tPUBLIC && stock))
|
||||
error(42); /* invalid combination of class specifiers */
|
||||
if (tok==tOPERATOR) {
|
||||
opertok=operatorname(symbolname);
|
||||
@ -3512,7 +3513,7 @@ static int declargs(symbol *sym)
|
||||
error(10); /* illegal function or declaration */
|
||||
} /* switch */
|
||||
} while (tok=='&' || tok==tLABEL || tok==tCONST
|
||||
|| tok!=tELLIPS && matchtoken(',')); /* more? */
|
||||
|| (tok!=tELLIPS && matchtoken(','))); /* more? */
|
||||
/* if the next token is not ",", it should be ")" */
|
||||
needtoken(')');
|
||||
} /* if */
|
||||
@ -3873,7 +3874,7 @@ static void make_report(symbol *root,FILE *log,char *sourcefile)
|
||||
continue;
|
||||
if ((sym->usage & uREAD)==0)
|
||||
continue;
|
||||
fprintf(log,"\t\t<member name=\"T:%s\" value=\"%ld\">\n",funcdisplayname(symname,sym->name),sym->addr);
|
||||
fprintf(log,"\t\t<member name=\"T:%s\" value=\"%ld\">\n",funcdisplayname(symname,sym->name),(long)sym->addr);
|
||||
if (sym->tag!=0) {
|
||||
tagsym=find_tag_byval(sym->tag);
|
||||
assert(tagsym!=NULL);
|
||||
@ -3883,7 +3884,7 @@ static void make_report(symbol *root,FILE *log,char *sourcefile)
|
||||
if ((enumroot=sym->dim.enumlist)!=NULL) {
|
||||
enumroot=enumroot->next; /* skip root */
|
||||
while (enumroot!=NULL) {
|
||||
fprintf(log,"\t\t\t<member name=\"C:%s\" value=\"%ld\">\n",funcdisplayname(symname,enumroot->name),enumroot->value);
|
||||
fprintf(log,"\t\t\t<member name=\"C:%s\" value=\"%ld\">\n",funcdisplayname(symname,enumroot->name),(long)enumroot->value);
|
||||
/* find the constant with this name and get the tag */
|
||||
ref=findglb(enumroot->name);
|
||||
if (ref!=NULL) {
|
||||
@ -3919,7 +3920,7 @@ static void make_report(symbol *root,FILE *log,char *sourcefile)
|
||||
continue;
|
||||
if ((sym->usage & uREAD)==0 || (sym->usage & (uENUMFIELD | uENUMROOT))!=0)
|
||||
continue;
|
||||
fprintf(log,"\t\t<member name=\"C:%s\" value=\"%ld\">\n",funcdisplayname(symname,sym->name),sym->addr);
|
||||
fprintf(log,"\t\t<member name=\"C:%s\" value=\"%ld\">\n",funcdisplayname(symname,sym->name),(long)sym->addr);
|
||||
if (sym->tag!=0) {
|
||||
tagsym=find_tag_byval(sym->tag);
|
||||
assert(tagsym!=NULL);
|
||||
@ -4039,7 +4040,7 @@ static void make_report(symbol *root,FILE *log,char *sourcefile)
|
||||
for (arg=0; sym->dim.arglist[arg].ident!=0; arg++) {
|
||||
int dim,paraminfo;
|
||||
char *outer_start,*inner_start;
|
||||
int outer_length,inner_length;
|
||||
int outer_length=0,inner_length=0;
|
||||
if (sym->dim.arglist[arg].ident==iVARARGS)
|
||||
fprintf(log,"\t\t\t<param name=\"...\">\n");
|
||||
else
|
||||
@ -5248,7 +5249,7 @@ static void doreturn(void)
|
||||
if ((rettype & uRETVALUE)!=0) {
|
||||
int retarray=(ident==iARRAY || ident==iREFARRAY);
|
||||
/* there was an earlier "return" statement in this function */
|
||||
if (sub==NULL && retarray || sub!=NULL && !retarray)
|
||||
if ((sub==NULL && retarray) || (sub!=NULL && !retarray))
|
||||
error(79); /* mixing "return array;" and "return value;" */
|
||||
} /* if */
|
||||
rettype|=uRETVALUE; /* function returns a value */
|
||||
@ -5257,7 +5258,7 @@ static void doreturn(void)
|
||||
if (!matchtag(curfunc->tag,tag,TRUE))
|
||||
error(213); /* tagname mismatch */
|
||||
if (ident==iARRAY || ident==iREFARRAY) {
|
||||
int dim[sDIMEN_MAX],numdim;
|
||||
int dim[sDIMEN_MAX],numdim=0;
|
||||
cell arraysize;
|
||||
assert(sym!=NULL);
|
||||
if (sub!=NULL) {
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: sc2.c 3318 2007-02-16 18:49:21Z sawce $
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
@ -27,7 +27,7 @@
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include "sc.h"
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#include <sclinux.h>
|
||||
#endif
|
||||
|
||||
@ -198,7 +198,7 @@ SC_FUNC int plungefile(char *name,int try_currentpath,int try_includepaths)
|
||||
char path[_MAX_PATH];
|
||||
strncpy(path,ptr,sizeof path);
|
||||
path[sizeof path - 1]='\0'; /* force '\0' termination */
|
||||
strncat(path,name,sizeof(path)-strlen(path));
|
||||
strncat(path,name,sizeof(path) - strlen(path) - 1);
|
||||
path[sizeof path - 1]='\0';
|
||||
result=plungequalifiedfile(path);
|
||||
} /* while */
|
||||
@ -408,7 +408,7 @@ static void stripcom(unsigned char *line)
|
||||
#if !defined SC_LIGHT
|
||||
/* collect the comment characters in a string */
|
||||
if (icomment==2) {
|
||||
if (skipstar && (*line!='\0' && *line<=' ' || *line=='*')) {
|
||||
if (skipstar && ((*line!='\0' && *line<=' ') || *line=='*')) {
|
||||
/* ignore leading whitespace and '*' characters */
|
||||
} else if (commentidx<COMMENT_LIMIT+COMMENT_MARGIN-1) {
|
||||
comment[commentidx++]=(char)((*line!='\n') ? *line : ' ');
|
||||
@ -585,22 +585,9 @@ static int htoi(cell *val,const unsigned char *curptr)
|
||||
}
|
||||
|
||||
#if defined __GNUC__
|
||||
static double pow10(int value)
|
||||
static double pow10(double d)
|
||||
{
|
||||
double res=1.0;
|
||||
while (value>=4) {
|
||||
res*=10000.0;
|
||||
value-=5;
|
||||
} /* while */
|
||||
while (value>=2) {
|
||||
res*=100.0;
|
||||
value-=2;
|
||||
} /* while */
|
||||
while (value>=1) {
|
||||
res*=10.0;
|
||||
value-=1;
|
||||
} /* while */
|
||||
return res;
|
||||
return pow(10, d);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1210,7 +1197,7 @@ static int command(void)
|
||||
sym=findloc(str);
|
||||
if (sym==NULL)
|
||||
sym=findglb(str);
|
||||
if (sym==NULL || sym->ident!=iFUNCTN && sym->ident!=iREFFUNC && (sym->usage & uDEFINE)==0) {
|
||||
if (sym==NULL || (sym->ident!=iFUNCTN && sym->ident!=iREFFUNC && (sym->usage & uDEFINE)==0)) {
|
||||
error(17,str); /* undefined symbol */
|
||||
} else {
|
||||
outval(sym->addr,FALSE);
|
||||
@ -1644,7 +1631,7 @@ static void substallpatterns(unsigned char *line,int buffersize)
|
||||
if (strncmp((char*)start,"defined",7)==0 && !isalpha((char)*(start+7))) {
|
||||
start+=7; /* skip "defined" */
|
||||
/* skip white space & parantheses */
|
||||
while (*start<=' ' && *start!='\0' || *start=='(')
|
||||
while ((*start<=' ' && *start!='\0') || *start=='(')
|
||||
start++;
|
||||
/* skip the symbol behind it */
|
||||
while (isalpha(*start) || isdigit(*start) || *start=='_')
|
||||
@ -1946,7 +1933,7 @@ SC_FUNC int lex(cell *lexvalue,char **lexsym)
|
||||
error(220);
|
||||
} /* if */
|
||||
} /* if */
|
||||
} else if (*lptr=='\"' || *lptr==sc_ctrlchar && *(lptr+1)=='\"')
|
||||
} else if (*lptr=='\"' || (*lptr==sc_ctrlchar && *(lptr+1)=='\"'))
|
||||
{ /* unpacked string literal */
|
||||
_lextok=tSTRING;
|
||||
stringflags= (*lptr==sc_ctrlchar) ? RAWMODE : 0;
|
||||
@ -1959,9 +1946,9 @@ SC_FUNC int lex(cell *lexvalue,char **lexsym)
|
||||
lptr+=1; /* skip final quote */
|
||||
else
|
||||
error(37); /* invalid (non-terminated) string */
|
||||
} else if (*lptr=='!' && *(lptr+1)=='\"'
|
||||
|| *lptr=='!' && *(lptr+1)==sc_ctrlchar && *(lptr+2)=='\"'
|
||||
|| *lptr==sc_ctrlchar && *(lptr+1)=='!' && *(lptr+2)=='\"')
|
||||
} else if ((*lptr=='!' && *(lptr+1)=='\"')
|
||||
|| (*lptr=='!' && *(lptr+1)==sc_ctrlchar && *(lptr+2)=='\"')
|
||||
|| (*lptr==sc_ctrlchar && *(lptr+1)=='!' && *(lptr+2)=='\"'))
|
||||
{ /* packed string literal */
|
||||
_lextok=tSTRING;
|
||||
stringflags= (*lptr==sc_ctrlchar || *(lptr+1)==sc_ctrlchar) ? RAWMODE : 0;
|
||||
@ -2053,7 +2040,7 @@ SC_FUNC int matchtoken(int token)
|
||||
int tok;
|
||||
|
||||
tok=lex(&val,&str);
|
||||
if (tok==token || token==tTERM && (tok==';' || tok==tENDEXPR)) {
|
||||
if (tok==token || (token==tTERM && (tok==';' || tok==tENDEXPR))) {
|
||||
return 1;
|
||||
} else if (!sc_needsemicolon && token==tTERM && (_lexnewline || !freading)) {
|
||||
/* Push "tok" back, because it is the token following the implicit statement
|
||||
@ -2418,7 +2405,7 @@ SC_FUNC void delete_symbols(symbol *root,int level,int delete_labels,int delete_
|
||||
{
|
||||
symbol *sym,*parent_sym;
|
||||
constvalue *stateptr;
|
||||
int mustdelete;
|
||||
int mustdelete=0;
|
||||
|
||||
/* erase only the symbols with a deeper nesting level than the
|
||||
* specified nesting level */
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: sc3.c 3522 2007-05-22 01:29:18Z sawce $
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
@ -929,7 +929,7 @@ static int hier14(value *lval1)
|
||||
} /* if */
|
||||
if (lval3.sym->dim.array.level!=level)
|
||||
return error(48); /* array dimensions must match */
|
||||
else if (ltlength<val || exactmatch && ltlength>val || val==0)
|
||||
else if (ltlength<val || (exactmatch && ltlength>val) || val==0)
|
||||
return error(47); /* array sizes must match */
|
||||
else if (lval3.ident!=iARRAYCELL && !matchtag(lval3.sym->x.idxtag,idxtag,TRUE))
|
||||
error(229,(lval2.sym!=NULL) ? lval2.sym->name : lval3.sym->name); /* index tag mismatch */
|
||||
@ -1124,7 +1124,7 @@ static int hier2(value *lval)
|
||||
int tag,paranthese;
|
||||
cell val;
|
||||
char *st;
|
||||
symbol *sym;
|
||||
symbol *sym=NULL;
|
||||
int saveresult;
|
||||
|
||||
tok=lex(&val,&st);
|
||||
@ -1247,7 +1247,7 @@ static int hier2(value *lval)
|
||||
lval->constval=1; /* preset */
|
||||
if (sym->ident==iARRAY || sym->ident==iREFARRAY) {
|
||||
int level;
|
||||
symbol *idxsym;
|
||||
symbol *idxsym=NULL;
|
||||
for (level=0; matchtoken('['); level++) {
|
||||
idxsym=NULL;
|
||||
if (level==sym->dim.array.level && matchtoken(tSYMBOL)) {
|
||||
@ -1293,7 +1293,7 @@ static int hier2(value *lval)
|
||||
} /* if */
|
||||
if (sym->ident==iARRAY || sym->ident==iREFARRAY) {
|
||||
int level;
|
||||
symbol *idxsym;
|
||||
symbol *idxsym=NULL;
|
||||
for (level=0; matchtoken('['); level++) {
|
||||
idxsym=NULL;
|
||||
if (level==sym->dim.array.level && matchtoken(tSYMBOL)) {
|
||||
@ -1462,7 +1462,7 @@ restart:
|
||||
} /* if */
|
||||
if (close==']') {
|
||||
/* normal array index */
|
||||
if (lval2.constval<0 || sym->dim.array.length!=0 && sym->dim.array.length<=lval2.constval)
|
||||
if (lval2.constval<0 || (sym->dim.array.length!=0 && sym->dim.array.length<=lval2.constval))
|
||||
error(32,sym->name); /* array index out of bounds */
|
||||
if (lval2.constval!=0) {
|
||||
/* don't add offsets for zero subscripts */
|
||||
@ -1479,8 +1479,8 @@ restart:
|
||||
} /* if */
|
||||
} else {
|
||||
/* character index */
|
||||
if (lval2.constval<0 || sym->dim.array.length!=0
|
||||
&& sym->dim.array.length*((8*sizeof(cell))/sCHARBITS)<=(ucell)lval2.constval)
|
||||
if (lval2.constval<0 || (sym->dim.array.length!=0
|
||||
&& sym->dim.array.length*((8*sizeof(cell))/sCHARBITS)<=(ucell)lval2.constval))
|
||||
error(32,sym->name); /* array index out of bounds */
|
||||
if (lval2.constval!=0) {
|
||||
/* don't add offsets for zero subscripts */
|
||||
@ -2035,8 +2035,8 @@ static int nesting=0;
|
||||
* function argument; a literal string may be smaller than
|
||||
* the function argument.
|
||||
*/
|
||||
if (lval.constval>0 && arg[argidx].dim[0]!=lval.constval
|
||||
|| lval.constval<0 && arg[argidx].dim[0] < -lval.constval)
|
||||
if ((lval.constval>0 && arg[argidx].dim[0]!=lval.constval)
|
||||
|| (lval.constval<0 && arg[argidx].dim[0] < -lval.constval))
|
||||
error(47); /* array sizes must match */
|
||||
} /* if */
|
||||
} /* if */
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: sc4.c 1724 2005-07-24 20:00:55Z dvander $
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
@ -235,7 +235,7 @@ SC_FUNC void begdseg(void)
|
||||
|
||||
SC_FUNC void setline(int chkbounds)
|
||||
{
|
||||
if ((sc_debug & sSYMBOLIC)!=0 || chkbounds && (sc_debug & sCHKBOUNDS)!=0) {
|
||||
if ((sc_debug & sSYMBOLIC)!=0 || (chkbounds && (sc_debug & sCHKBOUNDS)!=0)) {
|
||||
/* generate a "break" (start statement) opcode rather than a "line" opcode
|
||||
* because earlier versions of Small/Pawn have an incompatible version of the
|
||||
* line opcode
|
||||
@ -719,7 +719,7 @@ SC_FUNC void ffcall(symbol *sym,const char *label,int numargs)
|
||||
stgwrite(sym->name);
|
||||
} /* if */
|
||||
if (sc_asmfile
|
||||
&& (label!=NULL || !isalpha(sym->name[0]) && sym->name[0]!='_' && sym->name[0]!=sc_ctrlchar))
|
||||
&& (label!=NULL || (!isalpha(sym->name[0]) && sym->name[0]!='_' && sym->name[0]!=sc_ctrlchar)))
|
||||
{
|
||||
stgwrite("\t; ");
|
||||
stgwrite(symname);
|
||||
|
@ -19,13 +19,13 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: sc5.c 1724 2005-07-24 20:00:55Z dvander $
|
||||
*/
|
||||
#include <assert.h>
|
||||
#if defined __WIN32__ || defined _WIN32 || defined __MSDOS__
|
||||
#include <io.h>
|
||||
#endif
|
||||
#if defined LINUX || defined __GNUC__
|
||||
#if defined LINUX || defined __APPLE__ || defined __GNUC__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
@ -132,7 +132,7 @@ static short lastfile;
|
||||
} /* if */
|
||||
va_end(argptr);
|
||||
|
||||
if (number>=100 && number<200 || errnum>25){
|
||||
if ((number>=100 && number<200) || errnum>25){
|
||||
if (strlen(errfname)==0) {
|
||||
va_start(argptr,number);
|
||||
pc_error(0,"\nCompilation aborted.",NULL,0,0,argptr);
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: sc5.scp 2167 2005-11-19 09:16:27Z dvander $
|
||||
*/
|
||||
|
||||
SC_FUNC int strexpand(char *dest, unsigned char *source, int maxlen, unsigned char pairtable[128][2]);
|
||||
|
@ -18,7 +18,7 @@
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id$
|
||||
* Version: $Id: sc6.c 2018 2005-09-06 21:34:33Z dvander $
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
@ -30,7 +30,7 @@
|
||||
#endif
|
||||
#include "sc.h"
|
||||
#include "amxdbg.h"
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#include <sclinux.h>
|
||||
#endif
|
||||
|
||||
@ -895,7 +895,7 @@ SC_FUNC int assemble(FILE *fout,FILE *fin)
|
||||
instr=skipwhitespace(line);
|
||||
/* ignore empty lines and labels (labels have a special syntax, so these
|
||||
* must be parsed separately) */
|
||||
if (*instr=='\0' || tolower(*instr)=='l' && *(instr+1)=='.')
|
||||
if (*instr=='\0' || (tolower(*instr)=='l' && *(instr+1)=='.'))
|
||||
continue;
|
||||
/* get to the end of the instruction (make use of the '\n' that fgets()
|
||||
* added at the end of the line; this way we will *always* drop on a
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user