aliceml_stdinc.h

説明を見る。
00001 /*
00002  * Copyright (c) 2005-2007  cielacanth <cielacanth AT s60.xrea.com>
00003  * All rights reserved.
00004  * 
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *    1. Redistributions of source code must retain the above copyright
00009  *       notice, this list of conditions and the following disclaimer.
00010  *    2. Redistributions in binary form must reproduce the above copyright
00011  *       notice, this list of conditions and the following disclaimer in the
00012  *       documentation and/or other materials provided with the distribution.
00013  * 
00014  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
00015  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00016  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00017  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
00018  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00019  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00020  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00021  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00022  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00023  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00024  * SUCH DAMAGE.
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 /* ML_CHECKUP_ASSERT */
00095 #endif /* ML_Checkup */
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

AliceMLに対してSat Apr 21 13:06:20 2007に生成されました。  doxygen 1.4.7