mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* include/jdmacros.h: Define SLMEMSET and SLMEMCPY
unconditionally, use macros with arguments. * include/_slang.h: Make it clear which parts are disabled for compatibility with glib. * include/slinclud.h: Include malloc.h only if STDC_HEADERS is not defined.
This commit is contained in:
parent
0412daf338
commit
ade4cf0bbf
@ -1,3 +1,12 @@
|
||||
2002-10-07 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* include/jdmacros.h: Define SLMEMSET and SLMEMCPY
|
||||
unconditionally, use macros with arguments.
|
||||
* include/_slang.h: Make it clear which parts are disabled
|
||||
for compatibility with glib.
|
||||
* include/slinclud.h: Include malloc.h only if STDC_HEADERS is
|
||||
not defined.
|
||||
|
||||
2002-10-07 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* sldisply.c (Color_Def_Type): Make const.
|
||||
|
@ -718,13 +718,15 @@ extern void _SLcompile_byte_compiled (void);
|
||||
|
||||
extern int (*_SLprep_eval_hook) (char *);
|
||||
|
||||
#ifndef _SLvsnprintf
|
||||
/* GNU Midnight Commander uses replacements from glib */
|
||||
#define MIDNIGHT_COMMANDER_CODE 1
|
||||
#ifndef MIDNIGHT_COMMANDER_CODE
|
||||
|
||||
#ifdef HAVE_VSNPRINTF
|
||||
#define _SLvsnprintf vsnprintf
|
||||
#else
|
||||
extern int _SLvsnprintf (char *, unsigned int, char *, va_list);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SNPRINTF
|
||||
# define _SLsnprintf snprintf
|
||||
@ -732,6 +734,8 @@ extern int _SLvsnprintf (char *, unsigned int, char *, va_list);
|
||||
extern int _SLsnprintf (char *, unsigned int, char *, ...);
|
||||
#endif
|
||||
|
||||
#endif /* !MIDNIGHT_COMMANDER_CODE */
|
||||
|
||||
#undef _INLINE_
|
||||
#if defined(__GNUC__) && _SLANG_USE_INLINE_CODE
|
||||
# define _INLINE_ __inline__
|
||||
|
@ -1,18 +1,12 @@
|
||||
/* Fully rewritten to use glib */
|
||||
/* Fully rewritten to use glib rather than S-Lang replacements */
|
||||
|
||||
#ifndef _JD_MACROS_H_
|
||||
#define _JD_MACROS_H_
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#ifndef SLMEMSET
|
||||
#define SLMEMSET memset
|
||||
#endif
|
||||
|
||||
#ifndef SLMEMCPY
|
||||
#define SLMEMCPY memcpy
|
||||
#endif
|
||||
|
||||
#define SLMEMSET(x,y,z) memset(x,y,z)
|
||||
#define SLMEMCPY(x,y,z) memcpy(x,y,z)
|
||||
#define SLfree(x) g_free(x)
|
||||
#define SLmalloc(x) g_malloc(x)
|
||||
#define _SLvsnprintf g_vsnprintf
|
||||
|
@ -19,8 +19,8 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MALLOC_H
|
||||
# include <malloc.h>
|
||||
#if !defined(STDC_HEADERS) && defined(HAVE_MALLOC_H)
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
|
Loading…
Reference in New Issue
Block a user