xref: /illumos-gate/usr/src/cmd/sgs/liblddbg/common/args.c (revision 614a9f68)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
55aefb655Srie  * Common Development and Distribution License (the "License").
65aefb655Srie  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
215aefb655Srie 
227c478bd9Sstevel@tonic-gate /*
23*1007fd6fSAli Bahrami  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate  */
255aefb655Srie 
265aefb655Srie #include	<debug.h>
277c478bd9Sstevel@tonic-gate #include	"_debug.h"
285aefb655Srie #include	"msg.h"
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate void
Dbg_args_option(Lm_list * lml,int ndx,int c,char * optarg)312017c965SRod Evans Dbg_args_option(Lm_list *lml, int ndx, int c, char *optarg)
3292a02081SRod Evans {
3392a02081SRod Evans 	if (DBG_NOTCLASS(DBG_C_ARGS))
3492a02081SRod Evans 		return;
3592a02081SRod Evans 
3692a02081SRod Evans 	if (optarg)
3792a02081SRod Evans 		dbg_print(lml, MSG_INTL(MSG_ARG_OPTARG), ndx, c, optarg);
3892a02081SRod Evans 	else
3992a02081SRod Evans 		dbg_print(lml, MSG_INTL(MSG_ARG_OPTION), ndx, c);
4092a02081SRod Evans }
4192a02081SRod Evans 
4292a02081SRod Evans void
Dbg_args_str2chr(Lm_list * lml,int ndx,const char * opt,int c)4392a02081SRod Evans Dbg_args_str2chr(Lm_list *lml, int ndx, const char *opt, int c)
4492a02081SRod Evans {
4592a02081SRod Evans 	if (DBG_NOTCLASS(DBG_C_ARGS))
4692a02081SRod Evans 		return;
4792a02081SRod Evans 
4892a02081SRod Evans 	dbg_print(lml, MSG_INTL(MSG_ARG_STR2CHR), ndx, opt, c);
4992a02081SRod Evans }
5092a02081SRod Evans 
5192a02081SRod Evans void
Dbg_args_Wldel(Lm_list * lml,int ndx,const char * opt)5292a02081SRod Evans Dbg_args_Wldel(Lm_list *lml, int ndx, const char *opt)
537c478bd9Sstevel@tonic-gate {
545aefb655Srie 	if (DBG_NOTCLASS(DBG_C_ARGS))
557c478bd9Sstevel@tonic-gate 		return;
567c478bd9Sstevel@tonic-gate 
5792a02081SRod Evans 	dbg_print(lml, MSG_INTL(MSG_ARG_WLDEL), ndx, opt);
587c478bd9Sstevel@tonic-gate }
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate void
Dbg_args_file(Lm_list * lml,int ndx,char * file)612017c965SRod Evans Dbg_args_file(Lm_list *lml, int ndx, char *file)
627c478bd9Sstevel@tonic-gate {
635aefb655Srie 	if (DBG_NOTCLASS(DBG_C_ARGS))
647c478bd9Sstevel@tonic-gate 		return;
657c478bd9Sstevel@tonic-gate 
665aefb655Srie 	dbg_print(lml, MSG_INTL(MSG_ARG_FILE), ndx, file);
677c478bd9Sstevel@tonic-gate }
68