
This replaces a partial set of non-functional functions with a complete set of functions, all of which actually work. This requires us to implement mbsnrtowcs and wcsnrtombs which completes the set of what we need for libc++. The mbsnrtowcs is basically a copy & paste of wcsnrtombs, but I'm going to go straight to looking at using the OpenBSD UTF-8 implementation rather than keep polishing our home-grown turd. (This patch also opportunistically switches us over to upstream btowc, mbrlen, and wctob, since they're all trivially expressed in terms of other functions.) Change-Id: I0f81443840de0f1aa73b96f0b51988976793a323
18 lines
380 B
C
18 lines
380 B
C
/* $OpenBSD: wcstoul.c,v 1.2 2005/08/08 08:05:35 espie Exp $ */
|
|
/* $NetBSD: wcstoul.c,v 1.2 2003/03/11 09:21:24 tshiozak Exp $ */
|
|
|
|
#include <ctype.h>
|
|
#include <errno.h>
|
|
#include <limits.h>
|
|
#include <stdlib.h>
|
|
#include <wchar.h>
|
|
#include <wctype.h>
|
|
|
|
#include "wctoint.h"
|
|
|
|
#define FUNCNAME wcstoul
|
|
typedef unsigned long uint_type;
|
|
#define MAX_VALUE ULONG_MAX
|
|
|
|
#include "_wcstoul.h"
|