Lines Matching defs:??

1 /*	$Id: tbl_opts.c,v 1.21 2015/09/26 00:54:04 schwarze Exp $ */
3 * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
65 arg(struct tbl_node *tbl, int ln, const char *p, int *pos, int key)
72 /* Arguments are enclosed in parentheses. */
75 if (p[*pos] == '(') {
84 ln, *pos, "%.*s", len, p + *pos);
89 if (len == want)
97 if (len == want)
104 if (len == 0)
106 tbl->parse, ln, *pos, keys[key].name);
107 else if (want && len != want)
109 tbl->parse, ln, *pos, "%s want %d have %d",
113 if (p[*pos] == ')')
118 * Parse one line of options up to the semicolon.
119 * Each option can be preceded by blanks and/or commas,
120 * and some options are followed by arguments.
123 tbl_option(struct tbl_node *tbl, int ln, const char *p, int *offs)
132 if (p[pos] == ';') {
143 if (len == 0) {
145 tbl->parse, ln, pos, "%c", p[pos]);
150 /* Look up the option name. */
158 if (i == KEY_MAXKEYS) {
160 ln, pos, "%.*s", len, p + pos);
168 if (keys[i].key)
171 arg(tbl, ln, p, &pos, i);