Date: Thu, 11 Sep 2003 02:49:40 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [Ux2bs_Archive] No. 199 ************************************************** Wednesday 10 September 2003 Number 199 ************************************************** Subjects for today 1 Re: Possible problem with read() and write()? -- Never mind : James Moe" 2 Re: Possible problem with read() and write()? -- Never mind : Dave Saville" 3 Re: Possible problem with read() and write()? -- Never mind : Stefan.Neis at t-online.de 4 Another IFS= problem : James Moe" 5 Re: Another IFS= problem : Henry Sobotka **= Email 1 ==========================** Date: Thu, 11 Sep 2003 00:16:45 -0700 (MST) From: "James Moe" Subject: Re: Possible problem with read() and write()? -- Never mind -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 11 Sep 2003 09:04:46 +0100, Stefan.Neis at t-online.de wrote: > For some operating >systems (especially all Unices), there's no difference between text >mode and binary mode, however. > Ah! Again I get it. Another *nix thing, the newline (LF), that is transparent in *nix but becomes a gotcha in os/2 (CR+LF). By opening the files in binary mode, I got rid of all that conditional read/write code. - -- jimoe at sohnen-moe dot com pgp/gpg public key: http://www.keyserver.net/en/ -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0 OS/2 for non-commercial use Comment: PGP 5.0 for OS/2 Charset: cp850 wj8DBQE/YCFdsxxMki0foKoRAhXrAJ9jpuA/OXz6IYclf8Wk/djpPAPENQCfb7LD UZKeLLekDdTSX9KL/ZYO3Io= =1cT5 -----END PGP SIGNATURE----- _______________________________________________ UX2BS mailing list UX2BS at os2ports.com http://os2ports.com/mailman/listinfo/ux2bs **= Email 2 ==========================** Date: Thu, 11 Sep 2003 08:09:33 +0100 (BST) From: "Dave Saville" Subject: Re: Possible problem with read() and write()? -- Never mind On Wed, 10 Sep 2003 23:47:06 -0400, Henry Sobotka wrote: >Answered my question...compiling with -Zbin-files should do the trick. > Don't think there is such a thing as binary mode in *nix - Certainly there is no O_BINARY in the h files and it goes against the *nix mantra of "everything is a stream of bytes". Don't forget there is no cr/lf mucking about on *nix. -- Regards Dave Saville _______________________________________________ UX2BS mailing list UX2BS at os2ports.com http://os2ports.com/mailman/listinfo/ux2bs **= Email 3 ==========================** Date: Thu, 11 Sep 2003 09:04:46 +0100 From: Stefan.Neis at t-online.de Subject: Re: Possible problem with read() and write()? -- Never mind Hi, > With EMX O_TEXT is the default mode. Neither bogofilter nor tdb > indicate a mode, so the occasional lost byte would be a CR being > chucked out. > Does *nix open in binary mode by default? I guess os/2 > is the same? Hmm. Let me put it like this: All operating systems open files in text mode by default (when using C library functions). For some operating systems (especially all Unices), there's no difference between text mode and binary mode, however. Regards, Stefan _______________________________________________ UX2BS mailing list UX2BS at os2ports.com http://os2ports.com/mailman/listinfo/ux2bs **= Email 4 ==========================** Date: Thu, 11 Sep 2003 17:14:29 -0700 (MST) From: "James Moe" Subject: Another IFS= problem -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, A libtool script is using IFS= to tokenize a string. This time it is using a tilde (~) instead of a colon. Simple attempts to replace the tilde with a semicolon are not working: cmd2=`echo $cmds | tr '~' ';'` cmd2=`echo $cmds | sed "s/~/;/g"` In both cases the replacement character is a space, not a semicolon. I have tried other replacement characters as well with no change in behavior. There must be something about a tilde that is special. Escaping it (\~) or using a octal code (\176) made no difference. Any ideas about how to change a tilde to a semicolon? - -- jimoe at sohnen-moe dot com pgp/gpg public key: http://www.keyserver.net/en/ -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0 OS/2 for non-commercial use Comment: PGP 5.0 for OS/2 Charset: cp850 wj8DBQE/YQ/lsxxMki0foKoRApv6AJ9kryBhstTC9nPc5W77wc1n1EzM0wCg8n+R m9OXvAcMunxKB1f+frzLD74= =srmI -----END PGP SIGNATURE----- _______________________________________________ UX2BS mailing list UX2BS at os2ports.com http://os2ports.com/mailman/listinfo/ux2bs **= Email 5 ==========================** Date: Thu, 11 Sep 2003 21:09:01 -0400 From: Henry Sobotka Subject: Re: Another IFS= problem The tilde is normally shorthand for HOME, as in "ls ~". which makes it a very poor choice of tokenizer for a string of paths, which might already contain tildes. h~ _______________________________________________ UX2BS mailing list UX2BS at os2ports.com http://os2ports.com/mailman/listinfo/ux2bs