TextPad doesn't seem to honor Unix file endings only

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Raven
Posts: 10
Joined: Tue Nov 18, 2003 4:58 pm
Contact:

TextPad doesn't seem to honor Unix file endings only

Post by Raven »

I have all my configurations set for Unix files. Yet, no matter what I try, TP always adds an extra line at the bottom of the file. What's the trick to making it work correctly?
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Configure - Preferences - Editor

Uncheck "Automatically terminate the last line of the file"
Raven
Posts: 10
Joined: Tue Nov 18, 2003 4:58 pm
Contact:

Post by Raven »

Perfect! Thanks!
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

I don't understand your requirement. The subject of your post is TextPad doesn't seem to honor Unix file endings only. In Unix systems all records of a text file must end with a new line character; so a non-empty text file must end with a new line character. Many Unix applications require this and will not perform as the user intended if they are presented with a text file that ends with an unterminated record.
Raven
Posts: 10
Joined: Tue Nov 18, 2003 4:58 pm
Contact:

Post by Raven »

My requirements are as I stated. The applications I work with do not require the new line. In fact some of the text files that have new lines will cause the php applications to fail.
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
crackwitz
Posts: 13
Joined: Sun Oct 10, 2004 8:14 pm

Post by crackwitz »

then your php "application" is broken.

each line is to be terminated with \n (unix) or \r (mac) or \r\n (windows).

and terminating a line properly has nothing to do with "unix file endings". i know of compilers that bitch if you have your last line unterminated...

your original post sounded like you thought that "unix file ending" meant "last line not terminated by \n"... so that is probably what confused some of us.
Raven
Posts: 10
Joined: Tue Nov 18, 2003 4:58 pm
Contact:

Post by Raven »

crackwitz wrote:then your php "application" is broken.

each line is to be terminated with \n (unix) or \r (mac) or \r\n (windows).

and terminating a line properly has nothing to do with "unix file endings". i know of compilers that bitch if you have your last line unterminated...

your original post sounded like you thought that "unix file ending" meant "last line not terminated by \n"... so that is probably what confused some of us.
After responding on the 12th that my original issue was resolved, I would have thought this was done. Regardless of what you think, the PHP application is not broken. To make such a statement is ludicrous. My circumstances and environment require no empty lines or spaces after the closing ?>. Period - EOL.
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Post Reply