-/* $NetBSD: misc.c,v 1.12 2004/01/26 09:59:36 jsm Exp $ */
+/* $NetBSD: misc.c,v 1.15 2008/02/19 08:26:10 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: misc.c,v 1.12 2004/01/26 09:59:36 jsm Exp $");
+__RCSID("$NetBSD: misc.c,v 1.15 2008/02/19 08:26:10 dholland Exp $");
#endif
#endif /* not lint */
*sp = c;
if (sp == buf)
continue;
- for (sp = buf; isspace(*sp); sp++)
+ for (sp = buf; isspace((unsigned char)*sp); sp++)
continue;
- for (; isdigit(*sp); sp++)
+ for (; isdigit((unsigned char)*sp); sp++)
num = num * 10 + *sp - '0';
if (*sp == '\n')
return num;
int num; /* general counter */
MON *orig; /* remember starting monop ptr */
OWN *op; /* current owned prop */
- OWN *orig_op; /* origianl prop before loop */
+ OWN *orig_op; /* original prop before loop */
op = play[pl].own_list;
#ifdef DEBUG
printf("player # %d\n", pl+1);
printhold(pl);
printf("orig_op = %p\n", orig_op);
- printf("orig_op->sqr->type = %d (PRPTY)\n",
- op->sqr->type);
- printf("orig_op->next = %p\n", op->next);
- printf("orig_op->sqr->desc = %p\n",
- op->sqr->desc);
+ if (orig_op) {
+ printf("orig_op->sqr->type = %d (PRPTY)\n",
+ orig_op->sqr->type);
+ printf("orig_op->next = %p\n", op->next);
+ printf("orig_op->sqr->desc = %p\n",
+ orig_op->sqr->desc);
+ }
printf("op = %p\n", op);
- printf("op->sqr->type = %d (PRPTY)\n",
- op->sqr->type);
- printf("op->next = %p\n", op->next);
- printf("op->sqr->desc = %p\n", op->sqr->desc);
+ if (op) {
+ printf("op->sqr->type = %d (PRPTY)\n",
+ op->sqr->type);
+ printf("op->next = %p\n", op->next);
+ printf("op->sqr->desc = %p\n",
+ op->sqr->desc);
+ }
printf("num = %d\n", num);
}
#ifdef DEBUG