Originally posted by [b]mkbu95[/b]
In nullpo.c:
[CODE]void nullpo_info_f(const char *file, int line, const char *func,
const char *fmt, ...)[/CODE]Is never used.
[CODE]void nullpo_info(const char *file, int line, const char *func)[/CODE]
Is only used 3 times in battle.c for "apparently" the same thing:
[CODE] memset(&wd,0,sizeof(wd));
memset(&flag,0,sizeof(flag));
if(src==NULL || target==NULL)
{
nullpo_info(NLP_MARK);
return wd;
}[/CODE][CODE] memset(&ad,0,sizeof(ad));
memset(&flag,0,sizeof(flag));
if(src==NULL || target==NULL)
{
nullpo_info(NLP_MARK);
return ad;
}[/CODE][CODE] memset(&md,0,sizeof(md));
if( src == NULL || target == NULL ){
nullpo_info(NLP_MARK);
return md;
}[/CODE]
In nullpo.h:
[CODE]// ‰Â•ÈøÂÂâ€ÂÆ’}Æ’Nƒ‚Ɋւ·‚ÉÂÂðŒÂÂÆ’Rƒ“ƒpÆ’Cƒ‹
#if __STDC_VERSION__ >= 199901L
/* C99‚ɑΉž */
#define nullpo_ret_f(t, fmt, ...) \
if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return(0);}
#define nullpo_retv_f(t, fmt, ...) \
if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return;}
#define nullpo_retr_f(ret, t, fmt, ...) \
if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return(ret);}
#define nullpo_retb_f(t, fmt, ...) \
if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {break;}
#elif __GNUC__ >= 2
/* GCCâ€â€p */
#define nullpo_ret_f(t, fmt, args...) \
if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return(0);}
#define nullpo_retv_f(t, fmt, args...) \
if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return;}
#define nullpo_retr_f(ret, t, fmt, args...) \
if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return(ret);}
#define nullpo_retb_f(t, fmt, args...) \
if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {break;}
#else
/* ‚»‚Ì‘¼Ã¢â‚¬Å¡ÃƒÅ’ÂÂê‡ÂÂEÂÂEÂÂE orz */
#endif[/CODE]This is never used.
[CODE]#define nullpo_retb(t) (void)(t)[/CODE] This is never used.
[CODE]// ‰Â•ÈøÂÂâ€ÂÆ’}Æ’Nƒ‚Ɋւ·‚ÉÂÂðŒÂÂÆ’Rƒ“ƒpÆ’Cƒ‹
#if __STDC_VERSION__ >= 199901L
/* C99‚ɑΉž */
#define nullpo_ret_f(t, fmt, ...) (void)(t)
#define nullpo_retv_f(t, fmt, ...) (void)(t)
#define nullpo_retr_f(ret, t, fmt, ...) (void)(t)
#define nullpo_retb_f(t, fmt, ...) (void)(t)
#elif __GNUC__ >= 2
/* GCCâ€â€p */
#define nullpo_ret_f(t, fmt, args...) (void)(t)
#define nullpo_retv_f(t, fmt, args...) (void)(t)
#define nullpo_retr_f(ret, t, fmt, args...) (void)(t)
#define nullpo_retb_f(t, fmt, args...) (void)(t)
#else
/* ‚»‚Ì‘¼Ã¢â‚¬Å¡ÃƒÅ’ÂÂê‡ÂÂEÂÂEÂÂE orz */
#endif[/CODE] Never used.
[hr]
Just to clear the situation: I don't know much about these stuff above (nullpo settings

) but since it's never used/obselete, could be removed.

And What about change these macros to "static inline", does this make anything better?
"Did you know?":

nullpo.c had only one significant change, where printf were replaced with ShowMessage.
nullpo.h last change was about 2007.
Well, thanks for reading, and sorry if this is not important

Kind regards,

mkbu95