From: mquinson Date: Sun, 27 Feb 2005 23:02:56 +0000 (+0000) Subject: splint'able X-Git-Tag: v3.3~4272 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/19bdb25835da6ee353675dfb995cf9ca886361b2 splint'able git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1081 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/xbt/dynar.h b/include/xbt/dynar.h index 7e09bb5745..5f1df3bb8a 100644 --- a/include/xbt/dynar.h +++ b/include/xbt/dynar.h @@ -175,5 +175,5 @@ xbt_dynar_foreach (dyn,cpt,str) { END_DECL() -/*@}*/ +/* @} */ #endif /* _XBT_DYNAR_H */ diff --git a/include/xbt/error.h b/include/xbt/error.h index c91ea1e9b4..bf8dc037fd 100644 --- a/include/xbt/error.h +++ b/include/xbt/error.h @@ -155,7 +155,7 @@ typedef enum { __FILE__,__LINE__,__FUNCTION__,a1,a2,a3,a4,a5,a6); \ _XBT_ERR_POST(code) -/**@}*/ +/** @} */ /** * \name 4. assert macro familly * @@ -193,7 +193,7 @@ typedef enum { #define xbt_assert6(cond,msg,a,b,c,d,e,f) if (!(cond)) { CRITICAL6(msg,a,b,c,d,e,f); xbt_abort(); } #endif -/** @}*/ +/** @} */ /** @name 5. Useful predefined errors * @@ -205,8 +205,8 @@ typedef enum { #define DIE_IMPOSSIBLE xbt_assert0(0,"The Impossible did happen (yet again)") #define xbt_assert_error(a) xbt_assert1(errcode == (a), "Error %s unexpected",xbt_error_name(errcode)) -/** @}*/ -/**@}*/ +/** @} */ +/** @} */ END_DECL() diff --git a/include/xbt/log.h b/include/xbt/log.h index 0de57388f1..9bb6e7723e 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -15,9 +15,9 @@ #ifndef _XBT_LOG_H_ #define _XBT_LOG_H_ -#include +#include "xbt/misc.h" -#include "xbt/sysdep.h" +#include /**\brief Log priorities * \ingroup XBT_log @@ -392,7 +392,7 @@ extern xbt_log_appender_t xbt_log_default_appender; * for sake of clarity. They just differ in the number of arguments passed * along with the format string. */ -/*@{*/ +/* @{ */ #define DEBUG0(f) LOG0(xbt_log_priority_debug, f) #define DEBUG1(f,a1) LOG1(xbt_log_priority_debug, f,a1) #define DEBUG2(f,a1,a2) LOG2(xbt_log_priority_debug, f,a1,a2) @@ -402,7 +402,7 @@ extern xbt_log_appender_t xbt_log_default_appender; #define DEBUG6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6) #define DEBUG7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7) #define DEBUG8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8) -/*@}*/ +/* @} */ /** \name VERB * \ingroup XBT_log @@ -419,7 +419,7 @@ extern xbt_log_appender_t xbt_log_default_appender; * for sake of clarity. They just differ in the number of arguments passed * along with the format string. */ -/*@{*/ +/* @{ */ #define VERB0(f) LOG0(xbt_log_priority_verbose, f) #define VERB1(f,a1) LOG1(xbt_log_priority_verbose, f,a1) #define VERB2(f,a1,a2) LOG2(xbt_log_priority_verbose, f,a1,a2) @@ -427,7 +427,7 @@ extern xbt_log_appender_t xbt_log_default_appender; #define VERB4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_verbose, f,a1,a2,a3,a4) #define VERB5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5) #define VERB6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6) -/*@}*/ +/* @} */ /** \name INFO * \ingroup XBT_log @@ -444,7 +444,7 @@ extern xbt_log_appender_t xbt_log_default_appender; * for sake of clarity. They just differ in the number of arguments passed * along with the format string. */ -/*@{*/ +/* @{ */ #define INFO0(f) LOG0(xbt_log_priority_info, f) #define INFO1(f,a1) LOG1(xbt_log_priority_info, f,a1) #define INFO2(f,a1,a2) LOG2(xbt_log_priority_info, f,a1,a2) @@ -452,7 +452,7 @@ extern xbt_log_appender_t xbt_log_default_appender; #define INFO4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_info, f,a1,a2,a3,a4) #define INFO5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_info, f,a1,a2,a3,a4,a5) #define INFO6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6) -/*@}*/ +/* @} */ /** \name WARN * \ingroup XBT_log @@ -469,7 +469,7 @@ extern xbt_log_appender_t xbt_log_default_appender; * for sake of clarity. They just differ in the number of arguments passed * along with the format string. */ -/*@{*/ +/* @{ */ #define WARN0(f) LOG0(xbt_log_priority_warning, f) #define WARN1(f,a1) LOG1(xbt_log_priority_warning, f,a1) #define WARN2(f,a1,a2) LOG2(xbt_log_priority_warning, f,a1,a2) @@ -477,7 +477,7 @@ extern xbt_log_appender_t xbt_log_default_appender; #define WARN4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_warning, f,a1,a2,a3,a4) #define WARN5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_warning, f,a1,a2,a3,a4,a5) #define WARN6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6) -/*@}*/ +/* @} */ /** \name ERROR * \ingroup XBT_log @@ -494,7 +494,7 @@ extern xbt_log_appender_t xbt_log_default_appender; * for sake of clarity. They just differ in the number of arguments passed * along with the format string. */ -/*@{*/ +/* @{ */ #define ERROR0(f) LOG0(xbt_log_priority_error, f) #define ERROR1(f,a1) LOG1(xbt_log_priority_error, f,a1) #define ERROR2(f,a1,a2) LOG2(xbt_log_priority_error, f,a1,a2) @@ -502,7 +502,7 @@ extern xbt_log_appender_t xbt_log_default_appender; #define ERROR4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_error, f,a1,a2,a3,a4) #define ERROR5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_error, f,a1,a2,a3,a4,a5) #define ERROR6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6) -/*@}*/ +/* @} */ /** \name CRITICAL * \ingroup XBT_log @@ -519,7 +519,7 @@ extern xbt_log_appender_t xbt_log_default_appender; * for sake of clarity. They just differ in the number of arguments passed * along with the format string. */ -/*@{*/ +/* @{ */ #define CRITICAL0(f) LOG0(xbt_log_priority_critical, f) #define CRITICAL1(f,a1) LOG1(xbt_log_priority_critical, f,a1) #define CRITICAL2(f,a1,a2) LOG2(xbt_log_priority_critical, f,a1,a2) @@ -527,7 +527,7 @@ extern xbt_log_appender_t xbt_log_default_appender; #define CRITICAL4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_critical, f,a1,a2,a3,a4) #define CRITICAL5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_critical, f,a1,a2,a3,a4,a5) #define CRITICAL6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6) -/*@}*/ +/* @} */ #define XBT_IN LOG1(xbt_log_priority_trace, ">> begin of %s", _XBT_GNUC_FUNCTION) #define XBT_IN1(fmt,a) LOG2(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_GNUC_FUNCTION, a) diff --git a/include/xbt/set.h b/include/xbt/set.h index d0f0ab80f9..103c587deb 100644 --- a/include/xbt/set.h +++ b/include/xbt/set.h @@ -98,8 +98,8 @@ int xbt_set_cursor_get_or_free (xbt_set_cursor_t *cursor, xbt_set_cursor_get_or_free(&(cursor),(xbt_set_elm_t*)&(elm)); \ xbt_set_cursor_step(cursor) ) -/*@}*/ -/*@}*/ +/* @} */ +/* @} */ END_DECL() #endif /* _XBT_SET_H */ diff --git a/include/xbt/swag.h b/include/xbt/swag.h index 4c8a42dee6..0a1f252d72 100644 --- a/include/xbt/swag.h +++ b/include/xbt/swag.h @@ -27,7 +27,7 @@ do his job but believe me, you don't want to try to play with those structs directly. Use them as an abstract datatype. */ -/*@{*/ +/* @{ */ typedef struct xbt_swag_hookup { void *next; void *prev; @@ -64,7 +64,7 @@ typedef struct xbt_swag { int count; } s_xbt_swag_t, *xbt_swag_t; /**< A typical swag */ -/*@}*/ +/* @} */ xbt_swag_t xbt_swag_new(size_t offset); void xbt_swag_free(xbt_swag_t swag); @@ -104,7 +104,7 @@ static __inline__ void *xbt_swag_getFirst(xbt_swag_t swag) * * Iterates over the whole swag. */ -/*@{*/ +/* @{ */ #define xbt_swag_foreach(obj,swag) \ for((obj)=xbt_swag_getFirst((swag)); \ (obj)!=NULL; \ @@ -130,6 +130,6 @@ static __inline__ void *xbt_swag_getFirst(xbt_swag_t swag) You can safely modify the \a swag while using this loop. Well, safely... Err. You can remove \a obj without having any trouble at least. */ -/*@}*/ +/* @} */ #endif /* _XBT_SWAG_H */ diff --git a/src/xbt/context.c b/src/xbt/context.c index 4f57bc719c..d62813704e 100644 --- a/src/xbt/context.c +++ b/src/xbt/context.c @@ -130,7 +130,7 @@ static void *__context_wrapper(void *c) /** \name Functions * \ingroup XBT_context */ -/*@{*/ +/* @{ */ /** Context module initialization * * \warning It has to be called before using any other function of this module. @@ -289,5 +289,4 @@ void xbt_context_free(xbt_context_t context) return; } - -/*@}*/ +/* @} */ diff --git a/src/xbt/context_private.h b/src/xbt/context_private.h index 4afc827abb..5912e5c31c 100644 --- a/src/xbt/context_private.h +++ b/src/xbt/context_private.h @@ -12,14 +12,25 @@ #include "xbt/sysdep.h" #include "xbt/swag.h" #include "xbt/dynar.h" /* void_f_pvoid_t */ -#include "portable.h" /* loads context system definitions */ +#include "portable.h" /* loads context system definitions */ #include "xbt/context.h" +#ifdef S_SPLINT_S +/* Dummy definition for splint since it chokes on ucontext.h */ +typedef struct ucontext { + struct ucontext *uc_link; + sigset_t uc_sigmask; + int uc_stack; + int uc_mcontext; +} ucontext_t; +typedef int CONTEXT; +#endif + #ifdef USE_PTHREADS -#include +# include #else -#define STACK_SIZE 524288 +# define STACK_SIZE 524288 #endif /* USE_PTHREADS */ typedef struct s_xbt_context { diff --git a/src/xbt/context_win32.h b/src/xbt/context_win32.h index fa5fa0582f..6fc82039f7 100644 --- a/src/xbt/context_win32.h +++ b/src/xbt/context_win32.h @@ -19,7 +19,9 @@ #ifndef UCONTEXT_H #define UCONTEXT_H -#include +#ifndef S_SPLINT_S +# include +#endif typedef struct __stack { void *ss_sp; diff --git a/src/xbt/error.c b/src/xbt/error.c index 98d1b4aaf5..ff7c3af820 100644 --- a/src/xbt/error.c +++ b/src/xbt/error.c @@ -9,6 +9,7 @@ under the terms of the license (GNU LGPL) which comes with this package. */ #include "xbt/error.h" +#include "xbt/sysdep.h" /** * \brief Usefull to do nice error repporting messages. diff --git a/src/xbt/fifo.c b/src/xbt/fifo.c index d596daa462..f282a6e549 100644 --- a/src/xbt/fifo.c +++ b/src/xbt/fifo.c @@ -20,7 +20,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(fifo,xbt,"FIFO"); /** \name Functions * \ingroup XBT_fifo */ -/*@{*/ +/* @{ */ /** Constructor * \return a new fifo @@ -394,6 +394,6 @@ xbt_fifo_item_t xbt_fifo_getPrevItem(xbt_fifo_item_t i) if(i) return i->prev; return NULL; } -/*@}*/ +/* @} */ diff --git a/src/xbt/heap.c b/src/xbt/heap.c index 49e28e40f9..c6207b9540 100644 --- a/src/xbt/heap.c +++ b/src/xbt/heap.c @@ -21,7 +21,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(heap, xbt, "Heap"); /** \name Functions * \ingroup XBT_heap */ -/*@{*/ +/* @{ */ /** * \param init_size initial size of the heap * \param free_func function to call on each element when you want to free @@ -186,4 +186,4 @@ static void xbt_heap_increaseKey(xbt_heap_t H, int i) } return; } -/*@}*/ +/* @} */ diff --git a/src/xbt/swag.c b/src/xbt/swag.c index 6971730eb5..dd837835c8 100644 --- a/src/xbt/swag.c +++ b/src/xbt/swag.c @@ -33,7 +33,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(swag,xbt,"Swag : O(1) set library"); /** \name Functions * \ingroup XBT_swag */ -/*@{*/ +/* @{ */ /** Creates a new swag. * \param offset where the hookup is located in the structure @@ -239,4 +239,4 @@ int xbt_swag_belongs(void *obj, xbt_swag_t swag) return ((NEXT(obj, swag->offset)) || (PREV(obj, swag->offset)) || (swag->head == obj)); } -/*@}*/ +/* @} */