[comp.unix.xenix] zoo and MSDOS vs. UNIX

mdf@tut.cis.ohio-state.edu (Mark D. Freeman) (11/06/87)

MSDOS delimits lines in files with CR/LF, UNIX with just LF.

zoo a bunch of files unde one OS and un-zoo the archive under the
other, and you have to edit every file.

Or am I missing something...

-- 
Mark D. Freeman							(614) 262-3703
StrongPoint Systems, Inc.			    mdf@tut.cis.ohio-state.edu
2440 Medary Avenue		 ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!mdf
Columbus, OH  43202		    Guest account at The Ohio State University

iverson@cory.Berkeley.EDU (Tim Iverson) (11/07/87)

In article <1181@tut.cis.ohio-state.edu> (Mark D. Freeman) writes:
>MSDOS delimits lines in files with CR/LF, UNIX with just LF.  [Pack] a bunch
>of files under one OS [with zoo] and un-zoo the archive under the other, and
>you have to edit every file.  Or am I missing something?

No, you're not.  This is one of my two complaints about ZOO.  The other is
that it's pretty slow - not as slow as ARC, but not as fast as PKARC.  Both
ARC and ZOO files require editing when unpacked.  I still use ZOO over ARC
since it supports directories, and is much more portable.


- Tim Iverson
  iverson@cory.Berkeley.EDU
  ucbvax!cory!iverson

richardh@killer.UUCP (Richard Hargrove) (11/12/87)

In article <1181@tut.cis.ohio-state.edu>, mdf@tut.cis.ohio-state.edu (Mark D. Freeman) writes:
> MSDOS delimits lines in files with CR/LF, UNIX with just LF.
> 
> zoo a bunch of files unde one OS and un-zoo the archive under the
> other, and you have to edit every file.
> 
> Or am I missing something...
> 

MS-DOS files brought over to *ix can have the superfluous '\015's stripped 
out with 

	tr -d "\015" *

There is no standard tool running on MS-DOS to achieve the converse,
but then the Unix-based toolset is quite a bit richer than MS-DOS's.

richard hargrove
...!ihnp4!killer!richardh
-------------------------

wnp@killer.UUCP (Wolf Paul) (11/13/87)

In article <2062@killer.UUCP> richardh@killer.UUCP (Richard Hargrove) writes:
>
>MS-DOS files brought over to *ix can have the superfluous '\015's stripped 
>out with 
>
>	tr -d "\015" *
>
>There is no standard tool running on MS-DOS to achieve the converse,
>but then the Unix-based toolset is quite a bit richer than MS-DOS's.

The following is a little program which will do the converse on MS-DOS.
It is rather primitive and needs to be invoked with commandline redirection,
but it works.

Compile with any reasonable DOS C Compiler and use like this:

	addcr < unixfile > dosfile


/* addcr.c -- add CR characters to UNIX LF characters.
 * In the Public Domain
 */

#include <stdio.h>

main()
{
	int c;

	while ( ( c = getchar() ) != EOF )
	{

/* Most DOS C Compilers will output 'CR/NL' for the C character '\n' */
		if ( c == '\012') putchar('\n');

/* If the above does not work for you, delete the above line and use 
 * the following instead:
 */
/*		if ( c == '\012') putchar('\015'); */
/*		putchar(c);	*/
	}
}

/* End of addcr.c */


Wolf Paul
ihnp4!killer!wnp