Mail Archives: djgpp/1996/12/06/04:45:06
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 -