ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: verb-c
Date: Fri, 18 Aug 2006 10:37:31 +0200	[thread overview]
Message-ID: <44E57C4B.6040402@wxs.nl> (raw)
In-Reply-To: <44E57A2F.8060405@elvenkind.com>

Taco Hoekwater wrote:
> wwl@musensturm.de wrote:
>   
>>>> How can this be fixed?
>>>>         
>>>  puts("Hallo");
>>>
>>>  nikolai
>>>       
>>  
>> You can't be serious!
>>     
>
> I thought that was an extremely funny answer :-)
>
>   
>> Escape-Sequences like \n,\r,\t,\123 or \xef are integral part of the 
>> C-language and I have this in many different places in a lot of 
>> C-source files.
>>
>> Is there no solution? Why does this happen?
>>     
>
> It happens because the \n is at the very end of the double
> quoted string. It is a bug / oversight in the verb-c.tex,
> but I have no time to fix it right now. I will try to  have
> a look at it in the weekend.
>
>   
can it be that the (here commented)

\beginofpretty[\!!prettyeight]%
\beginofpretty[\!!prettynine]%

pickup is not needed? i guess that it has no matching stop and since colors are grouped ... 


\gdef\doCtypefiveA#1#2%
  {\endCtypesix
   \ifinCcomment
     \getpretties{#1}{#2}%
   \else\ifinCsingle
     \getprettydata{#2}%
     \ifnum\prettytype=50
       \beginofpretty[\!!prettyfive]\getpretties{#1}{#2}\endofpretty%\beginofpretty[\!!prettyeight]%
     \else\ifnum\prettytype=80
       \beginofpretty[\!!prettyfive]\getpretties{#1}{#2}\endofpretty%\beginofpretty[\!!prettyeight]%
     \else
       \getpretties{#1}{#2}%
     \fi\fi
   \else\ifinCdouble
     \beginofpretty[\!!prettyfive]\getpretties{#1}{#2}\endofpretty% \beginofpretty[\!!prettynine]%
   \else
     \beginofpretty[\!!prettyfive]\getpretties{#1}{#2}\endofpretty
   \fi\fi\fi}

\gdef\doCtypefiveB#1%
  {\endCtypesix
   \ifinCcomment
     \ifcat#1\relax
       \continueCsinglelinecommenttrue
       \getpretty{#1}%
     \else
       \getpretty{#1}%
     \fi
   \else\ifinCsingle
     \getpretty{#1}%
   \else\ifinCdouble
     \beginofpretty[\!!prettyfive]\getpretty{#1}\endofpretty% \beginofpretty[\!!prettynine]%
   \else
     \beginofpretty[\!!prettyfive]\getpretty{#1}\endofpretty
   \fi\fi\fi}


so: 

\gdef\doCtypefiveA#1#2%
  {\endCtypesix
   \ifinCcomment
     \getpretties{#1}{#2}%
   \else\ifinCsingle
     \getprettydata{#2}%
     \ifnum\prettytype=50
       \beginofpretty[\!!prettyfive]\getpretties{#1}{#2}\endofpretty
     \else\ifnum\prettytype=80
       \beginofpretty[\!!prettyfive]\getpretties{#1}{#2}\endofpretty
     \else
       \getpretties{#1}{#2}%
     \fi\fi
   \else\ifinCdouble
     \beginofpretty[\!!prettyfive]\getpretties{#1}{#2}\endofpretty       \else
     \beginofpretty[\!!prettyfive]\getpretties{#1}{#2}\endofpretty
   \fi\fi\fi}

\gdef\doCtypefiveB#1%
  {\endCtypesix
   \ifinCcomment
     \ifcat#1\relax
       \continueCsinglelinecommenttrue
       \getpretty{#1}%
     \else
       \getpretty{#1}%
     \fi
   \else\ifinCsingle
     \getpretty{#1}%
   \else\ifinCdouble
     \beginofpretty[\!!prettyfive]\getpretty{#1}\endofpretty
  \else
     \beginofpretty[\!!prettyfive]\getpretty{#1}\endofpretty
   \fi\fi\fi}

seems to work ok here 


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

      reply	other threads:[~2006-08-18  8:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.390.1155851396.2039.ntg-context@ntg.nl>
2006-08-18  8:01 ` verb-c wwl
2006-08-18  8:28   ` verb-c Taco Hoekwater
2006-08-18  8:37     ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44E57C4B.6040402@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).