Skip to main content.
home | support | download

Back to List Archive

Re: alias expansion for german umlauts etc.

From: Bill Moseley <moseley(at)>
Date: Wed May 25 2005 - 15:04:01 GMT
On Wed, May 25, 2005 at 06:25:43AM -0700, Stefan Klett wrote:
> Therefore i have written  a set of functions which read in the plain chars and their 
> assumed aliases from the swish.conf (Directive ExpandLocalChar) and build 
> a pair of lookuptables - in 
> the way that one of them holds the holds a "1" in every place (like usual 
> 256 (integer) entries over all) which holds the single char version and 
> the other lookuptable consisting of 256 char pointers holds the 
> corresponding alias string in the field corresponding to the single char 
> version. A further function does the actual replacement by allocating the 
> missing memory and rewriting the input string to return the "expanded 
> chars"-version.

Sounds ok -- I'd need to look at the code to see why it's not
working, thought.

> Ps: A further question (mere curiosity): is there practical reason for 
> writing single char variables as name[1] - i have seen that many times 
> while browsing the code - and could not the imagine the idea behind it.

You mean things like:

typedef struct propEntry
    unsigned int propLen;       /* Length of buffer */
    unsigned char propValue[1]; /* Actual property value starts here */

That's just a place holder -- the actual allocation is 1 or char.

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:
Received on Wed May 25 08:04:03 2005