Fix #11 issues with Linux build

This commit is contained in:
dgis 2020-03-04 08:30:01 +01:00
parent 7a32d6ad85
commit 3187a1fe49
6 changed files with 51 additions and 9 deletions

View file

@ -4,7 +4,7 @@
* This file is part of Emu48
*
* Copyright (C) 2005 CdB for HP
* Copyright (C) 2006 Christoph Gießelink
* Copyright (C) 2006 Christoph Gie<EFBFBD>elink
*
*/
#include "pch.h"
@ -20,7 +20,7 @@
#pragma intrinsic(memset,memcpy)
#include "Ops.h"
#include "ops.h"
//
// ROM buffer access functions

View file

@ -73,7 +73,7 @@ static DWORD dwOldCyc; // cpu cycles at last event
static DWORD dwSpeedRef; // timer value at last event
static DWORD dwTickRef; // sample timer ticks
#include "Ops.h"
#include "ops.h"
// save last instruction in circular instruction buffer
static __inline VOID SaveInstrAddr(DWORD dwAddr)

View file

@ -9,7 +9,7 @@
#include "pch.h"
#include "Emu48.h"
#include "ops.h"
#include "opcodes.h"
#include "Opcodes.h"
#include "io.h"
#include "i28f160.h" // flash support

View file

@ -4,7 +4,7 @@
* This file is part of Emu48
*
* Copyright (C) 1995 Sebastien Carlier
* Copyright (C) 1999 Christoph Gießelink
* Copyright (C) 1999 Christoph Gie<EFBFBD>elink
*
*/
#include "pch.h"
@ -25,7 +25,7 @@
#pragma intrinsic(memset,memcpy)
#include "Ops.h"
#include "ops.h"
// Fields start and length
UINT F_s[16] = {0/*P*/,0,2,0,15,3,0,0,0,0,0,0,0,0,0,0};

View file

@ -2981,14 +2981,54 @@ void _wmakepath(wchar_t _Buffer, wchar_t const* _Drive, wchar_t const* _Dir, wch
int WINAPI wvsprintf(LPSTR arg1, LPCSTR arg2, va_list arglist) {
return vsprintf(arg1, arg2, arglist);
}
DWORD GetFullPathName(LPCSTR lpFileName, DWORD nBufferLength, LPSTR lpBuffer, LPSTR* lpFilePart) { return 0; }
const char pathSeparator =
#ifdef _WIN32
'\\';
#else
'/';
#endif
DWORD GetFullPathName(LPCSTR lpFileName, DWORD nBufferLength, LPSTR lpBuffer, LPSTR* lpFilePart) {
lstrcpyn(lpBuffer, lpFileName, nBufferLength);
if(lpFilePart != NULL) {
*lpFilePart = strrchr(lpBuffer, pathSeparator);
if(*lpFilePart != NULL)
(*lpFilePart)++;
}
return lstrlen(lpBuffer);
}
LPSTR lstrcpyn(LPSTR lpString1, LPCSTR lpString2,int iMaxLength) {
return strcpy(lpString1, lpString2);
}
LPSTR lstrcat(LPSTR lpString1, LPCSTR lpString2) {
return NULL;
return strcat(lpString1, lpString2);
}
void __cdecl _splitpath(const char * _FullPath, char* _Drive, char* _Dir, char* _Filename, char* _Ext) {
if (_Drive)
_Drive[0] = 0;
char * filePart = strrchr(_FullPath, pathSeparator);
if(_Dir) {
if(filePart != NULL) {
strncpy(_Dir, _FullPath, (int)(filePart - _FullPath));
} else
_Dir[0] = 0;
}
if(_Filename) {
if(filePart != NULL) {
strcpy(_Filename, filePart + 1);
} else
_Filename[0] = 0;
}
if(_Ext) {
_Ext[0] = 0;
if(_Filename) {
char * extPart = strrchr(_Filename, '.');
if (extPart != NULL) {
strcpy(_Ext, extPart + 1);
}
}
}
}
void __cdecl _splitpath(char const* _FullPath, char* _Drive, char* _Dir, char* _Filename, char* _Ext) {}
int WINAPI lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {
return strcmp(lpString1, lpString2);
}

View file

@ -51,6 +51,8 @@ public class PrinterSimulator {
} catch(Exception ex) {
Log.d(TAG, "Cannot get the MaximumTextureSize (Set default to 2048). Error: " + ex.getMessage());
}
if(maxBitmapHeight == 0)
maxBitmapHeight = 1024;
maxBitmapHeight = Math.min(maxBitmapHeight, 8192); //32768);
MAXPRTLINES = maxBitmapHeight / LINE_HEIGHT;