From aba3ac5c7320e086e8a7d48af9503e42a516b69e Mon Sep 17 00:00:00 2001 From: wiz Date: Mon, 16 Oct 2006 08:42:16 +0000 Subject: [PATCH] kleink reminded me in a friendly way that "NULL" is the C API synonyme for a "null pointer" and that there is no "NULL pointer". --- lib/libc/locale/mbsinit.3 | 10 +++------- lib/libc/locale/mbsrtowcs.3 | 23 ++++++++--------------- lib/libc/locale/mbstowcs.3 | 4 ++-- lib/libc/locale/wcrtomb.3 | 6 ++---- lib/libc/locale/wcsrtombs.3 | 21 +++++++-------------- lib/libc/locale/wcstombs.3 | 6 ++---- lib/libc/locale/wcsxfrm.3 | 6 ++---- 7 files changed, 26 insertions(+), 50 deletions(-) diff --git a/lib/libc/locale/mbsinit.3 b/lib/libc/locale/mbsinit.3 index d60cf248cab0..63ef147b78e8 100644 --- a/lib/libc/locale/mbsinit.3 +++ b/lib/libc/locale/mbsinit.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: mbsinit.3,v 1.5 2004/01/24 16:58:54 wiz Exp $ +.\" $NetBSD: mbsinit.3,v 1.6 2006/10/16 08:42:16 wiz Exp $ .\" .\" Copyright (c)2002 Citrus Project, .\" All rights reserved. @@ -47,9 +47,7 @@ determines whether the state object pointed to by is the initial conversion state, or not. .Pp .Fa ps -may be a -.Dv NULL -pointer. +may be a null pointer. In this case, .Fn mbsinit will always return non-zero. @@ -63,9 +61,7 @@ The current state is not the initial state. .It non-zero The current state is the initial state or .Fa ps -is a -.Dv NULL -pointer. +is a null pointer. .El .\" ---------------------------------------------------------------------- .Sh ERRORS diff --git a/lib/libc/locale/mbsrtowcs.3 b/lib/libc/locale/mbsrtowcs.3 index 712ea1af0cbc..4c3df92bdb60 100644 --- a/lib/libc/locale/mbsrtowcs.3 +++ b/lib/libc/locale/mbsrtowcs.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: mbsrtowcs.3,v 1.9 2006/10/14 07:51:01 wiz Exp $ +.\" $NetBSD: mbsrtowcs.3,v 1.10 2006/10/16 08:42:16 wiz Exp $ .\" .\" Copyright (c)2002 Citrus Project, .\" All rights reserved. @@ -72,21 +72,16 @@ is continuously called. After conversion, if .Fa pwcs -is not a -.Dv NULL -pointer, +is not a null pointer, the pointer object pointed to by .Fa s -is a -.Dv NULL -pointer (if the conversion is stopped due to reaching a nul byte) -or the first byte of the character just after the last character converted. +is a null pointer (if the conversion is stopped due to reaching a +nul byte) or the first byte of the character just after the last +character converted. .Pp If .Fa pwcs -is not a -.Dv NULL -pointer and the conversion is stopped due to reaching +is not a null pointer and the conversion is stopped due to reaching a nul byte, the .Fn mbsrtowcs places the state object pointed to by @@ -138,7 +133,7 @@ except for a terminating nul wide character (if any). If .Fa pwcs is not -NULL +.Dv NULL and the value returned is equal to .Fa n , the wide character string pointed to by @@ -146,9 +141,7 @@ the wide character string pointed to by is not nul terminated. If .Fa pwcs -is a -.Dv NULL -pointer, the value returned is the number of elements to contain +is a null pointer, the value returned is the number of elements to contain the whole string converted, except for a terminating nul wide character. .It (size_t)-1 The array indirectly pointed to by diff --git a/lib/libc/locale/mbstowcs.3 b/lib/libc/locale/mbstowcs.3 index 7c8531361ff9..957b7a3f5c9a 100644 --- a/lib/libc/locale/mbstowcs.3 +++ b/lib/libc/locale/mbstowcs.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: mbstowcs.3,v 1.9 2006/10/14 07:51:01 wiz Exp $ +.\" $NetBSD: mbstowcs.3,v 1.10 2006/10/16 08:42:16 wiz Exp $ .\" .\" Copyright (c)2002 Citrus Project, .\" All rights reserved. @@ -88,7 +88,7 @@ There are no cases that the value returned is greater than .Fa n (unless .Fa pwcs -is a NULL pointer) or the value of the +is a null pointer) or the value of the .Dv MB_CUR_MAX macro. If the return value is equal to diff --git a/lib/libc/locale/wcrtomb.3 b/lib/libc/locale/wcrtomb.3 index cda1239a033d..be6a2abc5a7f 100644 --- a/lib/libc/locale/wcrtomb.3 +++ b/lib/libc/locale/wcrtomb.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: wcrtomb.3,v 1.7 2006/10/14 07:51:01 wiz Exp $ +.\" $NetBSD: wcrtomb.3,v 1.8 2006/10/16 08:42:16 wiz Exp $ .\" .\" Copyright (c)2002 Citrus Project, .\" All rights reserved. @@ -49,9 +49,7 @@ pointed to by .Fa s unless .Fa s -is a -.Dv NULL -pointer. +is a null pointer. This function will modify the first at most .Dv MB_CUR_MAX bytes of the array pointed to by diff --git a/lib/libc/locale/wcsrtombs.3 b/lib/libc/locale/wcsrtombs.3 index 15e211d93569..23bc48bb8c83 100644 --- a/lib/libc/locale/wcsrtombs.3 +++ b/lib/libc/locale/wcsrtombs.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: wcsrtombs.3,v 1.11 2006/10/14 07:51:01 wiz Exp $ +.\" $NetBSD: wcsrtombs.3,v 1.12 2006/10/16 08:42:16 wiz Exp $ .\" .\" Copyright (c)2002 Citrus Project, .\" All rights reserved. @@ -76,20 +76,15 @@ will not be affected. After conversion, if .Fa s -is not a -.Dv NULL -pointer, the pointer object pointed to by +is not a null pointer, the pointer object pointed to by .Fa pwcs -is a -.Dv NULL -pointer (if the conversion is stopped due to reaching a nul wide character) -or the first byte of the character just after the last character converted. +is a null pointer (if the conversion is stopped due to reaching a +nul wide character) or the first byte of the character just after +the last character converted. .Pp If .Fa s -is not a -.Dv NULL -pointer and the conversion is stopped due to reaching +is not a null pointer and the conversion is stopped due to reaching a nul wide character, .Fn wcsrtombs places the state object pointed to by @@ -142,9 +137,7 @@ There are no cases that the value returned is greater than .Fa n (unless .Fa s -is a -.Dv NULL -pointer). +is a null pointer). If the return value is equal to .Fa n , the string pointed to by diff --git a/lib/libc/locale/wcstombs.3 b/lib/libc/locale/wcstombs.3 index de61697fd6ea..5b1e039a1c5d 100644 --- a/lib/libc/locale/wcstombs.3 +++ b/lib/libc/locale/wcstombs.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: wcstombs.3,v 1.10 2006/10/14 07:51:01 wiz Exp $ +.\" $NetBSD: wcstombs.3,v 1.11 2006/10/16 08:42:16 wiz Exp $ .\" .\" Copyright (c)2002 Citrus Project, .\" All rights reserved. @@ -95,9 +95,7 @@ There are no cases that the value returned is greater than .Fa n (unless .Fa s -is a -.Dv NULL -pointer). +is a null pointer). If the return value is equal to .Fa n , the string pointed to by diff --git a/lib/libc/locale/wcsxfrm.3 b/lib/libc/locale/wcsxfrm.3 index 10b0f5da093d..89f78aed616d 100644 --- a/lib/libc/locale/wcsxfrm.3 +++ b/lib/libc/locale/wcsxfrm.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: wcsxfrm.3,v 1.2 2006/10/14 07:51:01 wiz Exp $ +.\" $NetBSD: wcsxfrm.3,v 1.3 2006/10/16 08:42:16 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -69,9 +69,7 @@ If is set to 0 (it helps to determine an actual size needed for transformation), .Fa dst -is permitted to be a -.Dv NULL -pointer. +is permitted to be a null pointer. .Pp Comparing two strings using .Fn wcscmp