⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 strparse.3

📁 牛顿插值方法求解多项式的系数
💻 3
字号:
.\"(c) Copyright 1992, 1993 by Panagiotis Tsirigotis.\"All rights reserved.  The file named COPYRIGHT specifies the terms .\"and conditions for redistribution..\".\" $Id: strparse.3,v 1.1.1.1 2003/02/19 17:29:27 bbraun Exp $.TH STRPARSE 3X "30 September 1992".SH NAMEstr_parse, str_endparse, str_component, str_separator, str_nextpos.SH SYNOPSIS.LP.nf.ft B#include "str.h".LP.ft Bstr_h str_parse( str, separ, flags, errnop )char *str ;char *separ ;int flags ;int *errnop ;.LP.ft Bvoid str_endparse( handle )str_h handle ;.LP.ft Bchar *str_component( handle )str_h handle ;.LP.ft Bint str_setstr( handle, newstr )str_h handle ;char *newstr ;.LP.ft Bint str_separator( handle, separ )str_h handle ;char *separ ;.LP.ft Bchar *str_nextpos( handle )str_h handle ;.LPextern int str_errno ;.SH DESCRIPTION.LPThese functions are useful for parsing strings.  In this contextparsing means breaking the string into substrings. The substrings areseparated by a list of possible separator characters..LP.B str_component()returns successive substrings of the string..B str_parse()creates and initializes a string parser with the stringthat will be processed, \fIstr\fR, the list of possible separatorcharacters, \fIsepar\fR, and flags that control how the parserworks. The \fIflags\fR argument is formed by ORing one or more ofthe following constants:.TP 20.SB STR_RETURN_ERRORIf something goes wrong return a value that indicates that an error occured(e.g. out of memory). The default is for the program to be terminatedwith an appropriate error message..TP.SB STR_NULL_STARTIf \fIstr\fR starts with a separator then a zero-length string will be returnedthe first time \fBstr_component()\fR is called..TP.SB STR_NULL_ENDIf \fIstr\fR ends with a separator then a zero-length string will be returnedby \fBstr_component()\fR when the substrings of \fIstr\fR are exhausted..TP.SB STR_MALLOCThe strings returned by \fBstr_component()\fR will be in malloc'ed memory.By default the substrings are part of \fIstr\fR.If this option is not used \fIstr\fR will be modifiedby \fBstr_component()\fR..LPFinally, \fBSTR_NOFLAGS\fR may be used to specify no flags.The \fIerrnop\fR argument points to an integer where the string processingfunctions will deposit an error code if an error occurs.If \fIerrnop\fRis.SM NULLthe error codes will be placed in \fIstr_errno\fR.This is useful only if \fBSTR_RETURN_ERROR\fR is used in \fIflags\fR.It is possible that \fIstr\fP is .SM NULL.In this case, a subsequent.B str_setstr()should be used to specify the string to be processed..LP.B str_component()returns successive substrings from the string associated with theparser specified by \fIhandle\fR..LP.B str_endparse()destroys the parser specified by \fIhandle\fR..LP.B str_setstr()changes the processed string to \fInewstr\fP..LP.B str_separator()replaces the list of separator characters with \fIsepar\fR.Processing continues from the current position..LP.B str_nextpos()returns a pointer to the rest of the string. The previous characteris a separator character (if \fBSTR_MALLOC\fR is not set, then theprevious character is.SM NUL)..SH "RETURN VALUES".LP.B str_parse()returns a parser handle or.SM NULLif something goes wrong and \fIflags\fR & \fBSTR_RETURN_ERROR\fR is true.Possible \fIstr_errno\fR values:.RS.TP 20.SB STR_ENULLSEPAR\fIsepar\fR is.SM NULL.TP.SB STR_ENOMEMthe program ran out of memory.RE.LP.B str_component()returns a pointer to the next substring or.SM NULLif something goes wrong and \fIflags\fR & \fBSTR_RETURN_ERROR\fR is true..LP.B str_setstr()returns .SB STR_OKon success or.SB STR_ERRon failure..LP.B str_separator()returns .SB STR_OKon success or.SB STR_ERRon failure..LP.B str_nextpos()returns a pointer or.SM NULLif the end of string has been reached..SH BUGS.B str_component()modifies the string unless \fBSTR_MALLOC\fR isset in the parser..LPThere should be only one parser active on a specific string. If thereis more thanone, they all must use the \fBSTR_MALLOC\fR option.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -