Print this page
Ensured various XPG7 stuff are declared properly in sys/stat.h (and cleanup)
New documentation for wcslen, wcsnlen, wcscasecmp (and friends), wcsdup.
Various other tweaks and markup improvements.

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/wstring.3c
          +++ new/usr/src/man/man3c/wstring.3c
   1      -'\" te
        1 +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
   2    2  .\"  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
   3    3  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4    4  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5    5  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6      -.TH WSTRING 3C "Dec 29, 1996"
   7      -.SH NAME
   8      -wstring, wscasecmp, wsncasecmp, wsdup, wscol \- Process Code string operations
   9      -.SH SYNOPSIS
  10      -.LP
  11      -.nf
  12      -#include <widec.h>
  13      -
  14      -\fBint\fR \fBwscasecmp\fR(\fBconst wchar_t *\fR\fIs1\fR, \fBconst wchar_t *\fR\fIs2\fR);
  15      -.fi
  16      -
  17      -.LP
  18      -.nf
  19      -\fBint\fR \fBwsncasecmp\fR(\fBconst wchar_t *\fR\fIs1\fR, \fBconst wchar_t *\fR\fIs2\fR, \fBint\fR \fIn\fR);
  20      -.fi
  21      -
  22      -.LP
  23      -.nf
  24      -\fBwchar_t *\fR\fBwsdup\fR(\fBconst wchar_t *\fR\fIs\fR);
  25      -.fi
  26      -
  27      -.LP
  28      -.nf
  29      -\fBint\fR \fBwscol\fR(\fBconst wchar_t *\fR\fIs\fR);
  30      -.fi
  31      -
  32      -.SH DESCRIPTION
  33      -.sp
  34      -.LP
  35      -These functions operate on Process Code strings terminated by \fBwchar_t\fR
  36      -null characters.  During appending or copying, these routines do not check for
  37      -an overflow condition of the receiving string. In the following, \fIs\fR,
  38      -\fIs1\fR, and \fIs2\fR point to Process Code strings terminated by a
  39      -\fBwchar_t\fR null.
  40      -.SS "wscasecmp(\|), wsncasecmp(\|)"
  41      -.sp
  42      -.LP
  43      -The \fBwscasecmp()\fR function compares its arguments, ignoring case, and
  44      -returns an integer greater than, equal to, or less than 0, depending upon
  45      -whether \fIs1\fR is lexicographically greater than, equal to, or less than
  46      -\fIs2\fR. It makes the same comparison but compares at most \fIn\fR Process
  47      -Code characters. The four Extended Unix Code (EUC) codesets are ordered from
  48      -lowest to highest as 0, 2, 3, 1 when characters from different codesets are
  49      -compared.
  50      -.SS "wsdup(\|)"
  51      -.sp
  52      -.LP
  53      -The \fBwsdup()\fR function returns a pointer to a new Process Code string,
  54      -which is a duplicate of the string pointed to by \fIs\fR. The space for the new
  55      -string is obtained using \fBmalloc\fR(3C). If the new string cannot be created,
  56      -a null pointer is returned.
  57      -.SS "wscol(\|)"
  58      -.sp
  59      -.LP
  60      -The \fBwscol()\fR function returns the screen display width (in columns) of the
  61      -Process Code string \fIs\fR.
  62      -.SH ATTRIBUTES
  63      -.sp
  64      -.LP
  65      -See \fBattributes\fR(5) for descriptions of the following attributes:
  66      -.sp
  67      -
  68      -.sp
  69      -.TS
  70      -box;
  71      -c | c
  72      -l | l .
  73      -ATTRIBUTE TYPE  ATTRIBUTE VALUE
  74      -_
  75      -MT-Level        MT-Safe
  76      -.TE
  77      -
  78      -.SH SEE ALSO
  79      -.sp
  80      -.LP
  81      -\fBmalloc\fR(3C), \fBstring\fR(3C), \fBwcstring\fR(3C), \fBattributes\fR(5)
        6 +.Dd "Jul 27, 2014"
        7 +.Dt WSTRING 3C
        8 +.Os
        9 +.Sh NAME
       10 +.Nm wstring ,
       11 +.Nm wscasecmp ,
       12 +.Nm wsncasecmp ,
       13 +.Nm wsdup ,
       14 +.Nm wslen ,
       15 +.Nm wscol
       16 +.Nd legacy wide-character string handling
       17 +.Sh SYNOPSIS
       18 +.In widec.h
       19 +.Ft int
       20 +.Fo wscasecmp
       21 +.Fa "const wchar_t *s1"
       22 +.Fa "const wchar_t *s2"
       23 +.Fc
       24 +.
       25 +.Ft int
       26 +.Fo wsncasecmp
       27 +.Fa "const wchar_t *s1"
       28 +.Fa "const wchar_t *s2"
       29 +.Fa int n"
       30 +.Fc
       31 +.
       32 +.Ft "wchar_t *"
       33 +.Fo wsdup
       34 +.Fa "const wchar_t *s"
       35 +.Fc
       36 +.
       37 +.Ft int
       38 +.Fo wscol
       39 +.Fa "const wchar_t *s"
       40 +.Fc
       41 +.
       42 +.Ft int
       43 +.Fo wslen
       44 +.Fa "const wchar_t *s"
       45 +.Fc
       46 +.
       47 +.Sh DESCRIPTION
       48 +These functions operate on wide-character strings. They are the historical
       49 +functions for performing operation on such strings, and have been superseded
       50 +by newer functions by various standards bodies.  As such, their use is
       51 +deprecated and should be avoided in new applications.
       52 +.Lp
       53 +Wide-character strings
       54 +.Fa s1 ,
       55 +.Fa s2 ,
       56 +and
       57 +.Fa s
       58 +used in these functions are terminated by
       59 +null wide-characters.  None of these functions check for overflow
       60 +conditions when appending to or copying strings.
       61 +.
       62 +.Ss Fn wscasecmp , wsncasecmp
       63 +The
       64 +.Fn wscasecmp
       65 +and
       66 +.Fn wsncasecmp
       67 +functions compares their arguments, ignoring differences in case according
       68 +to the current locale.  Whereas
       69 +.Fn wscasecmp
       70 +continues comparing the strings until either a difference is found,
       71 +or the end of either string is reached, the
       72 +.Fn wcsncasecmp
       73 +function compares at most
       74 +.Fa n
       75 +wide-characters.
       76 +.Lp
       77 +The
       78 +.Fn wscasecmp
       79 +and
       80 +.Fn wsncasecmp
       81 +functions have been superseded by
       82 +.Xr wcscasecmp 3C
       83 +and
       84 +.Xr wcsncasecmp 3C ,
       85 +respectively, and behave identically to them.
       86 +.Lp
       87 +Note that for lexigraphic comparisions, the four Extended Unix Code (EUC)
       88 +character sets are ordered from lowest to highest.
       89 +.
       90 +.Ss Fn wscol
       91 +.
       92 +The
       93 +.Fn wscol
       94 +function returns the width in screen columns required to display the
       95 +wide-character string
       96 +.Fa s .
       97 +This function has been superseded by
       98 +.Xr wcswidth
       99 +and behaves similarily to it.
      100 +.
      101 +.Ss Fn wsdup
      102 +.
      103 +The
      104 +.Fn wsdup
      105 +returns a duplicate copy of the wide-character string
      106 +.Fa s .
      107 +This function has been superseded by
      108 +.Xr wcsdup 3C ,
      109 +and behaves identically to it.
      110 +.
      111 +.Ss Fn wslen
      112 +.
      113 +The
      114 +.Fn wslen
      115 +function returns the number of wide-characters in
      116 +.Fa s ,
      117 +excluding the terminating null wide-character code.  This function has been
      118 +superseded by
      119 +.Xr wcslen 3C ,
      120 +and behaves identically to it.
      121 +.
      122 +.Sh INTERFACE STABILITY
      123 +.Sy Obsolete Committed .
      124 +.Sh MT-LEVEL
      125 +.Sy MT-Safe .
      126 +.Sh SEE ALSO
      127 +.Xr malloc 3C ,
      128 +.Xr string 3C ,
      129 +.Xr wcstring 3C ,
      130 +.Xr wcscasecmp 3C ,
      131 +.Xr wcsdup 3C ,
      132 +.Xr wcslen 3C ,
      133 +.Xr wcsncasecmp 3C ,
      134 +.Xr wcswidth 3C
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX