From phma@webjockey.net Wed Jan 22 19:27:03 2003
Return-Path: <lojban-out@lojban.org>
X-Sender: lojban-out@lojban.org
X-Apparently-To: lojban@yahoogroups.com
Received: (EGP: mail-8_2_3_0); 23 Jan 2003 03:27:03 -0000
Received: (qmail 839 invoked from network); 23 Jan 2003 03:27:02 -0000
Received: from unknown (66.218.66.216)
  by m1.grp.scd.yahoo.com with QMQP; 23 Jan 2003 03:27:02 -0000
Received: from unknown (HELO digitalkingdom.org) (204.152.186.175)
  by mta1.grp.scd.yahoo.com with SMTP; 23 Jan 2003 03:27:02 -0000
Received: from lojban-out by digitalkingdom.org with local (Exim 4.05)
  id 18bY18-0004kv-00
  for lojban@yahoogroups.com; Wed, 22 Jan 2003 19:27:02 -0800
Received: from digitalkingdom.org ([204.152.186.175] helo=chain)
  by digitalkingdom.org with esmtp (Exim 4.05)
  id 18bY11-0004kc-00; Wed, 22 Jan 2003 19:26:55 -0800
Received: with ECARTIS (v1.0.0; list lojban-list); Wed, 22 Jan 2003 19:26:54 -0800 (PST)
Received: from 208-150-110-21-adsl.precisionet.net ([208.150.110.21] helo=blackcat.ixazon.lan)
  by digitalkingdom.org with esmtp (Exim 4.05)
  id 18bY0u-0004kC-00
  for lojban-list@lojban.org; Wed, 22 Jan 2003 19:26:49 -0800
Received: by blackcat.ixazon.lan (Postfix, from userid 1001)
  id 8757F4FC4; Thu, 23 Jan 2003 03:26:17 +0000 (UTC)
Organization: dis
To: lojban-list@lojban.org
Subject: [lojban] C question: How to or strings and get a string?
Date: Wed, 22 Jan 2003 22:26:16 -0500
User-Agent: KMail/1.5
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Message-Id: <200301222226.16684.phma@webjockey.net>
X-archive-position: 3855
X-ecartis-version: Ecartis v1.0.0
Sender: lojban-list-bounce@lojban.org
Errors-to: lojban-list-bounce@lojban.org
X-original-sender: phma@webjockey.net
Precedence: bulk
X-list: lojban-list
From: Pierre Abbat <phma@webjockey.net>
Reply-To: phma@webjockey.net
X-Yahoo-Group-Post: member; u=92712300

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




