Mail Archives: djgpp/1997/10/13/19:45:44
In article <343e6b21 DOT 0 AT news3 DOT ibm DOT net>, vischne AT ibm DOT net-nospam says...
>
>Linux has an image-file viewer with an outstanding interface. It's called
>zgv, and the source code is available.
>
>I checked it out. It uses svgalib, which has been ported to djgpp, and it
>uses a few calls to the Linux system that are localized in zgv.c and don't
>seem to do very much under Dos or Windows32/95/nt. I got rid of the Linux
>calls using an `#ifdef __DJGPP' here and there, and then I discovered that
>zgv reads the keyboard using the `read()' library function. And, it assumes
>that it gets back vt100 escape sequences for the function and arrow keys.
>So, that got changed to getkey() with a translation table for the DJGPP
><key.h> equivalents of the internal zgv keys (and a line of code that says
>that, when getkey() returns '\r', translate that to '\n'). Also, as is
>customary with other Dos apps, zgv's use of `fopen(name, "rb")' for image
>files doesn't return what you expect under Unix, so I changed the code to
>indicate success whatever.
>
>Now, I have zgv.exe running in a full-screen, DPMI-enabled, Dos window under
>Windows 95. It accepts keyboard input, but can't find the mouse, something
>that also happens under Linux. And, it reads bitmap files, but not gif or
>jpeg. I get perfect displays of Linux zgv thumbnail files, and all the keys
>for manipulating intensity, contrast, and size work perfectly. Only, the
>messagebox about waiting for jpeg decodes never exits.
>
>By the way, zgv.exe (2.8) under Dos looks exactly like zgv.exe under Linux.
>Now, if the jpeg handling gets cleared up.
>
Oh, gee. For some reason, my followup article on this topic disappeared
from the ibm.net news server. I guess you'll just have to do the programming
yourself until you discover that the progress meter called during scanning
of jpegs somehow doesn't return, and, if you disable it, jpegs display
properly under zgv ported using djgpp.
- Raw text -