[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unixen and Dosfish

Dennis Payne wrote:

> Alexander Neundorf sent me patch a while ago that had a Unix to DOS and
> DOS to Unix conversion option.  I like the idea but the implementation
> isn't quite to my liking.  For one thing converting Unix to DOS followed
> by DOS to Unix (without saving/reloading the file) doesn't produce the
> same file.  You probably would never need this but I'd like it to work.
> More importantly I don't particularly like the option being on the File
> menu.  I'd prefer something more transparent.  I'd like to be able to
> load a DOS text file, edit, and save as a DOS text file without doing
> anything.  Currently DOS text files produce and extra blank line for
> the return.  Perhaps a toggle at the bottom (or elsewhere) of the window
> that indicates whether it is a DOS or Unix text file.  Or possibly add
> the ability to convert on save as.  (Don't know what to do about a
> partial DOS, partial UNIX text file.)

Because I work on NT boxen at work and linux at home, and Macs when I was at high school, I have (a
couple times, actually) coded up DOS<->Win<->Mac<->LF,CR text converters.  My latest and greatest one
can autodetect the input type and do the conversion all in one pass (so it can parse stdin, write to
stdout).  It probably wouldn't be too hard to integrate into the code, and because of its one-pass
nature could be made quite transparent.  And it does have the feature you mention that DOS->Unix->DOS
gives you back a file identical to the original file, provided that all the line ends really are DOS
ones.  I was planning on putting this code out under the GPL anyways, so I will try and find some time
to look into getting it to mesh some with (x)wpe.

Another person mentioned BBEdit as an example of a nice program on the Mac... UltraEdit is a program
with very similar capabilities for Windows... UltraEdit or BBEdit on Linux would just ROCK!

I digress...