File: wnscan.3

package info (click to toggle)
libwn6 6.0-17
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 6,012 kB
  • ctags: 3,903
  • sloc: ansic: 45,078; makefile: 960; csh: 274; sh: 17
file content (57 lines) | stat: -rw-r--r-- 1,782 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.\" placed in the public domain by Will Naylor     -*- nroff -*-
.\" 1998-08-21 formatting added by Jim Van Zandt <jrv@vanzandt.mv.com>
.TH WNSCAN 3 "August 23, 1998" "WNLIB" ""
.SH NAME
wn_scan_for_eos, wn_scan_for_char, wn_scan_for_char_type, wn_scan_for_not_char_type, wn_scan_for_literal \- scan cstream for patterns

.SH SYNOPSIS
.nf
.B #include <wn/wncstr.h>
.sp
.B bool wn_scan_for_eos(\fIstream\fP)
.B wn_cstream \fIstream\fP;
.sp
.B bool wn_scan_for_char(\fIstream\fP,\fIc\fP)
.B wn_cstream \fIstream\fP;
.B char \fIc\fP;
.sp
.B bool wn_scan_for_char_type(\fIstream\fP,char_type)
.B wn_cstream \fIstream\fP;
.B char \fIchar_type\fP[256];
.sp
.B bool wn_scan_for_not_char_type(\fIstream\fP,\fIchar_type\fP)
.B wn_cstream \fIstream\fP;
.B char \fIchar_type\fP[256];
.sp
.B bool wn_scan_for_literal(\fIstream\fP,\fIliteral\fP)
.B wn_cstream \fIstream\fP;
.B char \fIliteral\fP[];
.sp
.SH DESCRIPTION
These routines scan \fIstream\fP for the indicated pattern.  They
return \fBTRUE\fP and set the current mark to the beginning of the
pattern if successful.  Otherwise, they return \fBFALSE\fP and leave
current mark unaltered.

\fBwn_scan_for_char_type\fP scans for a character c which satisfies
\fIchar_type\fP[c] == \fBTRUE\fP.  \fBwn_scan_for_char_type\fP returns \fBFALSfP if
such a char cannot be found.

\fBwn_scan_for_not_char_type\fP scans for a character c which satisfies
\fIchar_type\fP[c] == \fBFALSE\fP.  End of stream is considered to be a match,
so \fBwn_scan_for_not_char_type\fP always succeeds.  
.SH BUGS
More scan routines are needed.

Need routines to scan between 2 marks rather than between a mark
and end of stream.

Need routines to scan backward.

What about scan for regular expressions?
.SH "SEE ALSO"
wncstr, wnptok, wnary
.SH AUTHOR
Will Naylor