delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/13/19:45:44

Newsgroups: comp.os.msdos.djgpp
Subject: Re: Porting the zgv program using djgpp
Distribution: world
From: vischne AT ibm DOT net-nospam (root)
Organization: The Light
References: <343e6b21 DOT 0 AT news3 DOT ibm DOT net>
MIME-Version: 1.0
NNTP-Posting-Host: 32.100.34.57
Message-ID: <34400da1.0@news3.ibm.net>
Date: 11 Oct 97 23:37:05 GMT
Lines: 34
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019