Subject: [lojban] C question: How to or strings and get a string?

From: Pierre Abbat <[email-masked]>
Date: Wed, 22 Jan 2003 22:26:16 -0500

I am very close to having a tolpo'u a'o ke valfendi mutmi'i. There are a few 
lines in the program that I'm not sure how to fix:

#define is3rafsi(str) (monmapti("ICV",str) || monmapti("CVC",str) || 
monmapti("CUV",str))
#define is4rafsi(str) (monmapti("CVCC",str) || monmapti("ICVC",str))
#define isgismu(str) (monmapti("CVCCV",str) || monmapti("ICVCV",str))

monmapti returns NULL if it didn't match or a pointer to the first character 
after the matching string if it does. is3rafsi is supposed to do the same, 
but instead it returns 1, which confuses isslinkuhi, which then calls 
is3rafsi(1) and crashes. I can't just add 3 because the string contains 
commas ju apostrophes. Is there a way to write a macro to do this, or do I 
need to write a function?

phma