Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh and line breaks



On Tue, 6 Apr 2004, Peter Stephenson wrote:

> "Peter A. Castro" wrote:
> > Ok, see attached diff of the following files.  These are primarily Cygwin
> > specific fixes, but some could be considdered generic:
> >
> > Doc/Makefile.in - A little correction to the texi2html command
> >                   args and a fix to the install.html target to use sdir.
> > Src/builtin.c - Prevent from constructing "//path".
> > Src/exec.c    - change read to use actual length instead of stat'd length.
> > Src/main.c    - added Cygwin premain hook to deal with Text related I/O.
> > Src/system.h  - add #include of <sys/cygwin.h>.
> > configure     - change DLLD & DLLDFLAGS to not use dllwrap
> > configure.ac  - change DLLD & DLLDFLAGS to not use dllwrap
>
> Thanks, I've committed this apart from the texi2html hunk.

Thanks, Peter :)

> It's possible opening all files in text mode will cause problems
> elsewhere, e.g. on file descriptors passed to external programmes, but
> the text/binary problem is inescapable; we probably need to wait and
> see.  We can always invent grotesqueries like <#myfile.bin if it becomes
> necessary.

If it's any consolation, only files which are opened only as O_RDONLY are
massaged to be opened with the special O_TEXT attribute.  All O_WRONLY
and O_RDWR are left alone, which I hope, will produce the correct
semantic.  Since shells are primarily dealing with textual data I feel
this is a sufficient trade-off.  I will, of course, be following this
issue and report if there are any problems (which I'll probably have to
fix, since I opened this can'o'worms myself :)  But, as you say, time
will tell.

-- 
Peter A. Castro <doctor@xxxxxxxxxxxx> or <Peter.Castro@xxxxxxxxxx>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood



Messages sorted by: Reverse Date, Date, Thread, Author