[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Ranson <ranson@LANNION.CNET.fr>
- Subject: Re: WITH-TEXT?
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Fri, 13 Mar 1992 15:27:12 -0500
- Cc: info-mcl
>I'm trying to write a WITH-TEXT macro similar to WITH-PSTRS that would allo-
>cate a stack block and stuff a string into it, but without the 255 chars limi-
>tations (I don't care about a length byte). Is there a way to do that effi-
>ciently? Copying the characters one by one will take ages. I have found an
>undocumented function %STR-TO-HANDLE, but I don't want a handle, but a stack
Have you considered just using the WITH-CSTRS macro? It's the same as
WITH-PSTRS, but it allocates zero-terminated strings instead of length
prefixed strings and has no length limitation. It expands into
a call to the function CCL::%CSTR-POINTER, which is responsible for
stuffing the string into the stack block.
>By the way, what happens with WITH-PSTRS when the string is over 255? Crash?