当前位置: 首页>>代码示例>>C++>>正文


C++ MSG_INTL函数代码示例

本文整理汇总了C++中MSG_INTL函数的典型用法代码示例。如果您正苦于以下问题:C++ MSG_INTL函数的具体用法?C++ MSG_INTL怎么用?C++ MSG_INTL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MSG_INTL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Dbg_tls_modent

static void
Dbg_tls_modent(Lm_list *lml, TLS_modinfo * tmodent)
{
	/*
	 * MSG_ORIG(MSG_TLS_FLAG_STATIC)
	 */
	static char	flagstr[FLAGSZ];
	static Val_desc	vda[] = {
		{ TM_FLG_STATICTLS,	MSG_TLS_FLAG_STATIC },
		{ 0,			0 }
	};
	static CONV_EXPN_FIELD_ARG conv_arg = { flagstr, sizeof (flagstr) };

	ulong_t	flags;

	if ((flags = tmodent->tm_flags) != 0) {
		conv_arg.oflags = conv_arg.rflags = flags;
		(void) conv_expn_field(&conv_arg, vda, 0);
	} else {
		flagstr[0] = '\0';
	}

	dbg_print(lml, MSG_INTL(MSG_TLS_MODENT1),
	    EC_XWORD((uintptr_t)tmodent->tm_tlsblock),
	    EC_XWORD(tmodent->tm_stattlsoffset), EC_XWORD(tmodent->tm_flags),
	    flagstr);
	dbg_print(lml, MSG_INTL(MSG_TLS_MODENT2),
	    EC_XWORD(tmodent->tm_filesz), EC_XWORD(tmodent->tm_memsz),
	    EC_XWORD(tmodent->tm_modid));
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:30,代码来源:tls.c

示例2: Dbg_util_edge_in

void
Dbg_util_edge_in(Lm_list *lml, Rt_map *clmp, uint_t flags, Rt_map *dlmp,
    int ndx, int flag)
{
	const char	*str;

	if (DBG_NOTCLASS(DBG_C_INIT))
		return;
	if (DBG_NOTDETAIL())
		return;

	if (flag & RT_SORT_REV)
		str = MSG_ORIG(MSG_SCN_INIT);
	else
		str = MSG_ORIG(MSG_SCN_FINI);

	if ((clmp == 0) || (ectoggle == 0))
		Dbg_util_nl(lml, DBG_NL_STD);
	if (clmp == 0) {
		dbg_print(lml, MSG_INTL(MSG_UTL_EDGE_TITLE), str);
		dbg_print(lml, MSG_INTL(MSG_UTL_EDGE_START), ndx, NAME(dlmp));
	} else
		dbg_print(lml, MSG_INTL(MSG_UTL_EDGE_IN), ndx, NAME(dlmp),
		    NAME(clmp), conv_bnd_type(flags));

	ectoggle = 1;
}
开发者ID:andreiw,项目名称:polaris,代码行数:27,代码来源:util.c

示例3: Dbg_sec_unsup_strmerge

void
Dbg_sec_unsup_strmerge(Lm_list *lml, Is_desc *isp)
{
	dbg_isec_name_buf_t	buf;
	char			*alloc_mem;
	const char		*str;

	if (DBG_NOTCLASS(DBG_C_SECTIONS))
		return;

	/*
	 * We can only merge string table sections with single byte
	 * (char) characters. For any other (wide) character types,
	 * issue a message so the user will understand why these
	 * sections are not being picked up.
	 */
	if ((isp->is_shdr->sh_entsize > 1) ||
	    (isp->is_shdr->sh_addralign > 1)) {
		str = (isp->is_file != NULL) ? isp->is_file->ifl_name :
		    MSG_INTL(MSG_STR_NULL);
		dbg_print(lml, MSG_INTL(MSG_SEC_STRMERGE_UNSUP),
		    dbg_fmt_isec_name(isp, buf, &alloc_mem), str,
		    EC_XWORD(isp->is_shdr->sh_addralign),
		    EC_XWORD(isp->is_shdr->sh_entsize));
		if (alloc_mem != NULL)
			free(alloc_mem);
	}
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:28,代码来源:sections.c

示例4: Dbg_sec_group

void
Dbg_sec_group(Lm_list *lml, Is_desc *isp, Group_desc *gdp)
{
	dbg_isec_name_buf_t	buf;
	char			*alloc_mem;
	const char		*comdat, *isp_str;

	if (DBG_NOTCLASS(DBG_C_SECTIONS))
		return;

	if (gdp->gd_data[0] & GRP_COMDAT)
		comdat = MSG_ORIG(MSG_STR_COMDAT);
	else
		comdat = MSG_ORIG(MSG_STR_EMPTY);

	isp_str = dbg_fmt_isec_name(isp, buf, &alloc_mem);

	if (isp->is_shdr->sh_type == SHT_GROUP) {
		dbg_print(lml, MSG_INTL(MSG_SEC_GRP_DEFINE), isp_str,
		    isp->is_file->ifl_name, comdat, gdp->gd_name);
	} else {
		dbg_print(lml, MSG_INTL(MSG_SEC_GRP_MEMBER), isp_str,
		    isp->is_file->ifl_name, comdat, gdp->gd_name);
	}

	if (gdp->gd_oisc) {
		dbg_print(lml, MSG_INTL(MSG_SEC_GRP_DISCARDED), isp_str,
		    isp->is_file->ifl_name, gdp->gd_name,
		    gdp->gd_oisc->is_file->ifl_name);
	}

	if (alloc_mem != NULL)
		free(alloc_mem);
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:34,代码来源:sections.c

示例5: Dbg_unused_sec

void
Dbg_unused_sec(Lm_list *lml, Is_desc *isp)
{
	const char	*str;

	if (DBG_NOTCLASS(DBG_C_UNUSED))
		return;
	if (DBG_NOTDETAIL())
		return;

	/*
	 * If the file from which this section originates hasn't been referenced
	 * at all, skip this diagnostic, as it would have been covered under
	 * Dbg_unused_file() called from ignore_section_processing().
	 */
	if (isp->is_file &&
	    ((isp->is_file->ifl_flags & FLG_IF_FILEREF) == 0))
		return;

	if (isp->is_flags & FLG_IS_DISCARD)
		str = MSG_INTL(MSG_USD_SECDISCARD);
	else
		str = MSG_ORIG(MSG_STR_EMPTY);

	dbg_print(lml, MSG_INTL(MSG_USD_SEC), isp->is_basename,
	    EC_XWORD(isp->is_shdr->sh_size), isp->is_file->ifl_name, str);
}
开发者ID:andreiw,项目名称:polaris,代码行数:27,代码来源:unused.c

示例6: Dbg_sec_in

void
Dbg_sec_in(Lm_list *lml, Is_desc *isp)
{
	if (DBG_NOTCLASS(DBG_C_SECTIONS))
		return;

	if (isp->is_flags & FLG_IS_GNSTRMRG) {
		/*
		 * This section was generated because we have 1 or
		 * more SHF_MERGE|SHF_STRINGS input sections that we
		 * wish to merge. This new section will ultimately
		 * end up replacing those sections once it has been filled
		 * with their strings (merged and compressed) and relocations
		 * have been redirected.
		 */
		dbg_print(lml, MSG_INTL(MSG_SEC_INPUT_GENSTR), isp->is_name);
	} else if (isp->is_file == NULL) {
		/* Generated input section */
		dbg_print(lml, MSG_INTL(MSG_SEC_INPUT_GEN), isp->is_name);
	} else {
		/* Standard input section */
		dbg_isec_name_buf_t	buf;
		char			*alloc_mem;

		dbg_print(lml, MSG_INTL(MSG_SEC_INPUT),
		    dbg_fmt_isec_name(isp, buf, &alloc_mem),
		    isp->is_file->ifl_name);
		if (alloc_mem != NULL)
			free(alloc_mem);
	}
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:31,代码来源:sections.c

示例7: cap_set

/*
 * Common processing for capabilities value setting.
 *
 * entry:
 *	argstate - Argument state block
 *	cap - capabilities data pointer
 *	ndx - capabilities data index
 *	cap_ndx - capabilities section index
 *	cap_name - capabilities section name
 *	cap_tag - capabilities tag
 *	const_type - data conversion type
 */
static elfedit_cmdret_t
cap_set(ARGSTATE *argstate, Cap *cap, Word ndx, Word cap_ndx,
    const char *cap_name, Xword cap_tag, elfedit_const_t const_type)
{
	Conv_cap_val_buf_t	buf1, buf2;
	Half			mach = argstate->obj_state->os_ehdr->e_machine;
	Xword			ncap, ocap;

	ncap = flag_bitop(argstate, cap[ndx].c_un.c_val,
	    elfedit_const_to_atoui(const_type));

	/* Set the value */
	if ((ocap = cap[ndx].c_un.c_val) == ncap) {
		elfedit_msg(ELFEDIT_MSG_DEBUG, MSG_INTL(MSG_DEBUG_BSB_OK),
		    cap_ndx, cap_name, EC_WORD(ndx),
		    conv_cap_val(cap_tag, ocap, mach, CONV_FMT_NOBKT, &buf1));

		return (ELFEDIT_CMDRET_NONE);
	} else {
		elfedit_msg(ELFEDIT_MSG_DEBUG, MSG_INTL(MSG_DEBUG_BSB_CHG),
		    cap_ndx, cap_name, EC_WORD(ndx),
		    conv_cap_val(cap_tag, ocap, mach, CONV_FMT_NOBKT, &buf1),
		    conv_cap_val(cap_tag, ncap, mach, CONV_FMT_NOBKT, &buf2));

		cap[ndx].c_un.c_val = ncap;
		return (ELFEDIT_CMDRET_MOD);
	}
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:40,代码来源:cap.c

示例8: match_prepare

/*
 * Called after getopt() processing is finished if there is a non-empty
 * match list. Prepares the matching code for use.
 *
 * exit:
 *	Returns True (1) if no errors are encountered. Writes an
 *	error string to stderr and returns False (0) otherwise.
 */
static int
match_prepare(char *argv0, uint_t flags)
{
	match_rec_t	*list;
	const char	*str;
	int		minus_p = (flags & FLG_SHOW_PHDR) != 0;
	atoui_type_t	atoui_type;

	/*
	 * Flag ambiguous attempt to use match option with both -p and
	 * and one or more section SHOW options. In this case, we
	 * can't tell what type of item we're supposed to match against.
	 */
	if (minus_p && (flags & FLG_MASK_SHOW_SHDR)) {
		(void) fprintf(stderr, MSG_INTL(MSG_ERR_AMBIG_MATCH),
		    basename(argv0));
		return (0);
	}

	/* Set the match type, based on the presence of the -p option */
	if (minus_p) {
		match_state.item_type = MATCH_ITEM_PT;
		atoui_type = ATOUI_PT;
	} else {
		match_state.item_type = MATCH_ITEM_SHT;
		atoui_type = ATOUI_SHT;
	}

	/*
	 * Scan match list and perform any necessary fixups:
	 *
	 * MATCH_OPT_NAME: If -p is specified, convert MATCH_OPT_NAME (-N)
	 *	requests into MATCH_OPT_TYPE (-T).
	 *
	 * MATCH_OPT_TYPE: Now that we know item type we are matching
	 *	against, we can convert the string saved in the name
	 *	field during getopt() processing into an integer and
	 *	write it into the type field.
	 */
	for (list = match_state.list; list; list = list->next) {
		if ((list->opt_type == MATCH_OPT_NAME) && minus_p)
			list->opt_type = MATCH_OPT_TYPE;

		if (list->opt_type != MATCH_OPT_TYPE)
			continue;

		str = list->value.name;
		if (atoui(str, atoui_type, &list->value.type) == 0) {
			const char *fmt = minus_p ?
			    MSG_INTL(MSG_ERR_BAD_T_PT) :
			    MSG_INTL(MSG_ERR_BAD_T_SHT);

			(void) fprintf(stderr, fmt, basename(argv0), str);
			return (0);
		}
	}

	return (1);
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:67,代码来源:main.c

示例9: Dbg_sec_created

void
Dbg_sec_created(Lm_list *lml, Os_desc *osp, Sg_desc *sgp)
{
	if (DBG_NOTCLASS(DBG_C_SECTIONS))
		return;

	dbg_print(lml, MSG_INTL(MSG_SEC_CREATED), osp->os_name,
	    (sgp->sg_name ? sgp->sg_name : MSG_INTL(MSG_STR_NULL)));
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:9,代码来源:sections.c

示例10: ld_ar_setup

/*
 * Create an archive descriptor.  By maintaining a list of archives any
 * duplicate occurrences of the same archive specified by the user enable us to
 * pick off where the last processing finished.
 */
Ar_desc *
ld_ar_setup(const char *name, Elf *elf, Ofl_desc *ofl)
{
	Ar_desc *	adp;
	size_t		number;
	Elf_Arsym *	start;

	/*
	 * Unless, -z allextract is specified, get the archive symbol table
	 * if one exists, and ignore the file with a warning message otherwise.
	 */
	if (ofl->ofl_flags1 & FLG_OF1_ALLEXRT) {
		start = NULL;
	} else  if ((start = elf_getarsym(elf, &number)) == NULL) {
		if (elf_errno())
			ld_eprintf(ofl, ERR_ELF, MSG_INTL(MSG_ELF_GETARSYM),
			    name);
		else
			ld_eprintf(ofl, ERR_WARNING, MSG_INTL(MSG_ELF_ARSYM),
			    name);
		return (0);
	}

	/*
	 * As this is a new archive reference establish a new descriptor.
	 */
	if ((adp = libld_malloc(sizeof (Ar_desc))) == NULL)
		return ((Ar_desc *)S_ERROR);
	adp->ad_name = name;
	adp->ad_elf = elf;
	adp->ad_start = start;
	if (start) {
		adp->ad_aux = libld_calloc(sizeof (Ar_aux), number);
		if (adp->ad_aux == NULL)
			return ((Ar_desc *)S_ERROR);
	} else {
		adp->ad_aux = NULL;
	}

	/*
	 * Retain any command line options that are applicable to archive
	 * extraction in case we have to rescan this archive later.
	 */
	adp->ad_flags = ofl->ofl_flags1 & MSK_OF1_ARCHIVE;

	ofl->ofl_arscnt++;

	/*
	 * Add this new descriptor to the list of archives.
	 */
	if (aplist_append(&ofl->ofl_ars, adp, AL_CNT_OFL_LIBS) == NULL)
		return ((Ar_desc *)S_ERROR);
	else
		return (adp);
}
开发者ID:metricinc,项目名称:illumos-gate,代码行数:60,代码来源:libs.c

示例11: Dbg_move_outmove

void
Dbg_move_outmove(Lm_list *lml, const char *name)
{
	if (DBG_NOTCLASS(DBG_C_MOVE))
		return;
	if (DBG_NOTDETAIL())
		return;

	Dbg_util_nl(lml, DBG_NL_STD);
	dbg_print(lml, MSG_INTL(MSG_MOVE_OUTMOVE), name);
	dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1));
}
开发者ID:andreiw,项目名称:polaris,代码行数:12,代码来源:move.c

示例12: Dbg_move_parexpn

void
Dbg_move_parexpn(Lm_list *lml, const char *name, const char *reason)
{
	if (DBG_NOTCLASS(DBG_C_MOVE))
		return;
	if (DBG_NOTDETAIL())
		return;

	Dbg_util_nl(lml, DBG_NL_STD);
	dbg_print(lml, MSG_INTL(MSG_MOVE_PAREXPN), name, reason);
	dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1));
}
开发者ID:andreiw,项目名称:polaris,代码行数:12,代码来源:move.c

示例13: Dbg_unused_file

void
Dbg_unused_file(Lm_list *lml, const char *name, int needstr, uint_t cycle)
{
	if (DBG_NOTCLASS(DBG_C_UNUSED))
		return;

	if (needstr)
		dbg_print(lml, MSG_INTL(MSG_USD_NEEDSTR), name);
	else if (cycle)
		dbg_print(lml, MSG_INTL(MSG_USD_FILECYCLIC), name, cycle);
	else
		dbg_print(lml, MSG_INTL(MSG_USD_FILE), name);
}
开发者ID:andreiw,项目名称:polaris,代码行数:13,代码来源:unused.c

示例14: Dbg_move_data

void
Dbg_move_data(Rt_map *lmp)
{
	Lm_list	*lml = LIST(lmp);

	if (DBG_NOTCLASS(DBG_C_MOVE))
		return;
	if (DBG_NOTDETAIL())
		return;

	dbg_print(lml, MSG_INTL(MSG_MOVE_FILE), NAME(lmp));
	dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE2));
}
开发者ID:andreiw,项目名称:polaris,代码行数:13,代码来源:move.c

示例15: elfedit_array_elts_delete

/*
 * "delete" items in an array by copying the following items up
 * over the "deleted" items and then zero filling the vacated
 * slots at the bottom.
 *
 * entry:
 *	name_str - Array identification prefix to use for debug message
 *	data_start - Address of 1st byte in array
 *	entsize - sizeof a single element of the array
 *	num_ent - # of elements in array
 *	start_ndx - Index of first item to be deleted
 *	cnt - # of items to delete
 *
 * exit:
 *	Any errors are issued and control does not return to the
 *	caller. On success, the items have been removed, zero filling
 *	has been done, and debug messages issued.
 */
void
elfedit_array_elts_delete(const char *name_str, void *data_start,
    size_t entsize, size_t num_ent, size_t start_ndx, size_t cnt)
{
	char	*data = data_start;

	/* The specified index and range must be in bounds */
	if ((start_ndx + cnt) > num_ent)
		elfedit_msg(ELFEDIT_MSG_ERR, MSG_INTL(MSG_ERR_ARRBNDS),
		    name_str, EC_WORD(num_ent), EC_WORD(num_ent - 1));

	/*
	 * Everything below the deleted items moves up.
	 * Note that bcopy() is documented to handle overlapping
	 * src/dst correctly, so we make no effort to handle this
	 * element by element, but issue a single operation.
	 *
	 * If we're doing the last element, there is nothing to
	 * move up, and we skip this step, moving on to the zeroing below.
	 */
	if (start_ndx < (num_ent - 1)) {
		size_t ncpy = num_ent - (start_ndx + cnt);

		bcopy(data + ((start_ndx + cnt) * entsize),
		    data + (start_ndx * entsize), ncpy * entsize);
		if (ncpy == 1) {
			elfedit_msg(ELFEDIT_MSG_DEBUG,
			    MSG_INTL(MSG_DEBUG_ARRCPY_1), name_str,
			    EC_WORD(start_ndx + cnt), EC_WORD(start_ndx));
		} else {
			elfedit_msg(ELFEDIT_MSG_DEBUG,
			    MSG_INTL(MSG_DEBUG_ARRCPY_N), name_str,
			    EC_WORD(start_ndx + cnt),
			    EC_WORD(start_ndx + cnt + ncpy - 1),
			    EC_WORD(start_ndx),
			    EC_WORD(start_ndx + ncpy - 1));
		}
	}

	/* Zero out the vacated elements at the end */
	bzero(data + ((num_ent - cnt) * entsize), entsize * cnt);

	if (cnt == 1) {
		elfedit_msg(ELFEDIT_MSG_DEBUG, MSG_INTL(MSG_DEBUG_ARRZERO_1),
		    name_str, EC_WORD(num_ent - 1));
	} else {
		elfedit_msg(ELFEDIT_MSG_DEBUG, MSG_INTL(MSG_DEBUG_ARRZERO_N),
		    name_str, EC_WORD(num_ent - cnt),
		    EC_WORD(num_ent - 1), EC_WORD(cnt));
	}
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:69,代码来源:util.c


注:本文中的MSG_INTL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。