Normalize unsigned int to just unsigned.

This commit is contained in:
Markus Armbruster 2006-04-30 12:26:07 +00:00
parent e09e6e587b
commit e28851b8e9
8 changed files with 13 additions and 17 deletions

View file

@ -64,7 +64,7 @@ rea(void)
FILE *telfp;
int teles;
int size;
unsigned int nbytes;
unsigned nbytes;
char buf[1024];
char msgbuf[4096]; /* UTF-8 */
int lasttype;

View file

@ -54,7 +54,7 @@ retr(void)
int isfleet = 0;
int rflags = -2;
int zero;
unsigned int x;
unsigned x;
char buf1[1024];
char buf2[1024];
@ -204,7 +204,7 @@ lretr(void)
int zero;
char buf1[1024];
char buf2[1024];
unsigned int x;
unsigned x;
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
return RET_SYN;

View file

@ -70,8 +70,8 @@ int dy[6] = { 0, -1, -1, 0, 1, 1 };
* would be slow. And, since world size only changes at init
* time, we can do this safely.
*/
static unsigned int *mapbuf;
static unsigned int **mapindex;
static unsigned *mapbuf;
static unsigned **mapindex;
/*
* Find passable path from X, Y to EX, EY for nation OWN.
@ -90,14 +90,14 @@ bestownedpath(char *bpath, char *bigmap,
{
int i, j, tx, ty, markedsectors;
int minx, maxx, miny, maxy, scanx, scany;
unsigned int routelen;
unsigned routelen;
if (!mapbuf)
mapbuf = malloc(WORLD_X * WORLD_Y * sizeof(unsigned int));
mapbuf = malloc(WORLD_X * WORLD_Y * sizeof(unsigned));
if (!mapbuf)
return NULL;
if (!mapindex) {
mapindex = malloc(WORLD_X * sizeof(unsigned int *));
mapindex = malloc(WORLD_X * sizeof(unsigned *));
if (mapindex) {
/* Setup the map pointers */
for (i = 0; i < WORLD_X; i++)

View file

@ -332,7 +332,7 @@ empth_threadMain(void *pvData)
/* seed the rand() function */
time(&now);
srand(now ^ (unsigned int)pThread);
srand(now ^ (unsigned)pThread);
/* Switch to this thread context */
loc_RunThisThread();

View file

@ -142,7 +142,7 @@ player_main(struct player *p)
int
command(void)
{
unsigned int i;
unsigned i;
char *redir; /* UTF-8 */
char scanspace[1024];
@ -152,10 +152,6 @@ command(void)
scanspace, &redir) < 0) {
pr("See \"info Syntax\"?\n");
} else {
/* XXX don't use alarm; use a scavenger thread */
/* DONT USE IT!!!! alarm and sleep may and dont work
together -- Sasha */
/* alarm((unsigned int)60*60); 1 hour */
if (player->condarg != NULL)
for (i = 0; i < strlen(player->condarg); i++)
player->condarg[i] = tolower(player->condarg[i]);

View file

@ -978,7 +978,7 @@ mission_pln_sel(struct emp_qelem *list, int wantflags, int nowantflags,
struct plchrstr *pcp;
struct plist *plp;
int y, bad, bad1;
unsigned int x;
unsigned x;
for (qp = list->q_forw; qp != list; qp = next) {
next = qp->q_forw;

View file

@ -384,7 +384,7 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
struct plist *plp;
int y;
int bad, bad1;
unsigned int x;
unsigned x;
emp_initque(list);
while (nxtitem(ni, &plane)) {

View file

@ -82,7 +82,7 @@ and therefore cannot be less than 0.
"Ship #%d can move %d spaces on mobility %d (cost/sect %f)\n",
sp->shp_uid, howfar, sp->shp_mobil, mobcost);
#endif
if ((unsigned int)howfar < fp->maxmoves)
if ((unsigned)howfar < fp->maxmoves)
fp->maxmoves = howfar;
ep->mobil = sp->shp_mobil;