public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Josh Perlmutter" <buttermaker@hotmail.com>
To: kabir.patel@uk.andersen.com, me@rupey.net
Cc: gcc-help@gcc.gnu.org
Subject: Re: Control M ????
Date: Tue, 12 Feb 2002 13:11:00 -0000	[thread overview]
Message-ID: <F48BHNHoOlVNKdVVDMC00009804@hotmail.com> (raw)

for some reason my last reply got screwed up and didn't go tot he list.

for those interested, there's a little perl script i have that fixes this 
problem.
http://comp20.eecs.tufts.edu/jperlmut/
"clean.pl"

dl the instructions too. it's all there. that is from the cross enrollment 
course  i took. i'm suprised they haven't taken it down.


anyway, a lot of students at deis write progs one their windows boxes and 
the ftp them to their cs account. one of my friends wrote the script to get 
rid of those pesky ^M characters without doing the manual work.

-Josh


>From: kabir.patel@uk.andersen.com
>To: me@rupey.net
>CC: gcc-help@gcc.gnu.org
>Subject: Control M ????
>Date: Tue, 12 Feb 2002 12:07:56 +0000
>
>
>
>
>Some time back I mentioned a problem I had with the ^M character (see 
>below).
>It so happens that I need to be able to replace every ^M in my resultant 
>file
>with a " " charachter.
>GNU isn't happy with ^M. Is there a way to define ^M in another way?
>
>Thanks in advance
>
>
>
>
>
>Kabir Patel wrote:
>
> > Line 9469  while((pChar=strchr(Uwel_notes1.str,'^M'))!=NULL)
> > Line 9470             *(pChar) = *" ";
>
>Embedding a character 13 into the source is horrible and, as it happens,
>is causing this problem. (I also don't like the next line: there's no
>point dereferencing a constant string just for a space! This isn't a
>really bug, though - just style.)
>
>Try:
>
>     while((pChar=strchr(Uwel_notes1.str,'\r'))!=NULL)
>                *(pChar) = ' ';
>
>The problem was that the compiler was interpreting the ^M as a line
>break and not a character constant. It was trying to compile:
>
>     while((pChar=strchr(Uwel_notes1.str,'
>     '))!=NULL)
>
>and single-quoted constants may not cross line boundaries.
>
>Rup.
>
>
>
>
>
>
>
>
>*******************Internet Email Confidentiality Footer*******************
>
>
>Privileged/Confidential Information may be contained in this message.  If 
>you
>are not the addressee indicated in this message (or responsible for 
>delivery of
>the message to such person), you may not copy or deliver this message to 
>anyone.
>In such case, you should destroy this message and kindly notify the sender 
>by
>reply email. Please advise immediately if you or your employer does not 
>consent
>to Internet email for messages of this kind.  Opinions, conclusions and 
>other
>information in this message that do not relate to the official business of 
>my
>firm shall be understood as neither given nor endorsed by it.
>
>




*******************
Josh Perlmutter
NOC "intern"
Brandeis University


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

             reply	other threads:[~2002-02-12 21:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-12 13:11 Josh Perlmutter [this message]
2002-02-12 16:31 ` Andrea 'Fyre Wyzard' Bocci
     [not found] <616BE6A276E3714788D2AC35C40CD18D3F2CB8@whale.softwire.co.uk>
2002-02-12  5:14 ` Rupert Wood
  -- strict thread matches above, loose matches on Subject: below --
2002-02-12  4:30 kabir.patel

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=F48BHNHoOlVNKdVVDMC00009804@hotmail.com \
    --to=buttermaker@hotmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=kabir.patel@uk.andersen.com \
    --cc=me@rupey.net \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).