When lynx handles a file to an external program (e.g., you click on a
jpeg file), it writes a copy with input file in a text mode.
(HTLoadFile() opens in text mode unless gzip/bzip2; then it gives it
to HTParseFile(), which calls HTFileCopy().) What follows is a
horrible hack, but I do not understand the details good enough to
deduce enough info to open file in binary mode...
Enjoy,
Ilya
--- ./WWW/Library/Implementation/HTFormat.c~ Wed Jan 7 18:03:08 2004
+++ ./WWW/Library/Implementation/HTFormat.c Wed Feb 4 11:24:14 2004
@@ -871,6 +871,12 @@ PUBLIC int HTFileCopy ARGS2(
*/
targetClass = *(sink->isa); /* Copy pointers to procedures */
+#ifdef __EMX__ /* Should be done for others too, but the API is not portable */
+ /* XXXX A horrible hack; this should have been done earlier... */
+ if (0 == strcmp(targetClass.name, "FileWriter"))
+ _fsetmode(fp,"b");
+#endif
+
/* Push binary from socket down sink
*/
HTReadProgress(bytes = 0, 0);
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]