Normalize unsigned int to just unsigned.
This commit is contained in:
parent
e09e6e587b
commit
e28851b8e9
8 changed files with 13 additions and 17 deletions
|
@ -64,7 +64,7 @@ rea(void)
|
||||||
FILE *telfp;
|
FILE *telfp;
|
||||||
int teles;
|
int teles;
|
||||||
int size;
|
int size;
|
||||||
unsigned int nbytes;
|
unsigned nbytes;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
char msgbuf[4096]; /* UTF-8 */
|
char msgbuf[4096]; /* UTF-8 */
|
||||||
int lasttype;
|
int lasttype;
|
||||||
|
|
|
@ -54,7 +54,7 @@ retr(void)
|
||||||
int isfleet = 0;
|
int isfleet = 0;
|
||||||
int rflags = -2;
|
int rflags = -2;
|
||||||
int zero;
|
int zero;
|
||||||
unsigned int x;
|
unsigned x;
|
||||||
char buf1[1024];
|
char buf1[1024];
|
||||||
char buf2[1024];
|
char buf2[1024];
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ lretr(void)
|
||||||
int zero;
|
int zero;
|
||||||
char buf1[1024];
|
char buf1[1024];
|
||||||
char buf2[1024];
|
char buf2[1024];
|
||||||
unsigned int x;
|
unsigned x;
|
||||||
|
|
||||||
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -70,8 +70,8 @@ int dy[6] = { 0, -1, -1, 0, 1, 1 };
|
||||||
* would be slow. And, since world size only changes at init
|
* would be slow. And, since world size only changes at init
|
||||||
* time, we can do this safely.
|
* time, we can do this safely.
|
||||||
*/
|
*/
|
||||||
static unsigned int *mapbuf;
|
static unsigned *mapbuf;
|
||||||
static unsigned int **mapindex;
|
static unsigned **mapindex;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find passable path from X, Y to EX, EY for nation OWN.
|
* 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 i, j, tx, ty, markedsectors;
|
||||||
int minx, maxx, miny, maxy, scanx, scany;
|
int minx, maxx, miny, maxy, scanx, scany;
|
||||||
unsigned int routelen;
|
unsigned routelen;
|
||||||
|
|
||||||
if (!mapbuf)
|
if (!mapbuf)
|
||||||
mapbuf = malloc(WORLD_X * WORLD_Y * sizeof(unsigned int));
|
mapbuf = malloc(WORLD_X * WORLD_Y * sizeof(unsigned));
|
||||||
if (!mapbuf)
|
if (!mapbuf)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!mapindex) {
|
if (!mapindex) {
|
||||||
mapindex = malloc(WORLD_X * sizeof(unsigned int *));
|
mapindex = malloc(WORLD_X * sizeof(unsigned *));
|
||||||
if (mapindex) {
|
if (mapindex) {
|
||||||
/* Setup the map pointers */
|
/* Setup the map pointers */
|
||||||
for (i = 0; i < WORLD_X; i++)
|
for (i = 0; i < WORLD_X; i++)
|
||||||
|
|
|
@ -332,7 +332,7 @@ empth_threadMain(void *pvData)
|
||||||
|
|
||||||
/* seed the rand() function */
|
/* seed the rand() function */
|
||||||
time(&now);
|
time(&now);
|
||||||
srand(now ^ (unsigned int)pThread);
|
srand(now ^ (unsigned)pThread);
|
||||||
|
|
||||||
/* Switch to this thread context */
|
/* Switch to this thread context */
|
||||||
loc_RunThisThread();
|
loc_RunThisThread();
|
||||||
|
|
|
@ -142,7 +142,7 @@ player_main(struct player *p)
|
||||||
int
|
int
|
||||||
command(void)
|
command(void)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned i;
|
||||||
char *redir; /* UTF-8 */
|
char *redir; /* UTF-8 */
|
||||||
char scanspace[1024];
|
char scanspace[1024];
|
||||||
|
|
||||||
|
@ -152,10 +152,6 @@ command(void)
|
||||||
scanspace, &redir) < 0) {
|
scanspace, &redir) < 0) {
|
||||||
pr("See \"info Syntax\"?\n");
|
pr("See \"info Syntax\"?\n");
|
||||||
} else {
|
} 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)
|
if (player->condarg != NULL)
|
||||||
for (i = 0; i < strlen(player->condarg); i++)
|
for (i = 0; i < strlen(player->condarg); i++)
|
||||||
player->condarg[i] = tolower(player->condarg[i]);
|
player->condarg[i] = tolower(player->condarg[i]);
|
||||||
|
|
|
@ -978,7 +978,7 @@ mission_pln_sel(struct emp_qelem *list, int wantflags, int nowantflags,
|
||||||
struct plchrstr *pcp;
|
struct plchrstr *pcp;
|
||||||
struct plist *plp;
|
struct plist *plp;
|
||||||
int y, bad, bad1;
|
int y, bad, bad1;
|
||||||
unsigned int x;
|
unsigned x;
|
||||||
|
|
||||||
for (qp = list->q_forw; qp != list; qp = next) {
|
for (qp = list->q_forw; qp != list; qp = next) {
|
||||||
next = qp->q_forw;
|
next = qp->q_forw;
|
||||||
|
|
|
@ -384,7 +384,7 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
|
||||||
struct plist *plp;
|
struct plist *plp;
|
||||||
int y;
|
int y;
|
||||||
int bad, bad1;
|
int bad, bad1;
|
||||||
unsigned int x;
|
unsigned x;
|
||||||
|
|
||||||
emp_initque(list);
|
emp_initque(list);
|
||||||
while (nxtitem(ni, &plane)) {
|
while (nxtitem(ni, &plane)) {
|
||||||
|
|
|
@ -82,7 +82,7 @@ and therefore cannot be less than 0.
|
||||||
"Ship #%d can move %d spaces on mobility %d (cost/sect %f)\n",
|
"Ship #%d can move %d spaces on mobility %d (cost/sect %f)\n",
|
||||||
sp->shp_uid, howfar, sp->shp_mobil, mobcost);
|
sp->shp_uid, howfar, sp->shp_mobil, mobcost);
|
||||||
#endif
|
#endif
|
||||||
if ((unsigned int)howfar < fp->maxmoves)
|
if ((unsigned)howfar < fp->maxmoves)
|
||||||
fp->maxmoves = howfar;
|
fp->maxmoves = howfar;
|
||||||
|
|
||||||
ep->mobil = sp->shp_mobil;
|
ep->mobil = sp->shp_mobil;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue