Re: getting cpp to insert a newline

From: Chris Croughton (chris_at_keristor.net)
Date: 02/10/05


Date: Thu, 10 Feb 2005 18:03:43 +0000

On 9 Feb 2005 16:27:32 -0800, jiversen
   <jiversen@d2.com> wrote:

> Thank you very much for your reply. Its makes perfect sense.
>
> Its true, I'm attempting to use "cpp" for something thats not C - where
> whitespace and newlines ARE significant.

If you want something you can hack to get a similar effect, you could
look at my xcpp (http://www.keristor.co.uk/stuff/xcpp-0.5.5.tar.gz). It
doesn't implement #include files (that's not its intent) but it may be a
start. Or it may not, depending how unclear you find my code <g>...

Chris C



Relevant Pages

  • Re: newlines with XmlTextWriter
    ... nodes at the bottom where whitespace is significant. ... I have a feeling that if there are any newlines in the tree (or maybe any ... and it only puts its own in if there are none at all in the DOM. ... Can you give an example of the formatting you want? ...
    (microsoft.public.dotnet.xml)
  • Re: problems with making wordwrap
    ... white space at the beginning of new lines. ... but whitespace within a line ... The first gsub replaces newlines inside of paragraphs into spaces, but leaves newlines between paragraphs unchanged. ...
    (comp.lang.ruby)
  • Re: three of the Cloverfield features fit for Tcl?
    ... It would have worked with switch, ... Taken as a string, $a contains two newlines, 4 spaces and the number 42. ... Even previously not with respect to whitespace. ...
    (comp.lang.tcl)
  • Re: Truncating several lines of text into one line and putting in scalar
    ... > more etext ... > by newlines) into a scalar like this ... Maybe you would prefer the canonical canonicalisation of whitespace: ...
    (comp.lang.perl.misc)
  • Re: Trim whitespace with cookbook recipe does not result in trimmed array
    ... Here you say _all_ whitespace, but your code appears to be trying ... open INPUT, "textfile" or die $1; ... Perl is doing exactly what you told it to do. ...
    (comp.lang.perl.misc)