-/* $NetBSD: misc.c,v 1.3 1995/03/21 15:07:37 cgd Exp $ */
+/* $NetBSD: misc.c,v 1.9 2005/07/01 06:04:54 jmc Exp $ */
/*
* Copyright (c) 1983, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
-static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93";
+static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$NetBSD: misc.c,v 1.3 1995/03/21 15:07:37 cgd Exp $";
+__RCSID("$NetBSD: misc.c,v 1.9 2005/07/01 06:04:54 jmc Exp $");
#endif
-#endif /* not lint */
+#endif /* not lint */
-#include "externs.h"
+#include "extern.h"
-card(array, size) /* for beenthere, injuries */
- register char *array;
- int size;
+/* for beenthere, injuries */
+int
+card(const char *array, int size)
{
- register char *end = array + size;
- register int i = 0;
+ const char *end = array + size;
+ int i = 0;
while (array < end)
if (*array++)
return (i);
}
-ucard(array)
- register unsigned *array;
+int
+ucard(const unsigned int *array)
{
- register int j = 0, n;
+ int j = 0, n;
for (n = 0; n < NUMOFOBJECTS; n++)
if (testbit(array, n))
- j++;
+ j++;
return (j);
}