www.digitalmars.com         C & C++   DMDScript  

D - Any plans to fix the ASCII 10 bug / DIDE

reply J Anderson <REMOVEanderson badmama.com.au> writes:
Are there any plans to fix the bug where ASCII 10 by-itself (without 13) 
is not recognised as an enter?  Otherwise could charles put something in 
DIDE so ASCII 10 by themselves are fixed?  At the moment I'm resorting 
to copying into mozilla and pasting back into DIDE.  I suppose I could 
write a filter, but that wouldn't work with DIDE.

Anderson
Jan 07 2004
next sibling parent reply "C" <dont respond.com> writes:
Hmm im not sure this is a bug.  Windows convention is to use \r\n as new
line  , where unix is \n alone.  I can add a translate newline function ?

C


"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:bth8dq$1ra0$1 digitaldaemon.com...
 Are there any plans to fix the bug where ASCII 10 by-itself (without 13)
 is not recognised as an enter?  Otherwise could charles put something in
 DIDE so ASCII 10 by themselves are fixed?  At the moment I'm resorting
 to copying into mozilla and pasting back into DIDE.  I suppose I could
 write a filter, but that wouldn't work with DIDE.

 Anderson

Jan 07 2004
next sibling parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
C wrote:

Hmm im not sure this is a bug.  Windows convention is to use \r\n as new
line  , where unix is \n alone.  I can add a translate newline function ?

C

  

when saving or copy/pasting although their's be an associated performance hit. What if your trying to compile a unix program in windows? I don't see why the compiler can't treat \n as an enter, (dare I say it) even as a compiler switch. It could be part of the D compiler standard to treat both \n and \r\n the same, as most windows editors do. This is particularly problematic when copying from VS which happens to use \n. I think it'll put many new users off if something isn't done about it. Anderson
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:bth8dq$1ra0$1 digitaldaemon.com...
  

Are there any plans to fix the bug where ASCII 10 by-itself (without 13)
is not recognised as an enter?  Otherwise could charles put something in
DIDE so ASCII 10 by themselves are fixed?  At the moment I'm resorting
to copying into mozilla and pasting back into DIDE.  I suppose I could
write a filter, but that wouldn't work with DIDE.

Anderson

    


Jan 07 2004
parent reply "C" <dont respond.com> writes:
Hmm  where are you copying from to get this behavior ?  I copy from VS and
it looks ok.  There is a way to convert automatically, just need something
to test it with.

Thanks,
C
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:bthjic$2cmn$1 digitaldaemon.com...
 C wrote:

Hmm im not sure this is a bug.  Windows convention is to use \r\n as new
line  , where unix is \n alone.  I can add a translate newline function ?

C

when saving or copy/pasting although their's be an associated performance hit. What if your trying to compile a unix program in windows? I don't see why the compiler can't treat \n as an enter, (dare I say it) even as a compiler switch. It could be part of the D compiler standard to treat both \n and \r\n the same, as most windows editors do. This is particularly problematic when copying from VS which happens to use \n. I think it'll put many new users off if something isn't done about it. Anderson
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:bth8dq$1ra0$1 digitaldaemon.com...


Are there any plans to fix the bug where ASCII 10 by-itself (without 13)
is not recognised as an enter?  Otherwise could charles put something in
DIDE so ASCII 10 by themselves are fixed?  At the moment I'm resorting
to copying into mozilla and pasting back into DIDE.  I suppose I could
write a filter, but that wouldn't work with DIDE.

Anderson



Jan 07 2004
parent J Anderson <REMOVEanderson badmama.com.au> writes:
C wrote:

Hmm  where are you copying from to get this behavior ?  I copy from VS and
it looks ok.  There is a way to convert automatically, just need something
to test it with.

  

Why not create a binary file in edit and then open with dide or copy from notepad.
Jan 07 2004
prev sibling parent reply "Serge K" <skarebo programmer.net> writes:
 Hmm im not sure this is a bug.  Windows convention is to use \r\n as new
 line  , where unix is \n alone.  I can add a translate newline function ?

Well, AFAIK Mac convention is to use \r alone.
Jan 07 2004
parent reply "Sean L. Palmer" <palmer.sean verizon.net> writes:
Now that Mac switched to Unix, is that still the case?

Sean

"Serge K" <skarebo programmer.net> wrote in message
news:btiosp$15up$1 digitaldaemon.com...
 Hmm im not sure this is a bug.  Windows convention is to use \r\n as new
 line  , where unix is \n alone.  I can add a translate newline function


 Well, AFAIK Mac convention is to use \r alone.

Jan 08 2004
parent "Serge K" <skarebo programmer.net> writes:
 Now that Mac switched to Unix, is that still the case?

Apparently, not any more. (at least for the new files:-) http://en2.wikipedia.org/wiki/Newline ... CR: Mac OS through 9 LF: Mac OS X
Jan 08 2004
prev sibling next sibling parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
J Anderson wrote:

 Are there any plans to fix the bug where ASCII 10 by-itself (without 
 13) is not recognised as an enter?  Otherwise could charles put 
 something in DIDE so ASCII 10 by themselves are fixed?  At the moment 
 I'm resorting to copying into mozilla and pasting back into DIDE.  I 
 suppose I could write a filter, but that wouldn't work with DIDE.

 Anderson

It's not consistent. ie //a function void func() { } That looks like: line 1: "//a function\rvoid func(){\r\n}" Compiles fine! However, if \r isn't supported, then it shouldn't compile because it looks like this to the compiler //a functionvoid func() { } //Error should be here. So I think the rule should be, whenever the compiler sees a \r or \n by itself it's a new line. If the compiler sees an \r pair \n (ie \r\n or \n\r), it's a new line (ie only count \n in this case) -> admitily this could be a small problem if you have something like: \r\n\n\r\r -> 3 lines Anyway most good editors handle this, so why not D?
Jan 08 2004
parent reply "C" <dont respond.com> writes:
 Anyway most good editors handle this, so why not D?

why not DIDE ? I've updated it , im touching up the brace highlighting , and adding New File From template and will udpate later tonight. Also mutlpile top level directories are now supported. C "J Anderson" <REMOVEanderson badmama.com.au> wrote in message news:btko3c$13l0$1 digitaldaemon.com...
 J Anderson wrote:

 Are there any plans to fix the bug where ASCII 10 by-itself (without
 13) is not recognised as an enter?  Otherwise could charles put
 something in DIDE so ASCII 10 by themselves are fixed?  At the moment
 I'm resorting to copying into mozilla and pasting back into DIDE.  I
 suppose I could write a filter, but that wouldn't work with DIDE.

 Anderson

It's not consistent. ie //a function void func() { } That looks like: line 1: "//a function\rvoid func(){\r\n}" Compiles fine! However, if \r isn't supported, then it shouldn't compile because it looks like this to the compiler //a functionvoid func() { } //Error should be here. So I think the rule should be, whenever the compiler sees a \r or \n by itself it's a new line. If the compiler sees an \r pair \n (ie \r\n or \n\r), it's a new line (ie only count \n in this case) -> admitily this could be a small problem if you have something like: \r\n\n\r\r -> 3 lines Anyway most good editors handle this, so why not D?

Jan 08 2004
parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
C wrote:

Anyway most good editors handle this, so why not D?
    

why not DIDE ? I've updated it , im touching up the brace highlighting , and adding New File From template and will udpate later tonight. Also mutlpile top level directories are now supported.

level. I mean, if not, every editor maker for D will have to go to the trouble you've been to (and I do appreasiate it thanks). Wow, DIDE just keeps getting better and better.
Jan 08 2004
parent "C" <dont respond.com> writes:
Hehe it turns out just to be one call ,

SCI_CONVERTEOLS(SC_EOL_CRLF)

:)

C
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:btkrkv$1931$1 digitaldaemon.com...
 C wrote:

Anyway most good editors handle this, so why not D?

why not DIDE ? I've updated it , im touching up the brace highlighting , and adding New File From template and will udpate later tonight. Also mutlpile top level directories are now supported.

level. I mean, if not, every editor maker for D will have to go to the trouble you've been to (and I do appreasiate it thanks). Wow, DIDE just keeps getting better and better.

Jan 08 2004
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:bth8dq$1ra0$1 digitaldaemon.com...
 Are there any plans to fix the bug where ASCII 10 by-itself (without 13)
 is not recognised as an enter?  Otherwise could charles put something in
 DIDE so ASCII 10 by themselves are fixed?  At the moment I'm resorting
 to copying into mozilla and pasting back into DIDE.  I suppose I could
 write a filter, but that wouldn't work with DIDE.

The rule is: \r by itself is newline \n by itself is newline \r\n as a pair is a newline Please send me any examples where this doesn't work right.
Jan 09 2004
parent J Anderson <REMOVEanderson badmama.com.au> writes:
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit


Reports line(5) error, but there's nothing on line 5.

The rule is:

\r by itself is newline
\n by itself is newline
\r\n as a pair is a newline

Please send me any examples where this doesn't work right.
  

<cid:part1.01050007.03020108 badmama.com.au>
Jan 09 2004