TIP: Click on subject to list as thread! ANSI
echo: semware
to: All
from: `Sammy Mitchell`
date: 2003-02-27 02:00:04
subject: [TSEPro] Re: Line terminators

From: "Sammy Mitchell" 
@Date: Wed, 26 Feb 2003 10:30:05 -0500
@Sender: semware-owner{at}sawasdi.apana.org.au



DaveG wrote:
>The hex mode display doesn't help as the CR
>or CR/LF are not displayed---why not?

When TSE loads a file, the end-of-line characters are
removed.  This makes the overall logic much easier in most
places (but harder in a few others).

So, you can't see them in HEX mode, because they are not
there (unless you load the file in binary mode).

To see them, you'll have to load the file in binary mode.

Try the undocumented binary mode -3, for instance:

g32 -b-3 foo.bar

You'll probably want to use an OEM font.

>If not, can anyone give me any clues on
>how to determine the terminator character(s)?

The editor does not currently make that information
available, but I'll gladly change that.

But what is the interface?  A new function?

string GetCurrEOLType()
    returns the end-of-line characters for the current file
    as a string.

integer GetCurrEOLType()
    returns the end-of-line characters for the current file
    as a flag, _CR_, _CR_LF_, _LF_.

Or a new editor variable?

How about in the already existing BufferFlags editor
variable?  I've still got 20+ bits left, so I could create
new flags to or in.

But what do I return if the file is a mixture, e.g., some
lines end in CR, some in LF, and some in both?

--
Sammy Mitchell

--
TSEPro Mailing List
List Maintenance: www.semware.com/html/list.htm



---
[sawasdi.apana.org.au] (3:800/846.13)
* Origin: apana>>>>>fidonet
SEEN-BY: 633/267 270
@PATH: 800/846 1 640/954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.