🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.graphics.algorithms
Article #27

Re: IJG JPEG Engine and Win32

#27
From: Johannes Stahl
Date: Mon, 08 Jan 1996 14:38
47 lines
2901 bytes
fortunat@interpath.com (Jumpstile Turner) wrote:

>In article <TGL.96Jan3202549@netcom21.netcom.com>, tgl@netcom.com said:
>>  * Compiling them with different declarations for "boolean".  The IJG
>>    code by default defines boolean = int, but Windows prefers
>>    boolean = unsigned char.  Theoretically you should get a compile
>>    error if both typedefs are visible in one compilation, but maybe
>>    Borland fails to complain about it.
>>
>>If neither of those explain your problem, you'll have to do some more
>>digging, but I'll bet lunch that the problem is of this general ilk.

>  Well I think this is my problem.  I don't know how to go about fixing it 
>though.  Being as my application is a GUI application I NEED to include the 
>windows.h file, so "BOOLEAN" will be defined as an unsigned char, however 
>"boolean" is defined in one of the jpeglib includes as int.  If I went through 
>all the source and changed "boolean" to "BOOLEAN" would this screw up jpeglib? 
>Being as the source uses 0 for FALSE and 1 for TRUE I don't see why this 
>shouldn't work.  I'll have to give it a go.

look at the first lines of my jconfig.h:

#define HAVE_BOOLEAN     // this will avoid redefinition of boolean
// the following line is probably or definitely a hack
// since it implicitly duplifies the definiction from rpcnrd.h
typedef unsigned char boolean;  //conflict with RPCNRD.H  ---
 	 		            //  AAAAArrrrrrggghh!  JST

>  Oh yes, and lastly, with the borland BCC32 command line compiler, jdmerge.c 
>will not compile.  I get an internal backend C1107 error at line 280.  This 
>seems like a bug in the borland compiler. It will compile fine if I use 
>BCC32A, the alternate compiler. I have to undefine UPSAMPLE_MERGING_SUPPORTED 
>so it will skip the contents of jdmerge.c to get it to compile with the 
>standard WIN32 compiler.
You are right, this is a known bug. Most of the IJG library features
work well without UPSAMPLE_MERGING_SUPPORTED.





--
Dr. Johannes Stahl   Abt. Radiodiagnostik
Radiologische Klinik, D66421 Homburg/Saar (GERMANY)
Tel.: +49 6841 164600  Fax: +49 6841 164696
e-mail: rajsta@med-rz.uni-sb.de
http://www.med-rz.uni-sb.de/med_fak/radiodiagnostik/index.html
Technical Details
Message-ID: <4cr8tp$dp7@hades.rz.uni-sb.de>
Path: arc1-ca.pugleaf.net!hades.rz.uni-sb.de!news
References: <4cemir$6vb@redstone.interpath.net> <TGL.96Jan3202549@netcom21.netcom.com> <4cj5ct$nth@redstone.interpath.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!hades.rz.uni-sb.de!news
From: rajsta@med-rz.uni-sb.de (Johannes Stahl)
Newsgroups: comp.graphics.algorithms,comp.lang.c++,comp.os.ms-windows.programmer.graphics,comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32
Subject: Re: IJG JPEG Engine and Win32
Date: Mon, 08 Jan 1996 14:38:18 GMT
Organization: University of Saarland, Computing Center, Germany.
Message-ID: <4cr8tp$dp7@hades.rz.uni-sb.de>
References: <4cemir$6vb@redstone.interpath.net> <TGL.96Jan3202549@netcom21.netcom.com> <4cj5ct$nth@redstone.interpath.net>
NNTP-Posting-Host: ukdra02.med-ra.uni-sb.de
X-Newsreader: Forte Free Agent 1.0.82