www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/06/04:45:06

From: Peter Annema <disttsc AT noord DOT bart DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: I32S warnings ? (Tierra v4.3)
Date: Fri, 06 Dec 1996 01:38:47 +0100
Organization: bART Internet Services
Lines: 65
Message-ID: <32A76B17.156A@noord.bart.nl>
References: <32A6280B DOT 7596 AT noord DOT bart DOT nl>
Reply-To: disttsc AT noord DOT bart DOT nl
NNTP-Posting-Host: asyn09.gn4.noord.bart.nl
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Peter Annema wrote:

> I've just begun to work with DJGPP and I'm not very familiar with C or
> C++ (I know a lot about Pascal and ASM though) and I tried to compile a
> program and got lots of warnings about using I32S (long integer ?).
> Why does DJGPP generate this warning and should I do something about it ?
Someone pointed out that I32S is not DJGPP internal, so I looked it up,
and here's the code for it (this program is very platform portable so I
hope I got the right part)
Remember, I only get warnings, no errors. The code does compile and the
program seems to work, but I suspect that DJGPP isn't showing the
warnings for no reason at all...

For MSDOS with any other compiler it does "typedef signed long I32s;"
For DJGPP it does "typedef int I32s;"
Does this have the same effect ?

This is a piece of code (from portable.h)...

/*---------------------begin cut------------------------*/
#ifdef MSDOS /* always defined by Microsoft C compiler & NDPC compiler
*/
             /* Microsoft C sets _osmode == OS2_MODE or DOS_MODE */

#ifndef DJGPP

#define ANSI
#define Hp     huge  *
#define Fp     far   *
#define Np     near  *
typedef signed char      I8s;   /*  8 bit integer */
typedef unsigned char    I8u;   /*  8 bit integer */
typedef signed int       I16s;  /* 16 bit integer */
typedef unsigned int     I16u;  /* 16 bit integer */
typedef signed long      I32s;  /* 32 bit integer */
typedef unsigned long    I32u;  /* 32 bit integer */
typedef unsigned long    N32u;  /* 32 bit integer */

#endif /* DJGPP */
#endif /* MSDOS */

#ifdef DJGPP

#include <limits.h>
#include <pc.h>
#define ANSI
#define Hp     *
#define Fp     *
#define Np     *
typedef char             I8s;   /*  8 bit integer */
typedef unsigned char    I8u;   /*  8 bit integer */
typedef short            I16s;  /* 16 bit integer */
typedef unsigned short   I16u;  /* 16 bit integer */
typedef int              I32s;  /* 32 bit integer */
typedef unsigned int     I32u;  /* 32 bit integer */
typedef unsigned int     N32u;  /* 32 bit integer */

#endif /* DJGPP */

/*------------------------end cut------------------------*/

For more info on Tierra (v4.3) and its source, go to
http://www.hip.atr.co.jp/~ray/tierra/tierra.html

Thanks in advance, Peter.

- Raw text -


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