diff options
author | Yuri Pankov <yuri.pankov@nexenta.com> | 2011-10-03 04:36:40 -0700 |
---|---|---|
committer | Yuri Pankov <yuri.pankov@nexenta.com> | 2011-10-03 04:36:40 -0700 |
commit | ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2ab (patch) | |
tree | 3b2f488c4a03bda877119449bd63c01fa32aa6f2 /usr/src/man/man3c/string.3c | |
parent | af8dc4373b25cce2c0bbb80f24e791f99eccbb6f (diff) | |
download | illumos-joyent-ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2ab.tar.gz |
1502 Remove conversion cruft from manpages
Reviewed by: Alexander Eremin <alexander.eremin@nexenta.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: Garrett D'Amore <garrett.damore@gmail.com>
Diffstat (limited to 'usr/src/man/man3c/string.3c')
-rw-r--r-- | usr/src/man/man3c/string.3c | 73 |
1 files changed, 36 insertions, 37 deletions
diff --git a/usr/src/man/man3c/string.3c b/usr/src/man/man3c/string.3c index f8717aa694..51a7aee7eb 100644 --- a/usr/src/man/man3c/string.3c +++ b/usr/src/man/man3c/string.3c @@ -4,14 +4,14 @@ .\" Portions Copyright (c) 1994 Man-cgi 1.15, Panagiotis Christias (christia@softlab.ntua.gr) .\" Portions Copyright (c) 1996-2008 Modified for NetBSD by Kimmo Suominen (kimmo@suominen.com) .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. .\" This notice shall appear on any product containing this material. .\" 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. .\" 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. .\" 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] -.TH string 3C "1 Aug 2008" "SunOS 5.11" "Standard C Library Functions" +.TH STRING 3C "Aug 1, 2008" .SH NAME string, strcasecmp, strncasecmp, strcat, strncat, strlcat, strchr, strrchr, strcmp, strncmp, strcpy, strncpy, strlcpy, strcspn, strspn, strdup, strlen, @@ -403,10 +403,10 @@ The following example searches for tokens separated by space characters. char *token; char line[] = "LINE TO BE SEPARATED"; char *search = " "; - + /* Token will point to "LINE". */ token = strtok(line, search); - + /* Token will point to "TO". */ token = strtok(NULL, search); .fi @@ -427,7 +427,7 @@ separated by any combination of SPACEs, TABs, or NEWLINEs. struct element { char *key; char *data; -}; +}; \&... char line[LINE_MAX]; char *key, *data; @@ -448,32 +448,32 @@ the second argument, "/". .sp .in +2 .nf -#define __EXTENSIONS__ +#define __EXTENSIONS__ #include <stdio.h> #include <string.h> - -int -main() { - char *buf="5/90/45"; - char *token; - char *lasts; - - printf("tokenizing \e"%s\e" with strtok():\en", buf); - if ((token = strtok(buf, "/")) != NULL) { - printf("token = "%s\e"\en", token); - while ((token = strtok(NULL, "/")) != NULL) { - printf("token = \e"%s\e"\en", token); - } - } - - buf = "//5//90//45//"; - printf("\entokenizing \e"%s\e" with strtok_r():\en", buf); - if ((token = strtok_r(buf, "/", &lasts)) != NULL) { - printf("token = \e"%s\e"\en", token); - while ((token = strtok_r(NULL, "/", &lasts)) != NULL) { - printf("token = \e"%s\e"\en", token); - } - } + +int +main() { + char *buf="5/90/45"; + char *token; + char *lasts; + + printf("tokenizing \e"%s\e" with strtok():\en", buf); + if ((token = strtok(buf, "/")) != NULL) { + printf("token = "%s\e"\en", token); + while ((token = strtok(NULL, "/")) != NULL) { + printf("token = \e"%s\e"\en", token); + } + } + + buf = "//5//90//45//"; + printf("\entokenizing \e"%s\e" with strtok_r():\en", buf); + if ((token = strtok_r(buf, "/", &lasts)) != NULL) { + printf("token = \e"%s\e"\en", token); + while ((token = strtok_r(NULL, "/", &lasts)) != NULL) { + printf("token = \e"%s\e"\en", token); + } + } } .fi .in -2 @@ -505,17 +505,16 @@ See \fBattributes\fR(5) for descriptions of the following attributes: .sp .TS -tab() box; -cw(2.75i) |cw(2.75i) -lw(2.75i) |lw(2.75i) -. -ATTRIBUTE TYPEATTRIBUTE VALUE +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE _ -Interface StabilityCommitted +Interface Stability Committed _ -MT-LevelSee below. +MT-Level See below. _ -StandardSee below. +Standard See below. .TE .sp |