]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ddb/db_command.c
xnu-792.22.5.tar.gz
[apple/xnu.git] / osfmk / ddb / db_command.c
1 /*
2 * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28 /*
29 * @OSF_COPYRIGHT@
30 */
31 /*
32 * Mach Operating System
33 * Copyright (c) 1991 Carnegie Mellon University
34 * All Rights Reserved.
35 *
36 * Permission to use, copy, modify and distribute this software and its
37 * documentation is hereby granted, provided that both the copyright
38 * notice and this permission notice appear in all copies of the
39 * software, derivative works or modified versions, and any portions
40 * thereof, and that both notices appear in supporting documentation.
41 *
42 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
43 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
44 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
45 *
46 * Carnegie Mellon requests users of this software to return to
47 *
48 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
49 * School of Computer Science
50 * Carnegie Mellon University
51 * Pittsburgh PA 15213-3890
52 *
53 * any improvements or extensions that they make and grant Carnegie Mellon
54 * the rights to redistribute these changes.
55 */
56 /*
57 */
58 /*
59 * Author: David B. Golub, Carnegie Mellon University
60 * Date: 7/90
61 */
62
63 /*
64 * Command dispatcher.
65 */
66 #include <norma_vm.h>
67 #ifdef AT386
68 #include <norma_scsi.h>
69 #endif /* AT386 */
70
71 #include <mach/boolean.h>
72 #include <string.h>
73 #include <machine/db_machdep.h>
74
75 #if defined(__alpha)
76 # include <kdebug.h>
77 # if KDEBUG
78 # include <machine/kdebug.h>
79 # endif
80 #endif /* defined(__alpha) */
81
82 #include <ddb/db_lex.h>
83 #include <ddb/db_output.h>
84 #include <ddb/db_break.h>
85 #include <ddb/db_command.h>
86 #include <ddb/db_cond.h>
87 #include <ddb/db_examine.h>
88 #include <ddb/db_expr.h>
89 #include <ppc/db_low_trace.h>
90 #include <ddb/db_macro.h>
91 #include <ddb/db_print.h>
92 #include <ddb/db_run.h>
93 #include <ddb/db_task_thread.h>
94 #include <ddb/db_variables.h>
95 #include <ddb/db_watch.h>
96 #include <ddb/db_write_cmd.h>
97 #include <ddb/tr.h>
98
99 #include <machine/setjmp.h>
100 #include <kern/thread.h>
101
102 #include <kern/misc_protos.h>
103 #include <vm/vm_print.h>
104 #include <ipc/ipc_print.h>
105 #include <kern/kern_print.h>
106 #include <machine/db_machdep.h> /* For db_stack_trace_cmd(). */
107 #include <kern/zalloc.h> /* For db_show_one_zone, db_show_all_zones. */
108 #include <kern/lock.h> /* For db_show_all_slocks(). */
109
110 #if NORMA_VM
111 #include <xmm/xmm_obj.h>
112 #endif /* NORMA_VM */
113
114 /*
115 * Exported global variables
116 */
117 boolean_t db_cmd_loop_done;
118 jmp_buf_t *db_recover = 0;
119 db_addr_t db_dot;
120 db_addr_t db_last_addr;
121 db_addr_t db_prev;
122 db_addr_t db_next;
123
124 /*
125 * if 'ed' style: 'dot' is set at start of last item printed,
126 * and '+' points to next line.
127 * Otherwise: 'dot' points to next item, '..' points to last.
128 */
129 boolean_t db_ed_style = TRUE;
130
131 /*
132 * Results of command search.
133 */
134 #define CMD_UNIQUE 0
135 #define CMD_FOUND 1
136 #define CMD_NONE 2
137 #define CMD_AMBIGUOUS 3
138 #define CMD_HELP 4
139
140 /* Prototypes for functions local to this file. XXX -- should be static!
141 */
142
143 void db_command(
144 struct db_command **last_cmdp, /* IN_OUT */
145 db_expr_t *last_countp, /* IN_OUT */
146 char *last_modifp, /* IN_OUT */
147 struct db_command *cmd_table);
148
149 void db_help_cmd(void);
150
151 void db_output_prompt(void);
152
153 void db_fncall(void);
154
155 void db_cmd_list(struct db_command *table);
156
157 int db_cmd_search(
158 char * name,
159 struct db_command * table,
160 struct db_command ** cmdp); /* out */
161
162 void db_command_list(
163 struct db_command **last_cmdp, /* IN_OUT */
164 db_expr_t *last_countp, /* IN_OUT */
165 char *last_modifp, /* IN_OUT */
166 struct db_command *cmd_table);
167
168 /*
169 * Search for command prefix.
170 */
171 int
172 db_cmd_search(
173 char * name,
174 struct db_command * table,
175 struct db_command ** cmdp) /* out */
176 {
177 struct db_command *cmd;
178 int result = CMD_NONE;
179
180 for (cmd = table; cmd->name != 0; cmd++) {
181 register char *lp;
182 register char *rp;
183 register int c;
184
185 lp = name;
186 rp = cmd->name;
187 while ((c = *lp) == *rp) {
188 if (c == 0) {
189 /* complete match */
190 *cmdp = cmd;
191 return (CMD_UNIQUE);
192 }
193 lp++;
194 rp++;
195 }
196 if (c == 0) {
197 /* end of name, not end of command -
198 partial match */
199 if (result == CMD_FOUND) {
200 result = CMD_AMBIGUOUS;
201 /* but keep looking for a full match -
202 this lets us match single letters */
203 }
204 else {
205 *cmdp = cmd;
206 result = CMD_FOUND;
207 }
208 }
209 }
210 if (result == CMD_NONE) {
211 /* check for 'help' */
212 if (!strncmp(name, "help", strlen(name)))
213 result = CMD_HELP;
214 }
215 return (result);
216 }
217
218 void
219 db_cmd_list(struct db_command *table)
220 {
221 register struct db_command *new;
222 register struct db_command *old;
223 register struct db_command *cur;
224 unsigned int l;
225 unsigned int len;
226
227 len = 1;
228 for (cur = table; cur->name != 0; cur++)
229 if ((l = strlen(cur->name)) >= len)
230 len = l + 1;
231
232 old = (struct db_command *)0;
233 for (;;) {
234 new = (struct db_command *)0;
235 for (cur = table; cur->name != 0; cur++)
236 if ((new == (struct db_command *)0 ||
237 strcmp(cur->name, new->name) < 0) &&
238 (old == (struct db_command *)0 ||
239 strcmp(cur->name, old->name) > 0))
240 new = cur;
241 if (new == (struct db_command *)0)
242 return;
243 db_reserve_output_position(len);
244 db_printf("%-*s", len, new->name);
245 old = new;
246 }
247 }
248
249 void
250 db_command(
251 struct db_command **last_cmdp, /* IN_OUT */
252 db_expr_t *last_countp, /* IN_OUT */
253 char *last_modifp, /* IN_OUT */
254 struct db_command *cmd_table)
255 {
256 struct db_command *cmd;
257 int t;
258 char modif[TOK_STRING_SIZE];
259 char *modifp = &modif[0];
260 db_expr_t addr, count;
261 boolean_t have_addr;
262 int result;
263
264 t = db_read_token();
265 if (t == tEOL || t == tSEMI_COLON) {
266 /* empty line repeats last command, at 'next' */
267 cmd = *last_cmdp;
268 count = *last_countp;
269 modifp = last_modifp;
270 addr = (db_expr_t)db_next;
271 have_addr = FALSE;
272 if (t == tSEMI_COLON)
273 db_unread_token(t);
274 }
275 else if (t == tEXCL) {
276 db_fncall();
277 return;
278 }
279 else if (t != tIDENT) {
280 db_printf("?\n");
281 db_flush_lex();
282 return;
283 }
284 else {
285 /*
286 * Search for command
287 */
288 while (cmd_table) {
289 result = db_cmd_search(db_tok_string,
290 cmd_table,
291 &cmd);
292 switch (result) {
293 case CMD_NONE:
294 if (db_exec_macro(db_tok_string) == 0)
295 return;
296 db_printf("No such command \"%s\"\n", db_tok_string);
297 db_flush_lex();
298 return;
299 case CMD_AMBIGUOUS:
300 db_printf("Ambiguous\n");
301 db_flush_lex();
302 return;
303 case CMD_HELP:
304 db_cmd_list(cmd_table);
305 db_flush_lex();
306 return;
307 default:
308 break;
309 }
310 if ((cmd_table = cmd->more) != 0) {
311 t = db_read_token();
312 if (t != tIDENT) {
313 db_cmd_list(cmd_table);
314 db_flush_lex();
315 return;
316 }
317 }
318 }
319
320 if ((cmd->flag & CS_OWN) == 0) {
321 /*
322 * Standard syntax:
323 * command [/modifier] [addr] [,count]
324 */
325 t = db_read_token();
326 if (t == tSLASH) {
327 t = db_read_token();
328 if (t != tIDENT) {
329 db_printf("Bad modifier \"/%s\"\n", db_tok_string);
330 db_flush_lex();
331 return;
332 }
333 strcpy(modif, db_tok_string);
334 }
335 else {
336 db_unread_token(t);
337 modif[0] = '\0';
338 }
339
340 if (db_expression(&addr)) {
341 db_dot = (db_addr_t) addr;
342 db_last_addr = db_dot;
343 have_addr = TRUE;
344 }
345 else {
346 addr = (db_expr_t) db_dot;
347 have_addr = FALSE;
348 }
349 t = db_read_token();
350 if (t == tCOMMA) {
351 if (!db_expression(&count)) {
352 db_printf("Count missing after ','\n");
353 db_flush_lex();
354 return;
355 }
356 }
357 else {
358 db_unread_token(t);
359 count = -1;
360 }
361 }
362 }
363 if (cmd != 0) {
364 /*
365 * Execute the command.
366 */
367 (*cmd->fcn)(addr, have_addr, count, modifp);
368
369 if (cmd->flag & CS_SET_DOT) {
370 /*
371 * If command changes dot, set dot to
372 * previous address displayed (if 'ed' style).
373 */
374 if (db_ed_style) {
375 db_dot = db_prev;
376 }
377 else {
378 db_dot = db_next;
379 }
380 }
381 else {
382 /*
383 * If command does not change dot,
384 * set 'next' location to be the same.
385 */
386 db_next = db_dot;
387 }
388 }
389 *last_cmdp = cmd;
390 *last_countp = count;
391 strcpy(last_modifp, modifp);
392 }
393
394 void
395 db_command_list(
396 struct db_command **last_cmdp, /* IN_OUT */
397 db_expr_t *last_countp, /* IN_OUT */
398 char *last_modifp, /* IN_OUT */
399 struct db_command *cmd_table)
400 {
401 do {
402 db_command(last_cmdp, last_countp, last_modifp, cmd_table);
403 db_skip_to_eol();
404 } while (db_read_token() == tSEMI_COLON && db_cmd_loop_done == 0);
405 }
406
407
408 extern void db_system_stats(void);
409
410 struct db_command db_show_all_cmds[] = {
411 { "acts", db_show_all_acts, 0, 0 },
412 { "spaces", db_show_all_spaces, 0, 0 },
413 { "tasks", db_show_all_acts, 0, 0 },
414 /* temporary alias for sanity preservation */
415 { "threads", db_show_all_acts, 0, 0 },
416 { "zones", db_show_all_zones, 0, 0 },
417 { "vmtask", db_show_all_task_vm, 0, 0 },
418 { (char *)0 }
419 };
420
421 /* XXX */
422
423 extern void db_show_thread_log(void);
424 extern void db_show_one_lock(lock_t*);
425 extern void db_show_etap_log(db_expr_t, int, db_expr_t, char *);
426
427 struct db_command db_show_cmds[] = {
428 { "all", 0, 0, db_show_all_cmds },
429 { "registers", db_show_regs, 0, 0 },
430 { "variables", (db_func) db_show_variable, CS_OWN, 0 },
431 { "breaks", (db_func) db_listbreak_cmd, 0, 0 },
432 { "watches", (db_func) db_listwatch_cmd, 0, 0 },
433 { "task", db_show_one_task, 0, 0 },
434 { "act", db_show_one_act, 0, 0 },
435 { "shuttle", db_show_shuttle, 0, 0 },
436 #if 0
437 { "thread", db_show_one_thread, 0, 0 },
438 #endif
439 { "vmtask", db_show_one_task_vm, 0, 0 },
440 { "macro", (db_func) db_show_macro, CS_OWN, 0 },
441 { "runq", (db_func) db_show_runq, 0, 0 },
442 { "map", (db_func) vm_map_print, 0, 0 },
443 { "object", (db_func) vm_object_print, 0, 0 },
444 { "page", (db_func) vm_page_print, 0, 0 },
445 { "copy", (db_func) vm_map_copy_print, 0, 0 },
446 { "port", (db_func) ipc_port_print, 0, 0 },
447 { "pset", (db_func) ipc_pset_print, 0, 0 },
448 { "kmsg", (db_func) ipc_kmsg_print, 0, 0 },
449 { "msg", (db_func) ipc_msg_print, 0, 0 },
450 { "ipc_port", db_show_port_id, 0, 0 },
451 #if NORMA_VM
452 { "xmm_obj", (db_func) xmm_obj_print, 0, 0 },
453 { "xmm_reply", (db_func) xmm_reply_print, 0, 0 },
454 #endif /* NORMA_VM */
455 #if TRACE_BUFFER
456 { "tr", db_show_tr, 0, 0 },
457 #endif /* TRACE_BUFFER */
458 { "space", db_show_one_space, 0, 0 },
459 { "system", (db_func) db_system_stats, 0, 0 },
460 { "zone", db_show_one_zone, 0, 0 },
461 { "lock", (db_func)db_show_one_lock, 0, 0 },
462 { "mutex_lock", (db_func)db_show_one_mutex, 0, 0 },
463 { "simple_lock", (db_func)db_show_one_simple_lock, 0, 0 },
464 { "thread_log", (db_func)db_show_thread_log, 0, 0 },
465 { "shuttle", db_show_shuttle, 0, 0 },
466 { (char *)0, }
467 };
468
469 #define db_switch_cpu kdb_on
470 extern void db_switch_cpu(int);
471
472 struct db_command db_command_table[] = {
473 #if DB_MACHINE_COMMANDS
474
475 /* this must be the first entry, if it exists */
476 { "machine", 0, 0, 0 },
477 #endif
478 { "print", (db_func) db_print_cmd, CS_OWN, 0 },
479 { "examine", db_examine_cmd, CS_MORE|CS_SET_DOT, 0 },
480 { "x", db_examine_cmd, CS_MORE|CS_SET_DOT, 0 },
481 { "xf", db_examine_forward, CS_SET_DOT, 0 },
482 { "xb", db_examine_backward, CS_SET_DOT, 0 },
483 { "search", (db_func) db_search_cmd, CS_OWN|CS_SET_DOT, 0 },
484 { "set", (db_func) db_set_cmd, CS_OWN, 0 },
485 { "write", db_write_cmd, CS_MORE|CS_SET_DOT, 0 },
486 { "w", db_write_cmd, CS_MORE|CS_SET_DOT, 0 },
487 { "delete", (db_func) db_delete_cmd, CS_OWN, 0 },
488 { "d", (db_func) db_delete_cmd, CS_OWN, 0 },
489 { "break", db_breakpoint_cmd, CS_MORE, 0 },
490 { "dwatch", db_deletewatch_cmd, CS_MORE, 0 },
491 { "watch", db_watchpoint_cmd, CS_MORE, 0 },
492 { "step", db_single_step_cmd, 0, 0 },
493 { "s", db_single_step_cmd, 0, 0 },
494 { "continue", db_continue_cmd, 0, 0 },
495 { "c", db_continue_cmd, 0, 0 },
496 { "gdb", db_continue_gdb, 0, 0 },
497 { "until", db_trace_until_call_cmd, 0, 0 },
498
499 /* As per request of DNoveck, CR1550, leave this disabled */
500 #if 0 /* until CR1440 is fixed, to avoid toe-stubbing */
501 { "next", db_trace_until_matching_cmd, 0, 0 },
502 #endif
503 { "match", db_trace_until_matching_cmd, 0 , 0 },
504 { "trace", db_stack_trace_cmd, 0, 0 },
505 { "cond", (db_func) db_cond_cmd, CS_OWN, 0 },
506 { "call", (db_func) db_fncall, CS_OWN, 0 },
507 { "macro", (db_func) db_def_macro_cmd, CS_OWN, 0 },
508 { "dmacro", (db_func) db_del_macro_cmd, CS_OWN, 0 },
509 { "show", 0, 0, db_show_cmds },
510 { "cpu", (db_func) db_switch_cpu, 0, 0 },
511 { "dr", db_display_real, CS_MORE|CS_SET_DOT, 0 },
512 { "di", db_display_iokit, CS_MORE, 0 },
513 { "dk", db_display_kmod, CS_MORE, 0 },
514
515 { "reboot", (db_func) db_reboot, 0, 0 },
516 #if !defined(__ppc__)
517 { "pm", db_pmgr, CS_MORE, 0 },
518 { "na", db_nap, CS_MORE, 0 },
519 { "ms", db_msr, CS_MORE, 0 },
520 { "cp", db_cpuid, CS_MORE, 0 },
521 { "da", db_apic, CS_MORE, 0 },
522 { "ts", db_test, CS_MORE, 0 },
523 { "dn", db_intcnt, CS_MORE, 0 },
524 { "hp", db_hpet, CS_MORE, 0 },
525 { "cf", db_cfg, CS_MORE, 0 },
526 { "dt", db_dtimers, CS_MORE, 0 },
527 #endif
528 #if defined(__ppc__)
529 { "lt", db_low_trace, CS_MORE|CS_SET_DOT, 0 },
530 { "dl", db_display_long, CS_MORE|CS_SET_DOT, 0 },
531 { "dc", db_display_char, CS_MORE|CS_SET_DOT, 0 },
532 { "dv", db_display_virtual, CS_MORE|CS_SET_DOT, 0 },
533 { "dm", db_display_mappings, CS_MORE|CS_SET_DOT, 0 },
534 { "dh", db_display_hash, CS_MORE|CS_SET_DOT, 0 },
535 { "dp", db_display_pmap, CS_MORE, 0 },
536 { "ds", db_display_save, CS_MORE|CS_SET_DOT, 0 },
537 { "dx", db_display_xregs, CS_MORE|CS_SET_DOT, 0 },
538 { "gs", db_gsnoop, CS_MORE, 0 },
539 { "cm", db_check_mappings, CS_MORE, 0 },
540 { "cp", db_check_pmaps, CS_MORE, 0 },
541 #endif
542 { (char *)0, }
543 };
544
545 /* this function should be called to install the machine dependent
546 commands. It should be called before the debugger is enabled */
547 void db_machine_commands_install(struct db_command *ptr)
548 {
549 db_command_table[0].more = ptr;
550 return;
551 }
552
553
554 struct db_command *db_last_command = 0;
555 db_expr_t db_last_count = 0;
556 char db_last_modifier[TOK_STRING_SIZE] = { '\0' };
557
558 void
559 db_help_cmd(void)
560 {
561 struct db_command *cmd = db_command_table;
562
563 while (cmd->name != 0) {
564 db_printf("%-12s", cmd->name);
565 db_end_line();
566 cmd++;
567 }
568 }
569
570 int (*ddb_display)(void);
571
572 void
573 db_command_loop(void)
574 {
575 jmp_buf_t db_jmpbuf;
576 jmp_buf_t *prev = db_recover;
577 extern int db_output_line;
578 extern int db_macro_level;
579 extern int db_indent;
580
581 /*
582 * Initialize 'prev' and 'next' to dot.
583 */
584 db_prev = db_dot;
585 db_next = db_dot;
586
587 if (ddb_display)
588 (*ddb_display)();
589
590 db_cmd_loop_done = 0;
591 while (!db_cmd_loop_done) {
592 (void) _setjmp(db_recover = &db_jmpbuf);
593 db_macro_level = 0;
594 if (db_print_position() != 0)
595 db_printf("\n");
596 db_output_line = 0;
597 db_indent = 0;
598 db_reset_more();
599 db_output_prompt();
600
601 (void) db_read_line("!!");
602 db_command_list(&db_last_command, &db_last_count,
603 db_last_modifier, db_command_table);
604 }
605
606 db_recover = prev;
607 }
608
609 boolean_t
610 db_exec_cmd_nest(
611 const char *cmd,
612 int size)
613 {
614 struct db_lex_context lex_context;
615
616 db_cmd_loop_done = 0;
617 if (cmd) {
618 db_save_lex_context(&lex_context);
619 db_switch_input(cmd, size);
620 }
621 db_command_list(&db_last_command, &db_last_count,
622 db_last_modifier, db_command_table);
623 if (cmd)
624 db_restore_lex_context(&lex_context);
625 return(db_cmd_loop_done == 0);
626 }
627
628 void
629 db_error(const char *s)
630 {
631 extern int db_macro_level;
632
633 db_macro_level = 0;
634 if (db_recover) {
635 if (s > (char *)1)
636 db_printf(s);
637 db_flush_lex();
638 _longjmp(db_recover, (s == (char *)1) ? 2 : 1);
639 }
640 else
641 {
642 if (s > (char *)1)
643 db_printf(s);
644 panic("db_error");
645 }
646 }
647
648
649 /*
650 * Call random function:
651 * !expr(arg,arg,arg)
652 */
653 void
654 db_fncall(void)
655 {
656 db_expr_t fn_addr;
657 #define MAXARGS 11
658 uint32_t args[MAXARGS];
659 db_expr_t argwork;
660 int nargs = 0;
661 uint32_t retval;
662 uint32_t (*func)(uint32_t, ...);
663 int t;
664
665 if (!db_expression(&fn_addr)) {
666 db_printf("Bad function \"%s\"\n", db_tok_string);
667 db_flush_lex();
668 return;
669 }
670 func = (uint32_t (*) (uint32_t, ...)) fn_addr;
671
672 t = db_read_token();
673 if (t == tLPAREN) {
674 if (db_expression(&argwork)) {
675 args[nargs] = (uint32_t)argwork;
676 nargs++;
677 while ((t = db_read_token()) == tCOMMA) {
678 if (nargs == MAXARGS) {
679 db_printf("Too many arguments\n");
680 db_flush_lex();
681 return;
682 }
683 if (!db_expression(&argwork)) {
684 db_printf("Argument missing\n");
685 db_flush_lex();
686 return;
687 }
688 args[nargs] = (uint32_t)argwork;
689 nargs++;
690 }
691 db_unread_token(t);
692 }
693 if (db_read_token() != tRPAREN) {
694 db_printf("?\n");
695 db_flush_lex();
696 return;
697 }
698 }
699 while (nargs < MAXARGS) {
700 args[nargs++] = 0;
701 }
702
703 retval = (*func)(args[0], args[1], args[2], args[3], args[4],
704 args[5], args[6], args[7], args[8], args[9] );
705 db_printf(" %#n\n", retval);
706 }
707
708 boolean_t
709 db_option(
710 const char *modif,
711 int option)
712 {
713 register char *p;
714
715 for (p = modif; *p; p++)
716 if (*p == option)
717 return(TRUE);
718 return(FALSE);
719 }