u_intXX_t -> uintXX_t.
This commit is contained in:
parent
a180c2a1f7
commit
f59892f81b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_bcs.h,v 1.3 2005/05/14 17:55:42 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_bcs.h,v 1.4 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#define _CITRUS_BCS_PRED(_name_, _cond_) \
|
||||
static __inline int _citrus_bcs_##_name_(u_int8_t c) { return (_cond_); }
|
||||
static __inline int _citrus_bcs_##_name_(uint8_t c) { return (_cond_); }
|
||||
|
||||
/*
|
||||
* predicates.
|
||||
@ -62,14 +62,14 @@ _CITRUS_BCS_PRED(isxdigit,
|
||||
* transliterate between uppercase and lowercase.
|
||||
* Unlike transliterator defined in ctype.h, these do not accept EOF.
|
||||
*/
|
||||
static __inline u_int8_t
|
||||
_citrus_bcs_toupper(u_int8_t c)
|
||||
static __inline uint8_t
|
||||
_citrus_bcs_toupper(uint8_t c)
|
||||
{
|
||||
return (_citrus_bcs_islower(c) ? (c - 'a' + 'A') : c);
|
||||
}
|
||||
|
||||
static __inline u_int8_t
|
||||
_citrus_bcs_tolower(u_int8_t c)
|
||||
static __inline uint8_t
|
||||
_citrus_bcs_tolower(uint8_t c)
|
||||
{
|
||||
return (_citrus_bcs_isupper(c) ? (c - 'A' + 'a') : c);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_csmapper.c,v 1.7 2007/02/17 12:39:44 tnozaki Exp $ */
|
||||
/* $NetBSD: citrus_csmapper.c,v 1.8 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_csmapper.c,v 1.7 2007/02/17 12:39:44 tnozaki Exp $");
|
||||
__RCSID("$NetBSD: citrus_csmapper.c,v 1.8 2008/02/09 14:56:20 junyoung Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -70,7 +70,7 @@ static struct _citrus_mapper_area *maparea = NULL;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static int
|
||||
get32(struct _region *r, u_int32_t *rval)
|
||||
get32(struct _region *r, uint32_t *rval)
|
||||
{
|
||||
if (_region_size(r) != 4)
|
||||
return EFTYPE;
|
||||
@ -108,7 +108,7 @@ find_best_pivot_pvdb(const char *src, const char *dst, char *pivot,
|
||||
struct _citrus_db *db1, *db2, *db3;
|
||||
char buf[LINE_MAX];
|
||||
unsigned long norm;
|
||||
u_int32_t val32;
|
||||
uint32_t val32;
|
||||
|
||||
ret = _map_file(&fr, CS_PIVOT ".pvdb");
|
||||
if (ret) {
|
||||
@ -340,7 +340,7 @@ quit:
|
||||
int
|
||||
_citrus_csmapper_open(struct _citrus_csmapper * __restrict * __restrict rcsm,
|
||||
const char * __restrict src, const char * __restrict dst,
|
||||
u_int32_t flags, unsigned long *rnorm)
|
||||
uint32_t flags, unsigned long *rnorm)
|
||||
{
|
||||
int ret;
|
||||
char buf1[PATH_MAX], buf2[PATH_MAX], key[PATH_MAX], pivot[PATH_MAX];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_csmapper.h,v 1.1 2003/06/25 09:51:27 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_csmapper.h,v 1.2 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -41,7 +41,7 @@
|
||||
__BEGIN_DECLS
|
||||
int _citrus_csmapper_open(struct _citrus_csmapper *__restrict *__restrict,
|
||||
const char *__restrict,
|
||||
const char *__restrict, u_int32_t,
|
||||
const char *__restrict, uint32_t,
|
||||
unsigned long *);
|
||||
__END_DECLS
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_ctype_local.h,v 1.2 2003/03/05 20:18:15 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_ctype_local.h,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2002 Citrus Project,
|
||||
@ -31,7 +31,7 @@
|
||||
#define _CITRUS_CTYPE_LOCAL_H_
|
||||
|
||||
#define _CITRUS_CTYPE_GETOPS_FUNC_BASE(_n_) \
|
||||
int _n_(_citrus_ctype_ops_rec_t *, size_t, u_int32_t)
|
||||
int _n_(_citrus_ctype_ops_rec_t *, size_t, uint32_t)
|
||||
#define _CITRUS_CTYPE_GETOPS_FUNC(_n_) \
|
||||
_CITRUS_CTYPE_GETOPS_FUNC_BASE(_citrus_##_n_##_ctype_getops)
|
||||
|
||||
@ -163,7 +163,7 @@ typedef int (*_citrus_ctype_wctob_t)
|
||||
*/
|
||||
#define _CITRUS_CTYPE_ABI_VERSION 0x00000002
|
||||
struct _citrus_ctype_ops_rec {
|
||||
u_int32_t co_abi_version;
|
||||
uint32_t co_abi_version;
|
||||
/* version 0x00000001 */
|
||||
_citrus_ctype_init_t co_init;
|
||||
_citrus_ctype_uninit_t co_uninit;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_ctype_template.h,v 1.34 2007/11/26 15:31:30 tnozaki Exp $ */
|
||||
/* $NetBSD: citrus_ctype_template.h,v 1.35 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2002 Citrus Project,
|
||||
@ -372,7 +372,7 @@ do { \
|
||||
|
||||
int
|
||||
_FUNCNAME(ctype_getops)(_citrus_ctype_ops_rec_t *ops, size_t lenops,
|
||||
u_int32_t expected_version)
|
||||
uint32_t expected_version)
|
||||
{
|
||||
if (expected_version<_CITRUS_CTYPE_ABI_VERSION || lenops<sizeof(*ops))
|
||||
return (EINVAL);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_db.c,v 1.4 2005/11/29 03:11:58 christos Exp $ */
|
||||
/* $NetBSD: citrus_db.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_db.c,v 1.4 2005/11/29 03:11:58 christos Exp $");
|
||||
__RCSID("$NetBSD: citrus_db.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -51,13 +51,13 @@ __RCSID("$NetBSD: citrus_db.c,v 1.4 2005/11/29 03:11:58 christos Exp $");
|
||||
struct _citrus_db {
|
||||
/* private */
|
||||
struct _region db_region;
|
||||
u_int32_t (*db_hashfunc)(void *, struct _citrus_region *);
|
||||
uint32_t (*db_hashfunc)(void *, struct _citrus_region *);
|
||||
void *db_hashfunc_closure;
|
||||
};
|
||||
|
||||
int
|
||||
_citrus_db_open(struct _citrus_db **rdb, struct _region *r, const char *magic,
|
||||
u_int32_t (*hashfunc)(void *, struct _citrus_region *),
|
||||
uint32_t (*hashfunc)(void *, struct _citrus_region *),
|
||||
void *hashfunc_closure)
|
||||
{
|
||||
struct _memstream ms;
|
||||
@ -100,7 +100,7 @@ int
|
||||
_citrus_db_lookup(struct _citrus_db *db, struct _citrus_region *key,
|
||||
struct _citrus_region *data, struct _citrus_db_locator *dl)
|
||||
{
|
||||
u_int32_t hashval, num_entries;
|
||||
uint32_t hashval, num_entries;
|
||||
size_t offset;
|
||||
struct _memstream ms;
|
||||
struct _citrus_db_header_x *dhx;
|
||||
@ -196,7 +196,7 @@ _citrus_db_lookup_by_string(struct _citrus_db *db, const char *key,
|
||||
|
||||
int
|
||||
_citrus_db_lookup8_by_string(struct _citrus_db *db, const char *key,
|
||||
u_int8_t *rval, struct _citrus_db_locator *dl)
|
||||
uint8_t *rval, struct _citrus_db_locator *dl)
|
||||
{
|
||||
int ret;
|
||||
struct _region r;
|
||||
@ -216,11 +216,11 @@ _citrus_db_lookup8_by_string(struct _citrus_db *db, const char *key,
|
||||
|
||||
int
|
||||
_citrus_db_lookup16_by_string(struct _citrus_db *db, const char *key,
|
||||
u_int16_t *rval, struct _citrus_db_locator *dl)
|
||||
uint16_t *rval, struct _citrus_db_locator *dl)
|
||||
{
|
||||
int ret;
|
||||
struct _region r;
|
||||
u_int16_t val;
|
||||
uint16_t val;
|
||||
|
||||
ret = _citrus_db_lookup_by_string(db, key, &r, dl);
|
||||
if (ret)
|
||||
@ -239,11 +239,11 @@ _citrus_db_lookup16_by_string(struct _citrus_db *db, const char *key,
|
||||
|
||||
int
|
||||
_citrus_db_lookup32_by_string(struct _citrus_db *db, const char *key,
|
||||
u_int32_t *rval, struct _citrus_db_locator *dl)
|
||||
uint32_t *rval, struct _citrus_db_locator *dl)
|
||||
{
|
||||
int ret;
|
||||
struct _region r;
|
||||
u_int32_t val;
|
||||
uint32_t val;
|
||||
|
||||
ret = _citrus_db_lookup_by_string(db, key, &r, dl);
|
||||
if (ret)
|
||||
@ -301,7 +301,7 @@ int
|
||||
_citrus_db_get_entry(struct _citrus_db *db, int idx,
|
||||
struct _region *key, struct _region *data)
|
||||
{
|
||||
u_int32_t num_entries;
|
||||
uint32_t num_entries;
|
||||
size_t offset;
|
||||
struct _memstream ms;
|
||||
struct _citrus_db_header_x *dhx;
|
||||
@ -312,7 +312,7 @@ _citrus_db_get_entry(struct _citrus_db *db, int idx,
|
||||
dhx = _memstream_getregion(&ms, NULL, sizeof(*dhx));
|
||||
_DIAGASSERT(dhx);
|
||||
num_entries = be32toh(dhx->dhx_num_entries);
|
||||
if (idx < 0 || (u_int32_t)idx >= num_entries)
|
||||
if (idx < 0 || (uint32_t)idx >= num_entries)
|
||||
return EINVAL;
|
||||
|
||||
/* seek to the next entry */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_db.h,v 1.1 2003/06/25 09:51:29 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_db.h,v 1.2 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -31,14 +31,14 @@
|
||||
|
||||
struct _citrus_db;
|
||||
struct _citrus_db_locator {
|
||||
u_int32_t dl_hashval;
|
||||
uint32_t dl_hashval;
|
||||
size_t dl_offset;
|
||||
};
|
||||
|
||||
__BEGIN_DECLS
|
||||
int _citrus_db_open(struct _citrus_db **, struct _citrus_region *,
|
||||
const char *,
|
||||
u_int32_t (*)(void *, struct _citrus_region *),
|
||||
uint32_t (*)(void *, struct _citrus_region *),
|
||||
void *);
|
||||
void _citrus_db_close(struct _citrus_db *);
|
||||
int _citrus_db_lookup(struct _citrus_db *, struct _citrus_region *,
|
||||
@ -48,13 +48,13 @@ int _citrus_db_lookup_by_string(struct _citrus_db *, const char *,
|
||||
struct _citrus_region *,
|
||||
struct _citrus_db_locator *);
|
||||
int _citrus_db_lookup8_by_string(struct _citrus_db *, const char *,
|
||||
u_int8_t *,
|
||||
uint8_t *,
|
||||
struct _citrus_db_locator *);
|
||||
int _citrus_db_lookup16_by_string(struct _citrus_db *, const char *,
|
||||
u_int16_t *,
|
||||
uint16_t *,
|
||||
struct _citrus_db_locator *);
|
||||
int _citrus_db_lookup32_by_string(struct _citrus_db *, const char *,
|
||||
u_int32_t *,
|
||||
uint32_t *,
|
||||
struct _citrus_db_locator *);
|
||||
int _citrus_db_lookup_string_by_string(struct _citrus_db *, const char *,
|
||||
const char **,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_db_factory.c,v 1.8 2004/01/02 21:49:35 itojun Exp $ */
|
||||
/* $NetBSD: citrus_db_factory.c,v 1.9 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_db_factory.c,v 1.8 2004/01/02 21:49:35 itojun Exp $");
|
||||
__RCSID("$NetBSD: citrus_db_factory.c,v 1.9 2008/02/09 14:56:20 junyoung Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <assert.h>
|
||||
@ -52,7 +52,7 @@ __RCSID("$NetBSD: citrus_db_factory.c,v 1.8 2004/01/02 21:49:35 itojun Exp $");
|
||||
struct _citrus_db_factory_entry {
|
||||
SIMPLEQ_ENTRY(_citrus_db_factory_entry) de_entry;
|
||||
struct _citrus_db_factory_entry *de_next;
|
||||
u_int32_t de_hashvalue;
|
||||
uint32_t de_hashvalue;
|
||||
struct _region de_key;
|
||||
int de_key_free;
|
||||
struct _region de_data;
|
||||
@ -65,7 +65,7 @@ struct _citrus_db_factory {
|
||||
SIMPLEQ_HEAD(, _citrus_db_factory_entry) df_entries;
|
||||
size_t df_total_key_size;
|
||||
size_t df_total_data_size;
|
||||
u_int32_t (*df_hashfunc)(void *, struct _citrus_region *);
|
||||
uint32_t (*df_hashfunc)(void *, struct _citrus_region *);
|
||||
void *df_hashfunc_closure;
|
||||
};
|
||||
|
||||
@ -157,10 +157,10 @@ _citrus_db_factory_add_by_string(struct _citrus_db_factory *df,
|
||||
|
||||
int
|
||||
_citrus_db_factory_add8_by_string(struct _citrus_db_factory *df,
|
||||
const char *key, u_int8_t val)
|
||||
const char *key, uint8_t val)
|
||||
{
|
||||
struct _region r;
|
||||
u_int8_t *p;
|
||||
uint8_t *p;
|
||||
|
||||
p = malloc(sizeof(*p));
|
||||
if (p == NULL)
|
||||
@ -172,10 +172,10 @@ _citrus_db_factory_add8_by_string(struct _citrus_db_factory *df,
|
||||
|
||||
int
|
||||
_citrus_db_factory_add16_by_string(struct _citrus_db_factory *df,
|
||||
const char *key, u_int16_t val)
|
||||
const char *key, uint16_t val)
|
||||
{
|
||||
struct _region r;
|
||||
u_int16_t *p;
|
||||
uint16_t *p;
|
||||
|
||||
p = malloc(sizeof(*p));
|
||||
if (p == NULL)
|
||||
@ -187,10 +187,10 @@ _citrus_db_factory_add16_by_string(struct _citrus_db_factory *df,
|
||||
|
||||
int
|
||||
_citrus_db_factory_add32_by_string(struct _citrus_db_factory *df,
|
||||
const char *key, u_int32_t val)
|
||||
const char *key, uint32_t val)
|
||||
{
|
||||
struct _region r;
|
||||
u_int32_t *p;
|
||||
uint32_t *p;
|
||||
|
||||
p = malloc(sizeof(*p));
|
||||
if (p == NULL)
|
||||
@ -228,14 +228,14 @@ _citrus_db_factory_calc_size(struct _citrus_db_factory *df)
|
||||
}
|
||||
|
||||
static __inline void
|
||||
put8(struct _region *r, size_t *rofs, u_int8_t val)
|
||||
put8(struct _region *r, size_t *rofs, uint8_t val)
|
||||
{
|
||||
*(u_int8_t *)_region_offset(r, *rofs) = val;
|
||||
*(uint8_t *)_region_offset(r, *rofs) = val;
|
||||
*rofs += 1;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
put16(struct _region *r, size_t *rofs, u_int16_t val)
|
||||
put16(struct _region *r, size_t *rofs, uint16_t val)
|
||||
{
|
||||
val = htons(val);
|
||||
memcpy(_region_offset(r, *rofs), &val, 2);
|
||||
@ -243,7 +243,7 @@ put16(struct _region *r, size_t *rofs, u_int16_t val)
|
||||
}
|
||||
|
||||
static __inline void
|
||||
put32(struct _region *r, size_t *rofs, u_int32_t val)
|
||||
put32(struct _region *r, size_t *rofs, uint32_t val)
|
||||
{
|
||||
val = htonl(val);
|
||||
memcpy(_region_offset(r, *rofs), &val, 4);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_db_factory.h,v 1.2 2006/08/21 20:30:52 tnozaki Exp $ */
|
||||
/* $NetBSD: citrus_db_factory.h,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -30,7 +30,7 @@
|
||||
#define _CITRUS_DB_FACTORY_H_
|
||||
|
||||
struct _citrus_db_factory;
|
||||
typedef u_int32_t (*_citrus_db_hash_func_t)(void *, struct _citrus_region *);
|
||||
typedef uint32_t (*_citrus_db_hash_func_t)(void *, struct _citrus_region *);
|
||||
|
||||
__BEGIN_DECLS
|
||||
int _citrus_db_factory_create(struct _citrus_db_factory **,
|
||||
@ -43,11 +43,11 @@ int _citrus_db_factory_add_by_string(struct _citrus_db_factory *,
|
||||
const char *,
|
||||
struct _citrus_region *, int);
|
||||
int _citrus_db_factory_add8_by_string(struct _citrus_db_factory *,
|
||||
const char *, u_int8_t);
|
||||
const char *, uint8_t);
|
||||
int _citrus_db_factory_add16_by_string(struct _citrus_db_factory *,
|
||||
const char *, u_int16_t);
|
||||
const char *, uint16_t);
|
||||
int _citrus_db_factory_add32_by_string(struct _citrus_db_factory *,
|
||||
const char *, u_int32_t);
|
||||
const char *, uint32_t);
|
||||
int _citrus_db_factory_add_string_by_string(struct _citrus_db_factory *,
|
||||
const char *, const char *);
|
||||
size_t _citrus_db_factory_calc_size(struct _citrus_db_factory *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_db_file.h,v 1.2 2003/06/30 17:54:13 christos Exp $ */
|
||||
/* $NetBSD: citrus_db_file.h,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -67,17 +67,17 @@
|
||||
#define _CITRUS_DB_HEADER_SIZE 16
|
||||
struct _citrus_db_header_x {
|
||||
char dhx_magic[_CITRUS_DB_MAGIC_SIZE];
|
||||
u_int32_t dhx_num_entries;
|
||||
u_int32_t dhx_entry_offset;
|
||||
uint32_t dhx_num_entries;
|
||||
uint32_t dhx_entry_offset;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct _citrus_db_entry_x {
|
||||
u_int32_t dex_hash_value;
|
||||
u_int32_t dex_next_offset;
|
||||
u_int32_t dex_key_offset;
|
||||
u_int32_t dex_key_size;
|
||||
u_int32_t dex_data_offset;
|
||||
u_int32_t dex_data_size;
|
||||
uint32_t dex_hash_value;
|
||||
uint32_t dex_next_offset;
|
||||
uint32_t dex_key_offset;
|
||||
uint32_t dex_key_size;
|
||||
uint32_t dex_data_offset;
|
||||
uint32_t dex_data_size;
|
||||
} __attribute__((__packed__));
|
||||
#define _CITRUS_DB_ENTRY_SIZE 24
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_db_hash.c,v 1.4 2004/01/02 21:49:35 itojun Exp $ */
|
||||
/* $NetBSD: citrus_db_hash.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_db_hash.c,v 1.4 2004/01/02 21:49:35 itojun Exp $");
|
||||
__RCSID("$NetBSD: citrus_db_hash.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#ifndef HOSTPROG
|
||||
@ -49,12 +49,12 @@ __RCSID("$NetBSD: citrus_db_hash.c,v 1.4 2004/01/02 21:49:35 itojun Exp $");
|
||||
#include "citrus_region.h"
|
||||
#include "citrus_db_hash.h"
|
||||
|
||||
u_int32_t
|
||||
uint32_t
|
||||
/*ARGSUSED*/
|
||||
_citrus_db_hash_std(void *closure, struct _region *r)
|
||||
{
|
||||
const u_int8_t *p = _region_head(r);
|
||||
u_int32_t hash = 0, tmp;
|
||||
const uint8_t *p = _region_head(r);
|
||||
uint32_t hash = 0, tmp;
|
||||
size_t i;
|
||||
|
||||
for (i = _region_size(r); i > 0; i--) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_db_hash.h,v 1.1 2003/06/25 09:51:31 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_db_hash.h,v 1.2 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -30,7 +30,7 @@
|
||||
#define _CITRUS_DB_HASH_H_
|
||||
|
||||
__BEGIN_DECLS
|
||||
u_int32_t _citrus_db_hash_std(void *, struct _citrus_region *);
|
||||
uint32_t _citrus_db_hash_std(void *, struct _citrus_region *);
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_esdb.c,v 1.4 2004/07/21 14:16:34 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_esdb.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_esdb.c,v 1.4 2004/07/21 14:16:34 tshiozak Exp $");
|
||||
__RCSID("$NetBSD: citrus_esdb.c,v 1.5 2008/02/09 14:56:20 junyoung Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -77,7 +77,7 @@ conv_esdb(struct _citrus_esdb *esdb, struct _region *fr)
|
||||
{
|
||||
int ret;
|
||||
struct _citrus_db *db;
|
||||
u_int32_t version, num_charsets, csid, i, tmp;
|
||||
uint32_t version, num_charsets, csid, i, tmp;
|
||||
char buf[100];
|
||||
const char *str;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_hash.c,v 1.2 2005/11/29 03:11:58 christos Exp $ */
|
||||
/* $NetBSD: citrus_hash.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_hash.c,v 1.2 2005/11/29 03:11:58 christos Exp $");
|
||||
__RCSID("$NetBSD: citrus_hash.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -50,5 +50,5 @@ _citrus_string_hash_func(const char *key, int hashsize)
|
||||
|
||||
_region_init(&r, __UNCONST(key), strlen(key));
|
||||
|
||||
return (int)(_db_hash_std(NULL, &r) % (u_int32_t)hashsize);
|
||||
return (int)(_db_hash_std(NULL, &r) % (uint32_t)hashsize);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_iconv.h,v 1.4 2005/03/12 04:20:30 christos Exp $ */
|
||||
/* $NetBSD: citrus_iconv.h,v 1.5 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -54,7 +54,7 @@ _citrus_iconv_convert(struct _citrus_iconv * __restrict cv,
|
||||
const char * __restrict * __restrict in,
|
||||
size_t * __restrict inbytes,
|
||||
char * __restrict * __restrict out,
|
||||
size_t * __restrict outbytes, u_int32_t flags,
|
||||
size_t * __restrict outbytes, uint32_t flags,
|
||||
size_t * __restrict nresults)
|
||||
{
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_iconv_local.h,v 1.2 2003/07/01 09:42:16 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_iconv_local.h,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -30,7 +30,7 @@
|
||||
#define _CITRUS_ICONV_LOCAL_H_
|
||||
|
||||
#define _CITRUS_ICONV_GETOPS_FUNC_BASE(_n_) \
|
||||
int _n_(struct _citrus_iconv_ops *, size_t, u_int32_t)
|
||||
int _n_(struct _citrus_iconv_ops *, size_t, uint32_t)
|
||||
#define _CITRUS_ICONV_GETOPS_FUNC(_n_) \
|
||||
_CITRUS_ICONV_GETOPS_FUNC_BASE(_citrus_##_n_##_iconv_getops)
|
||||
|
||||
@ -46,7 +46,7 @@ static int _citrus_##_m_##_iconv_convert \
|
||||
(struct _citrus_iconv * __restrict, \
|
||||
const char * __restrict * __restrict, size_t * __restrict, \
|
||||
char * __restrict * __restrict, size_t * __restrict outbytes, \
|
||||
u_int32_t, size_t * __restrict); \
|
||||
uint32_t, size_t * __restrict); \
|
||||
static int _citrus_##_m_##_iconv_init_context \
|
||||
(struct _citrus_iconv *); \
|
||||
static void _citrus_##_m_##_iconv_uninit_context \
|
||||
@ -73,13 +73,13 @@ typedef void (*_citrus_iconv_uninit_shared_t)
|
||||
typedef int (*_citrus_iconv_convert_t)
|
||||
(struct _citrus_iconv * __restrict,
|
||||
const char *__restrict* __restrict, size_t * __restrict,
|
||||
char * __restrict * __restrict, size_t * __restrict, u_int32_t,
|
||||
char * __restrict * __restrict, size_t * __restrict, uint32_t,
|
||||
size_t * __restrict);
|
||||
typedef int (*_citrus_iconv_init_context_t)(struct _citrus_iconv *);
|
||||
typedef void (*_citrus_iconv_uninit_context_t)(struct _citrus_iconv *);
|
||||
|
||||
struct _citrus_iconv_ops {
|
||||
u_int32_t io_abi_version;
|
||||
uint32_t io_abi_version;
|
||||
_citrus_iconv_init_shared_t io_init_shared;
|
||||
_citrus_iconv_uninit_shared_t io_uninit_shared;
|
||||
_citrus_iconv_init_context_t io_init_context;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_mapper_local.h,v 1.1 2003/06/25 09:51:36 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_mapper_local.h,v 1.2 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -30,7 +30,7 @@
|
||||
#define _CITRUS_MAPPER_LOCAL_H_
|
||||
|
||||
#define _CITRUS_MAPPER_GETOPS_FUNC_BASE(_n_) \
|
||||
int _n_(struct _citrus_mapper_ops *, size_t, u_int32_t)
|
||||
int _n_(struct _citrus_mapper_ops *, size_t, uint32_t)
|
||||
#define _CITRUS_MAPPER_GETOPS_FUNC(_n_) \
|
||||
_CITRUS_MAPPER_GETOPS_FUNC_BASE(_citrus_##_n_##_mapper_getops)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_memstream.c,v 1.2 2004/01/02 21:49:35 itojun Exp $ */
|
||||
/* $NetBSD: citrus_memstream.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_memstream.c,v 1.2 2004/01/02 21:49:35 itojun Exp $");
|
||||
__RCSID("$NetBSD: citrus_memstream.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -47,7 +47,7 @@ _citrus_memory_stream_getln(struct _citrus_memory_stream * __restrict ms,
|
||||
size_t * __restrict rlen)
|
||||
{
|
||||
int i;
|
||||
const u_int8_t *h, *p;
|
||||
const uint8_t *h, *p;
|
||||
size_t ret;
|
||||
|
||||
if (ms->ms_pos>=_region_size(&ms->ms_region))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_pivot_factory.c,v 1.5 2006/05/10 21:53:15 mrg Exp $ */
|
||||
/* $NetBSD: citrus_pivot_factory.c,v 1.6 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_pivot_factory.c,v 1.5 2006/05/10 21:53:15 mrg Exp $");
|
||||
__RCSID("$NetBSD: citrus_pivot_factory.c,v 1.6 2008/02/09 14:56:20 junyoung Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <assert.h>
|
||||
@ -114,7 +114,7 @@ convert_line(struct src_head *sh, const char *line, size_t len)
|
||||
struct src_entry *se;
|
||||
const char *p;
|
||||
char key1[LINE_MAX], key2[LINE_MAX], data[LINE_MAX];
|
||||
u_int32_t val;
|
||||
uint32_t val;
|
||||
|
||||
se = NULL; /* XXX gcc */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_region.h,v 1.6 2005/05/14 17:55:42 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_region.h,v 1.7 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -69,27 +69,27 @@ _citrus_region_check(const struct _citrus_region *r, size_t ofs, size_t sz)
|
||||
static __inline void *
|
||||
_citrus_region_offset(const struct _citrus_region *r, size_t pos)
|
||||
{
|
||||
return (void *)((u_int8_t *)r->r_head + pos);
|
||||
return (void *)((uint8_t *)r->r_head + pos);
|
||||
}
|
||||
|
||||
static __inline u_int8_t
|
||||
static __inline uint8_t
|
||||
_citrus_region_peek8(const struct _citrus_region *r, size_t pos)
|
||||
{
|
||||
return *(u_int8_t *)_citrus_region_offset(r, pos);
|
||||
return *(uint8_t *)_citrus_region_offset(r, pos);
|
||||
}
|
||||
|
||||
static __inline u_int16_t
|
||||
static __inline uint16_t
|
||||
_citrus_region_peek16(const struct _citrus_region *r, size_t pos)
|
||||
{
|
||||
u_int16_t val;
|
||||
uint16_t val;
|
||||
memcpy(&val, _citrus_region_offset(r, pos), (size_t)2);
|
||||
return val;
|
||||
}
|
||||
|
||||
static __inline u_int32_t
|
||||
static __inline uint32_t
|
||||
_citrus_region_peek32(const struct _citrus_region *r, size_t pos)
|
||||
{
|
||||
u_int32_t val;
|
||||
uint32_t val;
|
||||
memcpy(&val, _citrus_region_offset(r, pos), (size_t)4);
|
||||
return val;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_stdenc_local.h,v 1.3 2005/10/29 18:02:04 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_stdenc_local.h,v 1.4 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -31,7 +31,7 @@
|
||||
#define _CITRUS_STDENC_LOCAL_H_
|
||||
|
||||
#define _CITRUS_STDENC_GETOPS_FUNC_BASE(n) \
|
||||
int n(struct _citrus_stdenc_ops *, size_t, u_int32_t)
|
||||
int n(struct _citrus_stdenc_ops *, size_t, uint32_t)
|
||||
#define _CITRUS_STDENC_GETOPS_FUNC(_e_) \
|
||||
_CITRUS_STDENC_GETOPS_FUNC_BASE(_citrus_##_e_##_stdenc_getops)
|
||||
typedef _CITRUS_STDENC_GETOPS_FUNC_BASE((*_citrus_stdenc_getops_t));
|
||||
@ -118,7 +118,7 @@ typedef int (*_citrus_stdenc_get_state_desc_t)
|
||||
*/
|
||||
#define _CITRUS_STDENC_ABI_VERSION 0x00000002
|
||||
struct _citrus_stdenc_ops {
|
||||
u_int32_t eo_abi_version;
|
||||
uint32_t eo_abi_version;
|
||||
/* version 0x00000001 */
|
||||
_citrus_stdenc_init_t eo_init;
|
||||
_citrus_stdenc_uninit_t eo_uninit;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_stdenc_template.h,v 1.3 2005/10/29 18:02:04 tshiozak Exp $ */
|
||||
/* $NetBSD: citrus_stdenc_template.h,v 1.4 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -50,7 +50,7 @@
|
||||
|
||||
int
|
||||
_FUNCNAME(stdenc_getops)(struct _citrus_stdenc_ops *ops, size_t lenops,
|
||||
u_int32_t expected_version)
|
||||
uint32_t expected_version)
|
||||
{
|
||||
if (expected_version<_CITRUS_STDENC_ABI_VERSION || lenops<sizeof(*ops))
|
||||
return (EINVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user