Skip to content

Commit

Permalink
Removed the old Splint for inconsistent size_t type.
Browse files Browse the repository at this point in the history
Added a define for the max length of a filename_t.
  • Loading branch information
danij committed Nov 3, 2008
1 parent 113d2a5 commit 85fc4f8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 37 deletions.
62 changes: 29 additions & 33 deletions doomsday/engine/api/dd_types.h
Expand Up @@ -42,7 +42,7 @@
#endif

#ifndef _MSC_VER
#include <stdint.h> // Not MSVC so use C99 standard header
#include <stdint.h> // Not MSVC so use C99 standard header
#else
/* MSVC must define them ouselves.
ISO C9x Integer types - not all of them though, just what we need
Expand Down Expand Up @@ -98,37 +98,33 @@ typedef unsigned long long uintmax_t;
#endif

#ifndef UNIX
typedef unsigned int uint;
typedef unsigned short ushort;

/*
Splint 3.1.1 --- 03 Nov 2006
../../api/dd_types.h:95:22: Datatype size_t declared with inconsistent type: unsigned int
typedef unsigned int size_t;
*/
typedef unsigned int uint;
typedef unsigned short ushort;

#else

typedef uint32_t uint;
typedef uint16_t ushort;
typedef uint32_t uint;
typedef uint16_t ushort;

#endif

typedef int fixed_t;
typedef unsigned int angle_t;
typedef int spritenum_t;
typedef int fixed_t;
typedef unsigned int angle_t;
typedef int spritenum_t;
typedef int lumpnum_t;
typedef uint32_t materialnum_t;
typedef uint32_t ident_t;
typedef unsigned short nodeindex_t;
typedef unsigned short thid_t;
typedef unsigned char byte;
typedef double timespan_t;
typedef char filename_t[256];
typedef unsigned short nodeindex_t;
typedef unsigned short thid_t;
typedef unsigned char byte;
typedef double timespan_t;

#define FILENAME_T_MAXLEN (256)
typedef char filename_t[FILENAME_T_MAXLEN+1];

typedef struct directory_s {
int drive;
filename_t path;
int drive;
filename_t path;
} directory_t;

typedef struct trigger_s {
Expand All @@ -137,16 +133,16 @@ typedef struct trigger_s {
} trigger_t;

#ifdef __cplusplus
# define boolean int
#else // Plain C.
# define boolean int
#else // Plain C.
# ifndef __BYTEBOOL__
# define __BYTEBOOL__
# endif
typedef enum ddboolean_e { false, true } ddboolean_t;
# define boolean ddboolean_t
# define boolean ddboolean_t
#endif

#define BAMS_BITS 16
#define BAMS_BITS 16

#if BAMS_BITS == 32
typedef unsigned long binangle_t;
Expand All @@ -156,16 +152,16 @@ typedef unsigned short binangle_t;
typedef unsigned char binangle_t;
#endif

#define DDMAXCHAR ((char)0x7f)
#define DDMAXSHORT ((short)0x7fff)
#define DDMAXINT ((int)0x7fffffff) // max pos 32-bit int
#define DDMAXLONG ((long)0x7fffffff)
#define DDMAXCHAR ((char)0x7f)
#define DDMAXSHORT ((short)0x7fff)
#define DDMAXINT ((int)0x7fffffff) // max pos 32-bit int
#define DDMAXLONG ((long)0x7fffffff)
#define DDMAXFLOAT ((float)1E+37)

#define DDMINCHAR ((char)0x80)
#define DDMINSHORT ((short)0x8000)
#define DDMININT ((int)0x80000000) // max negative 32-bit integer
#define DDMINLONG ((long)0x80000000)
#define DDMINCHAR ((char)0x80)
#define DDMINSHORT ((short)0x8000)
#define DDMININT ((int)0x80000000) // max negative 32-bit integer
#define DDMINLONG ((long)0x80000000)
#define DDMINFLOAT ((float)-(1E+37))

// Predeclarations for map data types. The contents of these structs is
Expand Down
5 changes: 1 addition & 4 deletions doomsday/engine/portable/src/p_think.c
Expand Up @@ -58,13 +58,10 @@ static thinker_t thinkerCap; // The head and tail of the thinker list.

boolean P_IsMobjThinker(think_t thinker)
{
think_t altfunc;

if(thinker == gx.MobjThinker)
return true;

altfunc = gx.GetVariable(DD_ALT_MOBJ_THINKER);
return (altfunc && thinker == altfunc);
return false;
}

void P_ClearMobjIDs(void)
Expand Down

0 comments on commit 85fc4f8

Please sign in to comment.