A few modernisms have crept in:
* Trailing comma in enum definition (commit
71320ed, v4.3.10)
* // comment (commit
265e71e, v4.3.11)
* <stdint.h> (commit
9102ecc, v4.3.31)
MSC actually chokes on this one.
Avoid them.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
enum {
UPD_DEMAND_NONE, /* no demand updates */
UPD_DEMAND_SCHED, /* scheduled updates are demand updates */
- UPD_DEMAND_ASYNC, /* zdone triggers unscheduled update */
+ UPD_DEMAND_ASYNC /* zdone triggers unscheduled update */
};
struct keymatch {
#include <fcntl.h>
#include <math.h>
-#include <stdint.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
init_genrand(seed);
}
-static uint32_t
-djb_hash(uint32_t hash, void *buf, size_t sz)
+/*
+ * Note: this is DJB's hash function when unsigned is 32 bits and hash
+ * is initially 5381.
+ */
+static unsigned
+djb_hash(unsigned hash, void *buf, size_t sz)
{
unsigned char *bp;
pick_seed(void)
{
int fd;
- uint32_t seed;
+ unsigned seed;
int got_seed = 0;
struct timeval tv;
pid_t pid;
neweff = n;
*cost += work_cost;
if (!n && IS_BIG_CITY(old_type) && !IS_BIG_CITY(*desig)) {
- // FIXME use trunc_people() and total_work()
+ /* FIXME use trunc_people() and total_work() */
int maxpop = max_population(np->nat_level[NAT_RLEV], *desig, n);
if (vec[I_CIVIL] > maxpop)
vec[I_CIVIL] = maxpop;