Postfix3.3.1
総合概要
データ構造
ファイル
ファイル一覧
大域各種
postfix-3.3.1
src
global
tok822_find.c
[詳解]
1
/*++
2
/* NAME
3
/* tok822_find 3
4
/* SUMMARY
5
/* token list search operators
6
/* SYNOPSIS
7
/* #include <tok822.h>
8
/*
9
/* TOK822 *tok822_find_type(head, type)
10
/* TOK822 *head;
11
/* int type;
12
/*
13
/* TOK822 *tok822_rfind_type(tail, type)
14
/* TOK822 *tail;
15
/* int type;
16
/* DESCRIPTION
17
/* This module implements token list search operations.
18
/*
19
/* tok822_find_type() searches a list of tokens for the first
20
/* instance of the specified token type. The result is the
21
/* found token or a null pointer when the search failed.
22
/*
23
/* tok822_rfind_type() searches a list of tokens in reverse direction
24
/* for the first instance of the specified token type. The result
25
/* is the found token or a null pointer when the search failed.
26
/* LICENSE
27
/* .ad
28
/* .fi
29
/* The Secure Mailer license must be distributed with this software.
30
/* AUTHOR(S)
31
/* Wietse Venema
32
/* IBM T.J. Watson Research
33
/* P.O. Box 704
34
/* Yorktown Heights, NY 10598, USA
35
/*--*/
36
37
/* System library. */
38
39
#include <
sys_defs.h
>
40
41
/* Utility library. */
42
43
#include <
vstring.h
>
44
45
/* Global library. */
46
47
#include <
tok822.h
>
48
49
/* tok822_find_type - find specific token type, forward search */
50
51
TOK822
*
tok822_find_type
(
TOK822
*
head
,
int
op)
52
{
53
TOK822
*tp;
54
55
for
(tp = head; tp != 0 && tp->
type
!= op; tp = tp->
next
)
56
/* void */
;
57
return
(tp);
58
}
59
60
/* tok822_rfind_type - find specific token type, backward search */
61
62
TOK822
*
tok822_rfind_type
(
TOK822
*
tail
,
int
op)
63
{
64
TOK822
*tp;
65
66
for
(tp = tail; tp != 0 && tp->
type
!= op; tp = tp->
prev
)
67
/* void */
;
68
return
(tp);
69
}
TOK822
Definition:
tok822.h:27
tok822.h
TOK822::head
struct TOK822 * head
Definition:
tok822.h:32
TOK822::type
int type
Definition:
tok822.h:28
vstring.h
sys_defs.h
tok822_rfind_type
TOK822 * tok822_rfind_type(TOK822 *tail, int op)
Definition:
tok822_find.c:62
tok822_find_type
TOK822 * tok822_find_type(TOK822 *head, int op)
Definition:
tok822_find.c:51
TOK822::prev
struct TOK822 * prev
Definition:
tok822.h:30
TOK822::next
struct TOK822 * next
Definition:
tok822.h:31
TOK822::tail
struct TOK822 * tail
Definition:
tok822.h:33
2018年11月10日(土) 18時59分39秒作成 - Postfix3.3.1 / 構成:
1.8.9.1