[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] extension of __declare(substitute, "..; ...") syntax

From: felix
Subject: Re: [Chicken-users] extension of __declare(substitute, "..; ...") syntax?
Date: Thu, 29 Jan 2004 22:19:32 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Daniel B. Faken wrote:

I'm looking to convert some imported C functions' names to lower-case. For example, glLoadMatrix -> gl-load-matrix. I haven't been able to find a way to do this with the 'substitute' syntax, because (AFAIK) it only allows back-references, so I can't switch the case short of doing something like
__declare(substitute, "([a-z])A;\1a")
__declare(substitute, "([a-z])B;\1b")
__declare(substitute, "([a-z])C;\1c")

I tracked this back to the implementation of string-substitute (in pcre.scm), and I didn't see any simple way to do this.

  Thoughts?  Should I implement a more general method?

If you just want all converted to lowercase, then compile
with the `-case-insensitive' option. This will automatically
treat all FFI-introduced names as lowercase.
(this feature is pretty new, you might have to use the
current CVS version)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]