yet more disabled code removal
This commit is contained in:
@@ -8,8 +8,7 @@
|
|||||||
|
|
||||||
/*=
|
/*=
|
||||||
Assorted 'small' utility routines. They're virtually independent of
|
Assorted 'small' utility routines. They're virtually independent of
|
||||||
NetHack, except that rounddiv may call panic(). setrandom calls one
|
NetHack.
|
||||||
of srandom(), srand48(), or srand() depending upon configuration.
|
|
||||||
|
|
||||||
return type routine name argument type(s)
|
return type routine name argument type(s)
|
||||||
boolean digit (char)
|
boolean digit (char)
|
||||||
@@ -46,7 +45,6 @@
|
|||||||
const char * ordin (int)
|
const char * ordin (int)
|
||||||
char * sitoa (int)
|
char * sitoa (int)
|
||||||
int sgn (int)
|
int sgn (int)
|
||||||
int rounddiv (long, int)
|
|
||||||
int distmin (int, int, int, int)
|
int distmin (int, int, int, int)
|
||||||
int dist2 (int, int, int, int)
|
int dist2 (int, int, int, int)
|
||||||
boolean online2 (int, int)
|
boolean online2 (int, int)
|
||||||
@@ -655,33 +653,6 @@ sgn(int n)
|
|||||||
return (n < 0) ? -1 : (n != 0);
|
return (n < 0) ? -1 : (n != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* calculate x/y, rounding as appropriate */
|
|
||||||
int
|
|
||||||
rounddiv(long x, int y)
|
|
||||||
{
|
|
||||||
int r, m;
|
|
||||||
int divsgn = 1;
|
|
||||||
|
|
||||||
if (y == 0)
|
|
||||||
panic("division by zero in rounddiv");
|
|
||||||
else if (y < 0) {
|
|
||||||
divsgn = -divsgn;
|
|
||||||
y = -y;
|
|
||||||
}
|
|
||||||
if (x < 0) {
|
|
||||||
divsgn = -divsgn;
|
|
||||||
x = -x;
|
|
||||||
}
|
|
||||||
r = (int) (x / y);
|
|
||||||
m = x % y;
|
|
||||||
if (2 * m >= y)
|
|
||||||
r++;
|
|
||||||
|
|
||||||
return divsgn * r;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* distance between two points, in moves */
|
/* distance between two points, in moves */
|
||||||
int
|
int
|
||||||
distmin(coordxy x0, coordxy y0, coordxy x1, coordxy y1)
|
distmin(coordxy x0, coordxy y0, coordxy x1, coordxy y1)
|
||||||
|
|||||||
Reference in New Issue
Block a user