xref: /illumos-gate/usr/src/cmd/sgs/liblddbg/common/args.c (revision 614a9f681afc3c353478b52a1f8b5ac1cec364d0)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
24  */
25 
26 #include	<debug.h>
27 #include	"_debug.h"
28 #include	"msg.h"
29 
30 void
Dbg_args_option(Lm_list * lml,int ndx,int c,char * optarg)31 Dbg_args_option(Lm_list *lml, int ndx, int c, char *optarg)
32 {
33 	if (DBG_NOTCLASS(DBG_C_ARGS))
34 		return;
35 
36 	if (optarg)
37 		dbg_print(lml, MSG_INTL(MSG_ARG_OPTARG), ndx, c, optarg);
38 	else
39 		dbg_print(lml, MSG_INTL(MSG_ARG_OPTION), ndx, c);
40 }
41 
42 void
Dbg_args_str2chr(Lm_list * lml,int ndx,const char * opt,int c)43 Dbg_args_str2chr(Lm_list *lml, int ndx, const char *opt, int c)
44 {
45 	if (DBG_NOTCLASS(DBG_C_ARGS))
46 		return;
47 
48 	dbg_print(lml, MSG_INTL(MSG_ARG_STR2CHR), ndx, opt, c);
49 }
50 
51 void
Dbg_args_Wldel(Lm_list * lml,int ndx,const char * opt)52 Dbg_args_Wldel(Lm_list *lml, int ndx, const char *opt)
53 {
54 	if (DBG_NOTCLASS(DBG_C_ARGS))
55 		return;
56 
57 	dbg_print(lml, MSG_INTL(MSG_ARG_WLDEL), ndx, opt);
58 }
59 
60 void
Dbg_args_file(Lm_list * lml,int ndx,char * file)61 Dbg_args_file(Lm_list *lml, int ndx, char *file)
62 {
63 	if (DBG_NOTCLASS(DBG_C_ARGS))
64 		return;
65 
66 	dbg_print(lml, MSG_INTL(MSG_ARG_FILE), ndx, file);
67 }
68