+/* $NetBSD: rnd_pos.c,v 1.4 1997/10/12 14:10:02 lukem Exp $ */
+
/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1980, 1993
+ * The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
-static char sccsid[] = "@(#)rnd_pos.c 5.4 (Berkeley) 6/1/90";
+#if 0
+static char sccsid[] = "@(#)rnd_pos.c 8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: rnd_pos.c,v 1.4 1997/10/12 14:10:02 lukem Exp $");
+#endif
#endif /* not lint */
# include "robots.h"
{
static COORD pos;
static int call = 0;
- register int i = 0;
do {
pos.y = rnd(Y_FIELDSIZE - 1) + 1;
return &pos;
}
+int
rnd(range)
-int range;
+ int range;
{
- unsigned int rand();
return rand() % range;
}