26 Jul, 2013, arholly wrote in the 1st comment:
Votes: 0
Hi there:
I'm trying to update an older code base and trying to use IS_NULLSTR but I'm getting this:
Quote
sv.o: In function `fwrite_char':
/mpvmud/mud/mpv/sv.c:550: undefined reference to `IS_NULLSTR'
/mpvmud/mud/mpv/sv.c:550: undefined reference to `IS_NULLSTR'


The code is:
// String Values
#define WriteToFile(fp, delimiter, key, value) \
do { \
if(fp && !IS_NULLSTR(key)) { \
if(!IS_NULLSTR(value)) \
fprintf(fp,"%s %s%s\n", key, value, delimiter ? DELIMITER:""); \
} \
} while(0)

and used in:
WriteToFile( fp, false, "$", IS_MOB (ch) ? "MOB" : "PLAYER");


Why would I be getting that? Is there some file I'm forgetting to include?
26 Jul, 2013, Zeno wrote in the 2nd comment:
Votes: 0
grep for IS_NULLSTR, it sounds like a macro that should be in your code? See if you can find the definition.
26 Jul, 2013, arholly wrote in the 3rd comment:
Votes: 0
Doh! You're right. Nevermind. Thanks.
26 Jul, 2013, quixadhal wrote in the 4th comment:
Votes: 0
Why would you need a macro for that?

It's something wacky like:

#define IS_NULLSTR(s) (!(s) || !(*s))

isn't it?
0.0/4