00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __ALICEML_STDINC_H__
00028 #define __ALICEML_STDINC_H__
00029
00030 #include "aliceml_config.h"
00031 #include "aliceml.h"
00032 #include "aliceml_array.h"
00033 #include "aliceml_hash.h"
00034 #include "aliceml_string.h"
00035 #include "aliceml_font.h"
00036 #include "aliceml_context.h"
00037 #include "aliceml_command.h"
00038 #include "aliceml_surface.h"
00039
00040 #if HAVE_STDLIB_H
00041 #include <stdlib.h>
00042 #endif
00043
00044 #if HAVE_STDIO_H
00045 #include <stdio.h>
00046 #endif
00047
00048 #if HAVE_STDARG_H
00049 #include <stdarg.h>
00050 #endif
00051
00052 #if HAVE_STRING_H
00053 #include <string.h>
00054 #endif
00055
00056 #if HAVE_MALLOC_H
00057 #include <malloc.h>
00058 #endif
00059
00060 #if HAVE_MEMORY_H
00061 #include <memory.h>
00062 #endif
00063
00064 #if HAVE_ASSERT_H
00065 #include <assert.h>
00066 #endif
00067
00068 #ifdef __cplusplus
00069 extern "C" {
00070 #endif
00071
00087 #ifndef ML_Checkup
00088 #ifdef ML_CHECKUP_ASSERT
00089 #define ML_Checkup(exp, result) do { assert(exp); if(!(exp)) return (result); } while(0)
00090 #define ML_Checkupv(exp) do { assert(exp); if(!(exp)) return; } while(0)
00091 #else
00092 #define ML_Checkup(exp, result) if (!(exp)) do { ML_SetError("%sに失敗しました。", #exp); return (result); } while(0)
00093 #define ML_Checkupv(exp) if (!(exp)) do { ML_SetError("%sに失敗しました。", #exp); return; } while(0)
00094 #endif
00095 #endif
00096
00098 #define foreach_command_list(message, it) \
00099 for (it = ML_CommandList_GetCurrentBegin((message)->command_list); \
00100 !ML_CommandListIt_IsEqual((it), ML_CommandList_GetCurrentEnd((message)->command_list)); \
00101 it = ML_CommandListIt_Next(it))
00102
00103 #ifndef NDEBUG
00104
00105 int ALICEMLCALL ML_trace(const char *format, ...);
00107 int ALICEMLCALL ML_trace_create(const char *type, void *ptr);
00109 int ALICEMLCALL ML_trace_destroy(const char *type, void *ptr);
00110 #else
00111 #define ML_trace
00112 #define ML_trace_create
00113 #define ML_trace_destroy
00114 #endif
00115
00116 #ifdef __cplusplus
00117 }
00118 #endif
00119
00120 #endif