[comp.sys.mac.programmer] Editing UNIX files from Mac OS

jcg@iris.brown.edu (Jim Grandy) (09/22/89)

Can someone point me to a Mac OS editor which can read and edit text files 
in which, as in UNIX,
line feeds are used instead of carriage returns? I am getting really tired 
of using UNIX editors from NCSA Telnet when a Mac editor is so easily 
available. Unfortunately, no editor I can find will automatically (i.e. 
without doing a global search/replace at load and save time) read UNIX 
files. We have the ability to mount UNIX volumes on our macs here (via a 
Gator box or, I guess, the Apple Internet Router), so the files are 
available.
Tips anyone? ("use emacs" is _not_ what I am looking for)

btw, one possible solution is QUED/Nisus, in which you could write a 
script replacing 'Load'
which would perform a grep/replace after loading the file. This seems like 
a poor solution,
however, since it would presumably take some time to do the replace for a 
large file.

Thanks! (please mail me; i'll post a summary to the net)

Jim Grandy
Brown University/IRIS
jcg@iris.brown.edu
(401) 863-1610

oster@dewey.soe.berkeley.edu (David Phillip Oster) (09/23/89)

In article <15944@brunix.UUCP> jcg@iris.brown.edu (Jim Grandy) writes:
>Can someone point me to a Mac OS editor which can read and edit text files 
>in which, as in UNIX, line feeds are used instead of carriage returns?

One solution: if you can find an editor available in source code, such as
a copy of the now out of print CAPPS', you can add a little loop to the
read and write routines to convert line feeds to carriage returns on read
and convert carriage returns to line feeds on write. In compiled code, it
will take just a millisecond.
--- According to the Constitution, the Constitution is unconstitutional:
--- David Phillip Oster            --U.S.Constitution I.10.1: "No State shall
Arpa: oster@dewey.soe.berkeley.edu --enter into any treaty, alliance, or
Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu -- confederation..."

allbery@NCoast.ORG (Brandon S. Allbery) (09/29/89)

As quoted from <15944@brunix.UUCP> by jcg@iris.brown.edu (Jim Grandy):
+---------------
| Can someone point me to a Mac OS editor which can read and edit text files 
| in which, as in UNIX,
| line feeds are used instead of carriage returns? I am getting really tired 
| of using UNIX editors from NCSA Telnet when a Mac editor is so easily 
| available.
| Tips anyone? ("use emacs" is _not_ what I am looking for)
+---------------

Does that include MacJove?  It works fine.  In fact, it screwed me up when I
did a download from ncoast, popped into MacJove to verify it was okay, then
uploaded to a non-Unix system... and found out afterward that the file was
still a Unix text file.  (Sigh.)

++Brandon
-- 
Brandon S. Allbery, moderator of comp.sources.misc	     allbery@NCoast.ORG
uunet!hal.cwru.edu!ncoast!allbery		    ncoast!allbery@hal.cwru.edu
bsa@telotech.uucp, 161-7070 BALLBERY (MCI), ALLBERY (Delphi), B.ALLBERY (GEnie)
Is that enough addresses for you?   no?   then: allbery@uunet.UU.NET (c.s.misc)

mikek@hpvcfs1.HP.COM (Mike Kirkpatrick) (10/04/89)

[ try MacJove... ]

I tried using MacJove a bit and found that it would choke on very large files.
I forget just how big, but inputing files larger that 100k or better would
cause the Mac to crach (la bomba). This was on a 512k Mac.

Another anoyance is that MacJove cannot search for strings containing
CRs unlike emacs. This was a primary feature difference between emacs and vi(on
a unix system) that had me using emacs for a while. However, emacs is at least
as limiting as MacJove on the Mac.

I just use Edit mostly. I've got to search the BBs for a copy of steVIe for the
Mac. It might handle your LF versus CR issue. I'm not sure. Does anybody else
know? 

No fancy signature here!

Disclaimer: Views expressed here are mine, all mine.