mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 01:17:55 -05:00
Fix SmartHeap files (#90)
This commit is contained in:
parent
a31626cffb
commit
19dcfe1164
2 changed files with 719 additions and 719 deletions
126
3rdparty/smartheap/SHMALLOC.H
vendored
126
3rdparty/smartheap/SHMALLOC.H
vendored
|
@ -1,63 +1,63 @@
|
||||||
/* shmalloc.h -- SmartHeap ANSI Standard C memory API
|
/* shmalloc.h -- SmartHeap ANSI Standard C memory API
|
||||||
* Professional Memory Management Library
|
* Professional Memory Management Library
|
||||||
*
|
*
|
||||||
* Copyright (C) 1991-1996 by Arthur D. Applegate. All Rights Reserved.
|
* Copyright (C) 1991-1996 by Arthur D. Applegate. All Rights Reserved.
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* No part of this source code may be copied, modified or reproduced
|
* No part of this source code may be copied, modified or reproduced
|
||||||
* in any form without retaining the above copyright notice.
|
* in any form without retaining the above copyright notice.
|
||||||
* This source code, or source code derived from it, may not be redistributed
|
* This source code, or source code derived from it, may not be redistributed
|
||||||
* without express written permission of the author.
|
* without express written permission of the author.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !(defined(_SHMALLOC_H))
|
#if !(defined(_SHMALLOC_H))
|
||||||
#define _SHMALLOC_H
|
#define _SHMALLOC_H
|
||||||
|
|
||||||
#include "smrtheap.h"
|
#include "smrtheap.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ANSI Standard Memory Management API */
|
/* ANSI Standard Memory Management API */
|
||||||
|
|
||||||
#if (!defined(MEM_DEBUG) && !defined(NO_MALLOC_MACRO)) || defined(MALLOC_MACRO)
|
#if (!defined(MEM_DEBUG) && !defined(NO_MALLOC_MACRO)) || defined(MALLOC_MACRO)
|
||||||
#ifdef malloc
|
#ifdef malloc
|
||||||
#undef malloc
|
#undef malloc
|
||||||
#endif
|
#endif
|
||||||
#define malloc(s) MEM_malloc(s)
|
#define malloc(s) MEM_malloc(s)
|
||||||
#ifdef calloc
|
#ifdef calloc
|
||||||
#undef calloc
|
#undef calloc
|
||||||
#endif
|
#endif
|
||||||
#define calloc(s,c) MEM_calloc(s,c)
|
#define calloc(s,c) MEM_calloc(s,c)
|
||||||
#ifdef realloc
|
#ifdef realloc
|
||||||
#undef realloc
|
#undef realloc
|
||||||
#endif
|
#endif
|
||||||
#define realloc(p,s) MEM_realloc(p,s)
|
#define realloc(p,s) MEM_realloc(p,s)
|
||||||
#ifdef free
|
#ifdef free
|
||||||
#undef free
|
#undef free
|
||||||
#endif
|
#endif
|
||||||
#define free(p) MEM_free(p)
|
#define free(p) MEM_free(p)
|
||||||
|
|
||||||
#endif /* NO_MALLOC_MACRO */
|
#endif /* NO_MALLOC_MACRO */
|
||||||
|
|
||||||
#ifndef MEM_malloc
|
#ifndef MEM_malloc
|
||||||
void MEM_FAR * MEM_ENTRY_ANSI MEM_malloc(size_t size);
|
void MEM_FAR * MEM_ENTRY_ANSI MEM_malloc(size_t size);
|
||||||
void MEM_FAR * MEM_ENTRY_ANSI MEM_calloc(size_t nobj, size_t size);
|
void MEM_FAR * MEM_ENTRY_ANSI MEM_calloc(size_t nobj, size_t size);
|
||||||
void MEM_FAR * MEM_ENTRY_ANSI MEM_realloc(void MEM_FAR *p, size_t size);
|
void MEM_FAR * MEM_ENTRY_ANSI MEM_realloc(void MEM_FAR *p, size_t size);
|
||||||
void MEM_ENTRY_ANSI MEM_free(void MEM_FAR *p);
|
void MEM_ENTRY_ANSI MEM_free(void MEM_FAR *p);
|
||||||
#endif /* MEM_malloc */
|
#endif /* MEM_malloc */
|
||||||
|
|
||||||
#if defined(__WATCOMC__) && defined(__SW_3S)
|
#if defined(__WATCOMC__) && defined(__SW_3S)
|
||||||
/* Watcom stack calling convention */
|
/* Watcom stack calling convention */
|
||||||
#pragma aux (syscall) MEM_malloc
|
#pragma aux (syscall) MEM_malloc
|
||||||
#pragma aux (syscall) MEM_realloc
|
#pragma aux (syscall) MEM_realloc
|
||||||
#pragma aux (syscall) MEM_calloc
|
#pragma aux (syscall) MEM_calloc
|
||||||
#pragma aux (syscall) MEM_free
|
#pragma aux (syscall) MEM_free
|
||||||
#endif /* __WATCOMC__ */
|
#endif /* __WATCOMC__ */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* !defined(_SHMALLOC_H) */
|
#endif /* !defined(_SHMALLOC_H) */
|
||||||
|
|
1312
3rdparty/smartheap/SMRTHEAP.H
vendored
1312
3rdparty/smartheap/SMRTHEAP.H
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue