size_t -> uint8_t

This commit is contained in:
christos 2012-03-21 00:35:50 +00:00
parent f76fc16550
commit 79f2de1232
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: strcspn.c,v 1.17 2009/07/30 21:42:06 dsl Exp $ */
/* $NetBSD: strcspn.c,v 1.18 2012/03/21 00:35:50 christos Exp $ */
/*-
* Copyright (c) 2008 Joerg Sonnenberger
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: strcspn.c,v 1.17 2009/07/30 21:42:06 dsl Exp $");
__RCSID("$NetBSD: strcspn.c,v 1.18 2012/03/21 00:35:50 christos Exp $");
#include <assert.h>
#include <inttypes.h>
@ -39,7 +39,7 @@ __RCSID("$NetBSD: strcspn.c,v 1.17 2009/07/30 21:42:06 dsl Exp $");
size_t
strcspn(const char *s, const char *charset)
{
static const size_t idx[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
static const uint8_t idx[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
const char *t;
uint8_t set[32];
#define UC(a) ((unsigned int)(unsigned char)(a))

View File

@ -1,4 +1,4 @@
/* $NetBSD: strspn.c,v 1.17 2009/07/30 21:42:06 dsl Exp $ */
/* $NetBSD: strspn.c,v 1.18 2012/03/21 00:35:50 christos Exp $ */
/*-
* Copyright (c) 2008 Joerg Sonnenberger
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: strspn.c,v 1.17 2009/07/30 21:42:06 dsl Exp $");
__RCSID("$NetBSD: strspn.c,v 1.18 2012/03/21 00:35:50 christos Exp $");
#include <assert.h>
#include <inttypes.h>
@ -38,7 +38,7 @@ __RCSID("$NetBSD: strspn.c,v 1.17 2009/07/30 21:42:06 dsl Exp $");
size_t
strspn(const char *s, const char *charset)
{
static const size_t idx[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
static const uint8_t idx[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
uint8_t set[32];
const char *t;
#define UC(a) ((unsigned int)(unsigned char)(a))