+/* $NetBSD: misc.c,v 1.9 2005/07/01 06:04:54 jmc Exp $ */
+
/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1983, 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
* 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
-/*static char sccsid[] = "from: @(#)misc.c 5.3 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: misc.c,v 1.2 1993/08/01 18:55:58 mycroft Exp $";
-#endif /* not lint */
+#if 0
+static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
+#else
+__RCSID("$NetBSD: misc.c,v 1.9 2005/07/01 06:04:54 jmc Exp $");
+#endif
+#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);
}