mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
"long" audit. can't use long when we want 32 bits. May be a few more cases.
This commit is contained in:
parent
c90fa213d6
commit
87cc09233c
15 changed files with 35 additions and 35 deletions
|
@ -311,7 +311,7 @@ typedef void (GLAPIENTRY *QF_glTexCoordPointerEXT) (GLint size, GLenum type, GLs
|
|||
typedef void (GLAPIENTRY *QF_glVertexPointerEXT) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
|
||||
|
||||
// 3Dfx
|
||||
typedef long FxI32;
|
||||
typedef int FxI32;
|
||||
typedef FxI32 GrScreenResolution_t;
|
||||
typedef FxI32 GrDitherMode_t;
|
||||
typedef FxI32 GrScreenRefresh_t;
|
||||
|
|
|
@ -94,7 +94,7 @@ void WriteLong (struct QFile_s *file, unsigned int l);
|
|||
float ReadFloat (struct QFile_s *file);
|
||||
byte ReadByte (struct QFile_s *file);
|
||||
unsigned short ReadShort (struct QFile_s *file);
|
||||
unsigned long ReadLong (struct QFile_s *file);
|
||||
unsigned int ReadLong (struct QFile_s *file);
|
||||
|
||||
//@}
|
||||
//@}
|
||||
|
|
|
@ -83,7 +83,7 @@ static void
|
|||
s_xfer_stereo_16 (int endtime)
|
||||
{
|
||||
int lpaintedtime, lpos;
|
||||
unsigned long *pbuf;
|
||||
unsigned int *pbuf;
|
||||
|
||||
snd_vol = volume->value * 256;
|
||||
|
||||
|
@ -91,7 +91,7 @@ s_xfer_stereo_16 (int endtime)
|
|||
lpaintedtime = paintedtime;
|
||||
|
||||
|
||||
pbuf = (unsigned long *) shm->buffer;
|
||||
pbuf = (unsigned int *) shm->buffer;
|
||||
|
||||
while (lpaintedtime < endtime) {
|
||||
// handle recirculating buffer issues
|
||||
|
@ -118,7 +118,7 @@ s_xfer_paint_buffer (int endtime)
|
|||
{
|
||||
int count, out_idx, out_mask, snd_vol, step, val;
|
||||
int *p;
|
||||
unsigned long *pbuf;
|
||||
unsigned int *pbuf;
|
||||
|
||||
if (shm->samplebits == 16 && shm->channels == 2) {
|
||||
s_xfer_stereo_16 (endtime);
|
||||
|
@ -132,7 +132,7 @@ s_xfer_paint_buffer (int endtime)
|
|||
step = 3 - shm->channels;
|
||||
snd_vol = volume->value * 256;
|
||||
|
||||
pbuf = (unsigned long *) shm->buffer;
|
||||
pbuf = (unsigned int *) shm->buffer;
|
||||
|
||||
if (shm->samplebits == 16) {
|
||||
short *out = (short *) pbuf;
|
||||
|
|
|
@ -74,7 +74,7 @@ struct in_addr {
|
|||
struct {
|
||||
unsigned short s_w1, s_w2;
|
||||
} S_un_w;
|
||||
unsigned long S_addr;
|
||||
unsigned S_addr;
|
||||
} S_un;
|
||||
};
|
||||
|
||||
|
@ -87,7 +87,7 @@ struct sockaddr_in {
|
|||
char sin_zero[8];
|
||||
};
|
||||
char *inet_ntoa (struct in_addr in);
|
||||
unsigned long inet_addr (const char *cp);
|
||||
unsigned inet_addr (const char *cp);
|
||||
#endif
|
||||
#endif // BAN_TEST
|
||||
|
||||
|
@ -123,8 +123,8 @@ struct {
|
|||
|
||||
|
||||
#ifdef BAN_TEST
|
||||
unsigned long banAddr = 0x00000000;
|
||||
unsigned long banMask = 0xffffffff;
|
||||
unsigned banAddr = 0x00000000;
|
||||
unsigned banMask = 0xffffffff;
|
||||
|
||||
static void
|
||||
NET_Ban_f (void)
|
||||
|
@ -994,7 +994,7 @@ _Datagram_CheckNewConnections (void)
|
|||
#ifdef BAN_TEST
|
||||
// check for a ban
|
||||
if (clientaddr.qsa_family == AF_INET) {
|
||||
unsigned long testAddr;
|
||||
unsigned testAddr;
|
||||
|
||||
testAddr = ((struct sockaddr_in *) &clientaddr)->sin_addr.s_addr;
|
||||
if ((testAddr & banMask) == banAddr) {
|
||||
|
|
|
@ -115,7 +115,7 @@ static int net_controlsocket;
|
|||
static int net_broadcastsocket = 0;
|
||||
static struct qsockaddr broadcastaddr;
|
||||
|
||||
static unsigned long myAddr;
|
||||
static unsigned myAddr;
|
||||
|
||||
#include "net_udp.h"
|
||||
|
||||
|
@ -127,7 +127,7 @@ get_address (int sock)
|
|||
char buf[8192];
|
||||
int i, n;
|
||||
struct sockaddr_in *in_addr;
|
||||
unsigned long addr;
|
||||
unsigned addr;
|
||||
|
||||
ifc.ifc_len = sizeof (buf);
|
||||
ifc.ifc_buf = buf;
|
||||
|
@ -144,7 +144,7 @@ get_address (int sock)
|
|||
in_addr = (struct sockaddr_in *)&ifr[i].ifr_addr;
|
||||
Con_DPrintf ("%s: %s\n", ifr[i].ifr_name,
|
||||
inet_ntoa (in_addr->sin_addr));
|
||||
addr = *(unsigned long *)&in_addr->sin_addr;
|
||||
addr = *(unsigned *)&in_addr->sin_addr;
|
||||
if (addr != htonl (0x7f000001)) {
|
||||
myAddr = addr;
|
||||
break;
|
||||
|
|
|
@ -112,7 +112,7 @@ ReadShort (QFile *file)
|
|||
return (dat[1] << 8) | dat[0];
|
||||
}
|
||||
|
||||
unsigned long
|
||||
unsigned int
|
||||
ReadLong (QFile *file)
|
||||
{
|
||||
byte dat[4];
|
||||
|
|
|
@ -82,7 +82,7 @@ keyhandler (int scancode, int state)
|
|||
{
|
||||
int sc, ascii, key;
|
||||
int press = state == KEY_EVENTPRESS;
|
||||
unsigned long mask = ~1;
|
||||
unsigned long mask = ~1L;
|
||||
static unsigned long shifts;
|
||||
|
||||
sc = scancode & 0x7f;
|
||||
|
|
|
@ -629,7 +629,7 @@ MapKey (unsigned int keycode, int press, int *k, int *u)
|
|||
int scan;
|
||||
int key;
|
||||
int uc;
|
||||
unsigned long mask = ~1;
|
||||
unsigned long mask = ~1L;
|
||||
static unsigned long shifts;
|
||||
|
||||
extended = (keycode >> 24) & 1;
|
||||
|
|
|
@ -482,7 +482,7 @@ CheckLights (void)
|
|||
specular[4] = {0.1, 0.1, 0.1, 1.0};
|
||||
|
||||
qfglGetIntegerv (GL_MAX_LIGHTS, &gl_max_lights);
|
||||
Con_Printf ("Max GL Lights %lu.\n", (long unsigned) gl_max_lights);
|
||||
Con_Printf ("Max GL Lights %d.\n", gl_max_lights);
|
||||
|
||||
qfglEnable (GL_LIGHTING);
|
||||
qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark);
|
||||
|
|
|
@ -1167,7 +1167,7 @@ static void
|
|||
SV_GenerateIPMasks (void)
|
||||
{
|
||||
int i;
|
||||
unsigned long int j = 0xFFFFFFFF;
|
||||
unsigned int j = 0xFFFFFFFF;
|
||||
|
||||
for (i = 32; i >= 0; i--) {
|
||||
ipmasks[i] = htonl (j);
|
||||
|
|
|
@ -135,7 +135,7 @@ CopyWinding (winding_t *w)
|
|||
int size;
|
||||
winding_t *c;
|
||||
|
||||
size = (long) ((winding_t *) 0)->points[w->numpoints];
|
||||
size = (long) &((winding_t *) 0)->points[w->numpoints];
|
||||
c = malloc (size);
|
||||
memcpy (c, w, size);
|
||||
return c;
|
||||
|
@ -147,7 +147,7 @@ CopyWindingReverse (winding_t *w)
|
|||
int i, size;
|
||||
winding_t *c;
|
||||
|
||||
size = (long) ((winding_t *) 0)->points[w->numpoints];
|
||||
size = (long) &((winding_t *) 0)->points[w->numpoints];
|
||||
c = malloc (size);
|
||||
c->numpoints = w->numpoints;
|
||||
for (i = 0; i < w->numpoints; i++) {
|
||||
|
@ -334,7 +334,7 @@ NewWinding (int points)
|
|||
if (c_activewindings > c_peakwindings)
|
||||
c_peakwindings = c_activewindings;
|
||||
|
||||
size = (long) ((winding_t *) 0)->points[points];
|
||||
size = (long) &((winding_t *) 0)->points[points];
|
||||
w = malloc (size);
|
||||
memset (w, 0, size);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
typedef unsigned char UBYTE;
|
||||
typedef short WORD;
|
||||
typedef unsigned short UWORD;
|
||||
typedef long LONG;
|
||||
typedef int LONG;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
|
@ -59,14 +59,14 @@ typedef struct _Model Model;
|
|||
struct _Model
|
||||
{
|
||||
/* The number of Frames */
|
||||
long numframes;
|
||||
int numframes;
|
||||
Frame *frames;
|
||||
|
||||
void (*draw)(Model *,int frame,int nextframe,float interpolation);
|
||||
void (*destroy)(Model *);
|
||||
|
||||
/* The GL commands */
|
||||
long *glcmds;
|
||||
int *glcmds;
|
||||
TexInfo *texinfo;
|
||||
|
||||
int num_tris;
|
||||
|
|
|
@ -29,20 +29,20 @@
|
|||
|
||||
typedef struct {
|
||||
unsigned char magic[4];
|
||||
long diroffset;
|
||||
long dirsize;
|
||||
int diroffset;
|
||||
int dirsize;
|
||||
} PakHeader;
|
||||
|
||||
typedef struct {
|
||||
char filename[0x38];
|
||||
long offset;
|
||||
long size;
|
||||
int offset;
|
||||
int size;
|
||||
} PakEntry;
|
||||
|
||||
typedef struct dir_entry {
|
||||
char *name;
|
||||
long offset;
|
||||
long size;
|
||||
int offset;
|
||||
int size;
|
||||
|
||||
struct dir_entry *same_level;
|
||||
struct dir_entry *sub_dir;
|
||||
|
@ -74,7 +74,7 @@ char *GetDir(char **file) {
|
|||
}
|
||||
|
||||
static inline DirEntry *NewDirEntry(char *name, DirEntry *level, DirEntry *sub,
|
||||
long offset, long size) {
|
||||
int offset, int size) {
|
||||
DirEntry *ret = (DirEntry *) malloc(sizeof(DirEntry));
|
||||
|
||||
ret->name = name;
|
||||
|
@ -88,7 +88,7 @@ static inline DirEntry *NewDirEntry(char *name, DirEntry *level, DirEntry *sub,
|
|||
}
|
||||
|
||||
static inline DirEntry *RecInsert(DirEntry *first, char *filename,
|
||||
long offset, long size) {
|
||||
int offset, int size) {
|
||||
char *dir, *subdir;
|
||||
|
||||
subdir = filename;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include <stdio.h>
|
||||
|
||||
typedef struct entry_info {
|
||||
long offset;
|
||||
long size;
|
||||
int offset;
|
||||
int size;
|
||||
} EntryInfo;
|
||||
|
||||
EntryInfo *GetInfo(GtkWidget *item) ;
|
||||
|
|
Loading…
Reference in a new issue