This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

I've moved to SCO...



Hi Greg,

I've been here for three months now and life is settling down.
I was brushing off the beguiled AutoGen in preparation for
a proposal when I discovered what may well be a catestrophic
flaw in Guile.  In my library of Guile function routines,
I have c-string, kr-string, shell-str and raw-shell-str:

> `c-string' - emit string for ANSI C
> -----------------------------------
> 
>    Usage:  (c-string string)
> Reform a string so that, when printed, the C compiler will be able to
> compile the data and construct a string that contains exactly what the
> current string contains.  Many non-printing characters are replaced with
> escape sequences.  Newlines are replaced with a backslash, an `n', a
> closing quote, a newline, seven spaces and another re-opening quote.
> The compiler will implicitly concatenate them.  The reader will see line
> breaks.
> 
>    A K&R compiler will choke.  Use `kr-string' for that compiler.

> `kr-string' - emit string for K&R C
> -----------------------------------
> 
>    Usage:  (kr-string string)
> Reform a string so that, when printed, a K&R C compiler will be able....

> `shell-str' - double quote shell string
> ---------------------------------------
> 
>    Usage:  (shell-str string)
> Convert the text of the string into a double quoted string that a
> normal shell will process into the original string.  (Before doing
> macro expansion, that is.)  The escaped characters are the backslash
> and double quote `"'.  All others are copied directly into the output.

> `raw-shell-str' - single quote shell string
> -------------------------------------------
> 
>    Usage:  (raw-shell-str string)
> Convert the text of the string into a singly quoted string that a
> normal shell will process into the original string.  (It will not do
> macro expansion later, either.)  Contained single quotes become
> tripled, with the middle quote escaped with a backslash.  Normal shells
> will reconstitute the original string.

Only the first three work.  On the last one, the result string
contains single quotes at the start and end of the string, but
the SCM containing the string at the return from gh_evalstr()
DOES NOT!!  That is hopelessly, terribly, awfully, irretrievably broken.
Unless there is a different routine to call that does not do this
mutilation, I have two points:

1.  Guile has absolutely _NO_ business sticking its nose into
    the content of my strings, much less mutilating them.
    It is a fatally grave misfeature to do so.

2.  If there is no workaround, then I have wasted over 100 hours
    of effort because it renders Guile useless to me.

Please tell me there is a way around the problem.  Thanks.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]