some aesthetics changes ^^
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1399 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
308b7915ff
commit
c7d66f2207
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define DLL_OPEN(x) LoadLibrary(x)
|
#define DLL_OPEN(x) LoadLibrary(x)
|
||||||
#define DLL_SYM(x,y,z) (FARPROC)x=GetProcAddress(y,z)
|
#define DLL_SYM(x,y,z) (FARPROC)(x) = GetProcAddress(y,z)
|
||||||
#define DLL_CLOSE(x) FreeLibrary(x)
|
#define DLL_CLOSE(x) FreeLibrary(x)
|
||||||
#define DLL HINSTANCE
|
#define DLL HINSTANCE
|
||||||
|
|
||||||
@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#define DLL_OPEN(x) dlopen(x,RTLD_NOW)
|
#define DLL_OPEN(x) dlopen(x,RTLD_NOW)
|
||||||
#define DLL_SYM(x,y,z) x=(void *)dlsym(y,z)
|
#define DLL_SYM(x,y,z) (x) = (void *)dlsym(y,z)
|
||||||
#define DLL_CLOSE(x) dlclose(x)
|
#define DLL_CLOSE(x) dlclose(x)
|
||||||
#define DLL void*
|
#define DLL void *
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -25,11 +25,11 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include "utils.h"
|
|
||||||
#include "grfio.h"
|
#include "grfio.h"
|
||||||
#include "mmo.h"
|
#include "../common/utils.h"
|
||||||
#include "showmsg.h"
|
#include "../common/mmo.h"
|
||||||
#include "malloc.h"
|
#include "../common/showmsg.h"
|
||||||
|
#include "../common/malloc.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifdef LOCALZLIB
|
#ifdef LOCALZLIB
|
||||||
@ -41,9 +41,9 @@
|
|||||||
#define zlib_deflate deflate
|
#define zlib_deflate deflate
|
||||||
#define zlib_deflateEnd deflateEnd
|
#define zlib_deflateEnd deflateEnd
|
||||||
#else
|
#else
|
||||||
#include <windows.h>
|
|
||||||
#include "../lib/zlib_win32.h"
|
#include "../lib/zlib_win32.h"
|
||||||
HINSTANCE zlib_dll;
|
#include "../common/dll.h"
|
||||||
|
DLL zlib_dll;
|
||||||
#define zlib_inflateInit(strm) zlib_inflateInit_((strm),ZLIB_VERSION, sizeof(z_stream))
|
#define zlib_inflateInit(strm) zlib_inflateInit_((strm),ZLIB_VERSION, sizeof(z_stream))
|
||||||
#define zlib_deflateInit(strm, level) zlib_deflateInit_((strm),(level),ZLIB_VERSION,sizeof(z_stream))
|
#define zlib_deflateInit(strm, level) zlib_deflateInit_((strm),(level),ZLIB_VERSION,sizeof(z_stream))
|
||||||
|
|
||||||
@ -984,7 +984,7 @@ void grfio_final(void)
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef LOCALZLIB
|
#ifndef LOCALZLIB
|
||||||
FreeLibrary(zlib_dll);
|
DLL_CLOSE(zlib_dll);
|
||||||
zlib_inflateInit_ = NULL;
|
zlib_inflateInit_ = NULL;
|
||||||
zlib_inflate = NULL;
|
zlib_inflate = NULL;
|
||||||
zlib_inflateEnd = NULL;
|
zlib_inflateEnd = NULL;
|
||||||
@ -1006,13 +1006,13 @@ void grfio_init(char *fname)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef LOCALZLIB
|
#ifndef LOCALZLIB
|
||||||
if(!zlib_dll) {
|
if(!zlib_dll) {
|
||||||
zlib_dll = LoadLibrary("zlib.dll");
|
zlib_dll = DLL_OPEN ("zlib.dll");
|
||||||
(FARPROC)zlib_inflateInit_ = GetProcAddress(zlib_dll,"inflateInit_");
|
DLL_SYM (zlib_inflateInit_, zlib_dll, "inflateInit_");
|
||||||
(FARPROC)zlib_inflate = GetProcAddress(zlib_dll,"inflate");
|
DLL_SYM (zlib_inflate, zlib_dll, "inflate");
|
||||||
(FARPROC)zlib_inflateEnd = GetProcAddress(zlib_dll,"inflateEnd");
|
DLL_SYM (zlib_inflateEnd, zlib_dll, "inflateEnd");
|
||||||
(FARPROC)zlib_deflateInit_ = GetProcAddress(zlib_dll,"deflateInit_");
|
DLL_SYM (zlib_deflateInit_, zlib_dll, "deflateInit_");
|
||||||
(FARPROC)zlib_deflate = GetProcAddress(zlib_dll,"deflate");
|
DLL_SYM (zlib_deflate, zlib_dll, "deflate");
|
||||||
(FARPROC)zlib_deflateEnd = GetProcAddress(zlib_dll,"deflateEnd");
|
DLL_SYM (zlib_deflateEnd, zlib_dll, "deflateEnd");
|
||||||
if(zlib_dll == NULL) {
|
if(zlib_dll == NULL) {
|
||||||
MessageBox(NULL,"Can't load zlib.dll","grfio.c",MB_OK);
|
MessageBox(NULL,"Can't load zlib.dll","grfio.c",MB_OK);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user