From dc91b226350de7f0c51484ac66c0b6b359a5dadb Mon Sep 17 00:00:00 2001 From: GravisZro Date: Thu, 23 May 2024 20:53:51 -0400 Subject: [PATCH] Fix rebase breakage --- 2dlib/surface.cpp | 8 ++++---- czip/BitIO.cpp | 6 +++--- ddebug/windebug.cpp | 6 +++--- legacy/briefinglocalizer/briefinglocalizerDlg.cpp | 2 +- legacy/editor/DallasMainDlg.cpp | 4 ++-- legacy/editor/ScriptCompilerAPI.cpp | 4 ++-- legacy/editor/ScriptMassCompile.cpp | 4 ++-- legacy/renderer/opengl.cpp | 2 +- lib/CZip.h | 3 ++- linux/linux_fix.h | 2 ++ scripts/DallasFuncs.cpp | 1 + scripts/generic.cpp | 8 ++++---- scripts/linux_lib.h | 2 +- 13 files changed, 28 insertions(+), 24 deletions(-) diff --git a/2dlib/surface.cpp b/2dlib/surface.cpp index 9f81bbc5..1e9dccfd 100644 --- a/2dlib/surface.cpp +++ b/2dlib/surface.cpp @@ -563,8 +563,8 @@ void grSurface::xlat8_16(char *data, int w, int h, char *pal) { sptr = (char *)data; rowsize_w = m_DataRowsize / 2; - height = SET_MIN(h, ddsfObj.h); - width = SET_MIN(w, ddsfObj.w); + height = std::min(h, ddsfObj.h); + width = std::min(w, ddsfObj.w); for (row = 0; row < height; row++) { for (col = 0; col < width; col++) { @@ -677,8 +677,8 @@ void grSurface::xlat24_16(char *data, int w, int h) { dptr = (uint16_t *)m_DataPtr; sptr = (char *)data; rowsize_w = m_DataRowsize / 2; - height = SET_MIN(h, ddsfObj.h); - width = SET_MIN(w, ddsfObj.w); + height = std::min(h, ddsfObj.h); + width = std::min(w, ddsfObj.w); for (row = 0; row < height; row++) { scol = 0; diff --git a/czip/BitIO.cpp b/czip/BitIO.cpp index d74e668d..b0200a1c 100644 --- a/czip/BitIO.cpp +++ b/czip/BitIO.cpp @@ -173,9 +173,9 @@ int CZip::InputBit(BITFILE *bfile) { return (value ? 1 : 0); } -ulong CZip::InputBits(BITFILE *bfile, int bitcount) { - ulong mask; - ulong return_value; +uint32_t CZip::InputBits(BITFILE *bfile, int bitcount) { + uint32_t mask; + uint32_t return_value; mask = 1L << (bitcount - 1); return_value = 0; diff --git a/ddebug/windebug.cpp b/ddebug/windebug.cpp index 63c8eb56..5528f535 100644 --- a/ddebug/windebug.cpp +++ b/ddebug/windebug.cpp @@ -193,9 +193,9 @@ #include "mono.h" #include -#include -#include -#include +#include +#include +#include /////////////////////////////////////////////////////////////////////////////// diff --git a/legacy/briefinglocalizer/briefinglocalizerDlg.cpp b/legacy/briefinglocalizer/briefinglocalizerDlg.cpp index 39643557..7b2c6fb6 100644 --- a/legacy/briefinglocalizer/briefinglocalizerDlg.cpp +++ b/legacy/briefinglocalizer/briefinglocalizerDlg.cpp @@ -24,7 +24,7 @@ #include "briefinglocalizerDlg.h" #ifdef __LINUX__ -#include "linux/linux_fix.h" +#include "linux_fix.h" #endif #include diff --git a/legacy/editor/DallasMainDlg.cpp b/legacy/editor/DallasMainDlg.cpp index 5cfc320b..f859b1fc 100644 --- a/legacy/editor/DallasMainDlg.cpp +++ b/legacy/editor/DallasMainDlg.cpp @@ -370,8 +370,8 @@ void OutToFile(char *format, ...) if(CurrentOutputFile==NULL) return; va_list marker; - va_start(marker,format); - vsprintf(buffer,format,marker); + va_start(marker,format); + std::vsprintf(buffer,format,marker); cf_WriteString(CurrentOutputFile,buffer); va_end(marker); } diff --git a/legacy/editor/ScriptCompilerAPI.cpp b/legacy/editor/ScriptCompilerAPI.cpp index 809061f4..ba442aef 100644 --- a/legacy/editor/ScriptCompilerAPI.cpp +++ b/legacy/editor/ScriptCompilerAPI.cpp @@ -332,8 +332,8 @@ void outputtofile(char *format, ...) { char buffer[1024]; va_list marker; - va_start(marker,format); - vsprintf(buffer,format,marker); + va_start(marker,format); + std::vsprintf(buffer,format,marker); cf_WriteString(CurrentFile,buffer); va_end(marker); } diff --git a/legacy/editor/ScriptMassCompile.cpp b/legacy/editor/ScriptMassCompile.cpp index 306a9956..ea340ef1 100644 --- a/legacy/editor/ScriptMassCompile.cpp +++ b/legacy/editor/ScriptMassCompile.cpp @@ -218,7 +218,7 @@ void writeline(char *format, ... ) char buffer[2048]; va_list marker; va_start(marker,format); - vsprintf(buffer,format,marker); + std::vsprintf(buffer,format,marker); va_end(marker); MassScriptEditContent += buffer; @@ -343,7 +343,7 @@ void CScriptMassCompile::SetStepText(int step,char *format,...) char buffer[1024]; va_list marker; va_start(marker,format); - vsprintf(buffer,format,marker); + std::vsprintf(buffer,format,marker); va_end(marker); CWnd *wnd; diff --git a/legacy/renderer/opengl.cpp b/legacy/renderer/opengl.cpp index d3bcbff4..f2d420a5 100644 --- a/legacy/renderer/opengl.cpp +++ b/legacy/renderer/opengl.cpp @@ -20,7 +20,7 @@ #include #include "ddraw.h" #elif defined(__LINUX__) -#include "linux/linux_fix.h" +#include "linux_fix.h" #include "lnxscreenmode.h" #else #endif diff --git a/lib/CZip.h b/lib/CZip.h index 6c79304c..af18710a 100644 --- a/lib/CZip.h +++ b/lib/CZip.h @@ -20,8 +20,9 @@ #define __CZIPFILE_H_ #include +#include #ifdef __LINUX__ -#include "linux/linux_fix.h" +#include "linux_fix.h" #endif #define OCF_VERSION 0x01 diff --git a/linux/linux_fix.h b/linux/linux_fix.h index fe3b3881..cb1f84a2 100644 --- a/linux/linux_fix.h +++ b/linux/linux_fix.h @@ -31,6 +31,8 @@ void *GlobalLock(HGLOBAL hMem); void Sleep(int millis); char *strupr(char *string); +#define _stat stat + // Replace missing defines from stdlib.h #define _MAX_PATH 260 /* max. length of full pathname*/ #define _MAX_FNAME 256 /* max. length of path component*/ diff --git a/scripts/DallasFuncs.cpp b/scripts/DallasFuncs.cpp index 65b2c10c..2272a3e1 100644 --- a/scripts/DallasFuncs.cpp +++ b/scripts/DallasFuncs.cpp @@ -708,6 +708,7 @@ * */ +#include #include #include #include diff --git a/scripts/generic.cpp b/scripts/generic.cpp index 91a50e1c..69371cf0 100644 --- a/scripts/generic.cpp +++ b/scripts/generic.cpp @@ -18,10 +18,10 @@ // generic.cpp // 0.1 -#include -#include -#include -#include +#include +#include +#include +#include #include "osiris_import.h" #include "osiris_common.h" diff --git a/scripts/linux_lib.h b/scripts/linux_lib.h index 7a01f8df..b8b3db50 100644 --- a/scripts/linux_lib.h +++ b/scripts/linux_lib.h @@ -22,7 +22,7 @@ #include #include #include -#include "linux/linux_fix.h" +#include "linux_fix.h" void _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext);