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


C++ INTCAST函数代码示例

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


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

示例1: zro_gettok

int zro_gettok (char **lp, char *top, mstr *tok)
{
	int	toktyp;

	if (*lp >= top)
		toktyp = ZRO_EOL;
	else
		switch (**lp)
		{
			case ZRO_DEL:

				toktyp = ZRO_DEL;
				while (*lp < top && **lp == ZRO_DEL)
					(*lp)++;
				break;
			case ZRO_LBR:
				toktyp = ZRO_LBR;
				(*lp)++;
				break;
			case ZRO_RBR:
				toktyp = ZRO_RBR;
				(*lp)++;
				break;
			default:
				tok->addr = *lp;
				while (*lp < top && **lp != ZRO_DEL && **lp != ZRO_LBR && **lp != ZRO_RBR)
					(*lp)++;
				toktyp = ZRO_IDN;
				tok->len = INTCAST(*lp - tok->addr);
				break;
		}
	return toktyp;
}
开发者ID:ChristopherEdwards,项目名称:fis-gtm,代码行数:33,代码来源:zro_gettok.c

示例2: murgetlst

void murgetlst(void)
{
	char		*c1, *c2, buff[MAX_LINE];
	unsigned short	len;
	inc_list_struct	*ptr;
	error_def(ERR_MUNODBNAME);

	len = SIZEOF(buff);
	if (!cli_get_str(name,buff,&len))
		mupip_exit(ERR_MUNODBNAME);

	ptr = &in_files;
	for (c1 = c2 = buff; ; )
	{	for ( ; *c2 && (*c2 != ',') ; c2++)
			;
		ptr->next = (inc_list_struct*)malloc(SIZEOF(inc_list_struct));
		ptr = ptr->next;
		ptr->next = 0;
		ptr->input_file.len = INTCAST(c2 - c1);
		ptr->input_file.addr = (char *)malloc(c2 - c1 + 1);
		memcpy(ptr->input_file.addr, c1, c2 - c1);
		*(char*)(ptr->input_file.addr + (c2 - c1)) = '\0';
		if (!*c2)
			break;
		else
			c1 = ++c2;
	}
	return;
}
开发者ID:CeperaCPP,项目名称:fis-gtm,代码行数:29,代码来源:murgetlst.c

示例3: mubexpfilnam

void mubexpfilnam(char *dirname, unsigned int dirlen, backup_reg_list *list)
{
	char	*c1;
	mstr	file;
	char	tmp_mstr_addr[MAX_FN_LEN];


	file.len = MAX_FN_LEN;
	file.addr = tmp_mstr_addr;
	if (list != mu_repl_inst_reg_list)
	{	/* Database region */
		if (!mupfndfil(list->reg, &file, LOG_ERROR_TRUE))
		{
			util_out_print("Backup not finished because of the above error.", TRUE);
			error_mupip = TRUE;
			return;
		}
	} else
	{	/* Replication instance region */
		if (!repl_inst_get_name(file.addr, (unsigned int *)&file.len, MAX_FN_LEN, issue_rts_error))
			assertpro(FALSE);	/* rts_error should have been issued by repl_inst_get_name */
	}
	for (c1 = file.addr + file.len; (*c1 != '/') && (c1 != file.addr); c1--)
		;
	list->backup_file.len = INTCAST(dirlen + (file.len - (c1 - file.addr)));
	list->backup_file.addr = (char *)malloc(list->backup_file.len + 1);
	memcpy(list->backup_file.addr, dirname, dirlen);
	memcpy(list->backup_file.addr + dirlen, c1, (file.len - (c1 - file.addr)));
	list->backup_file.addr[list->backup_file.len] = '\0';
	return;
}
开发者ID:shabiel,项目名称:YottaDB,代码行数:31,代码来源:mubexpfilnam.c

示例4: iomb_read

int iomb_read(mval *v,int4 t)
{
	io_desc 	*io_ptr;
	d_mb_struct	*mb_ptr;
	int 		status;


	assert(stringpool.free >= stringpool.base);
	assert(stringpool.free <= stringpool.top);
	io_ptr = io_curr_device.in;
	mb_ptr = (d_mb_struct *) io_ptr->dev_sp;
	if (stringpool.free + mb_ptr->maxmsg > stringpool.top)
		stp_gcol (mb_ptr->maxmsg);
	v->str.addr = (char *)stringpool.free;
	status = TRUE;
	assert (io_ptr->state == dev_open);
	if (mb_ptr->in_top == mb_ptr->in_pos)
		status = iomb_dataread(t);

	memcpy(v->str.addr,mb_ptr->in_pos,(v->str.len = INTCAST(mb_ptr->in_top - mb_ptr->in_pos)));
	mb_ptr->in_pos = mb_ptr->in_top = mb_ptr->inbuf;
	io_ptr->dollar.x = 0;
	io_ptr->dollar.y++;
	return status;
}
开发者ID:5HT,项目名称:mumps,代码行数:25,代码来源:iomb_read.c

示例5: list_head

void list_head(bool newpage)
{
	short col_2 = 70;
	static readonly unsigned char page_lit[] = "page ";
	unsigned char page_no_buf[10];
	mval head;

	if (newpage)
		op_wtff();

	head.mvtype = MV_STR;
	head.str.addr = (char *)&gtm_release_name[0];
	head.str.len = gtm_release_name_len;
	op_write (&head);

	head.str.addr = (char *)&gtm_copy_right[0];
	head.str.len = sizeof(gtm_copy_right) - 1;
	op_write (&head);

	op_wttab(col_2);
	head.str.addr = print_time_buf;
	head.str.len = 20;
	op_write(&head);

	op_wttab(100);
	lst_param.page++;
	head.str.addr = (char *)page_lit;
	head.str.len = sizeof(page_lit) - 1;
	op_write(&head);

	head.str.addr = (char *)page_no_buf;
	head.str.len = INTCAST(i2asc(page_no_buf, lst_param.page) - page_no_buf);
	op_write(&head);
	op_wteol(1);

	head.str.addr = source_file_name;
	head.str.len = source_name_len;
	op_write(&head);
	if (source_name_len >= col_2)
		op_wteol(1);
	op_wttab(col_2);
	head.str.addr = rev_time_buf;
	head.str.len = 20;
	op_write(&head);
	op_wteol(3);
}
开发者ID:5HT,项目名称:mumps,代码行数:46,代码来源:list_file.c

示例6: ecode_get

void ecode_get(int level, mval *val)
{
	mstr	tmpmstr;

	val->mvtype = MV_STR;
	assert(-1 == level);	/* currently -1 is the only valid negative level argument to ecode_get() */
	if (dollar_ecode.index)
	{
		assert(dollar_ecode.end > dollar_ecode.begin);
		val->str.addr = dollar_ecode.begin;
		val->str.len = INTCAST(dollar_ecode.end - dollar_ecode.begin + 1);	/* to account for terminating ',' */
		s2pool(&val->str);
	} else
	{
		assert(dollar_ecode.end == dollar_ecode.begin);
		val->str.len = 0;
	}
}
开发者ID:5HT,项目名称:mumps,代码行数:18,代码来源:ecode_get.c

示例7: lvtree_newblock

void	lvtree_newblock(symval *sym, int numElems)
{
	register lv_blk	*ptr;
	register int	n;
	lvTree		*lvt_base;

	n = numElems * SIZEOF(lvTree) + SIZEOF(lv_blk);
	n = INTCAST(gtm_bestfitsize(n));
	/* Maximize use of storage block we are going to get */
	assert(DIVIDE_ROUND_DOWN(n - SIZEOF(lv_blk), SIZEOF(lvTree)) >= numElems);
	numElems = DIVIDE_ROUND_DOWN(n - SIZEOF(lv_blk), SIZEOF(lvTree));
	ptr = (lv_blk *)malloc(n);
	lvt_base = (lvTree *)LV_BLK_GET_BASE(ptr);
	ptr->next = sym->lvtree_first_block;
	sym->lvtree_first_block = ptr;
	ptr->numAlloc = numElems;
	ptr->numUsed = 0;
	DBGRFCT((stderr, "lvtree_newblock: New lv_blk allocated ******************\n"));
}
开发者ID:ChristopherEdwards,项目名称:fis-gtm,代码行数:19,代码来源:lv_newblock.c

示例8: lref_parse

/* parse an entry reference string into routine, label & offset */
void lref_parse(unsigned char *label_ref, mstr* routine, mstr* label, int* offset)
{
	unsigned char 	ch, *c, *c1;
	int 		i, label_len;
	error_def	(ERR_RUNPARAMERR);

	routine->addr = label->addr = (char *)label_ref;
	*offset = 0;
	label_len = STRLEN((const char *)label_ref);
	for (i = 0, c = label_ref;  i < label_len;  i++)
	{
		ch = *c++;
		if (ch == '^'  ||  ch == '+')
		{
			label->len = i;

			if (ch == '+')
			{
				*offset = (int)STRTOL((const char *)c, (char**)&c1, 10);
				if (c == c1 ||*c1 != '^')
					rts_error(VARLSTCNT(1) ERR_RUNPARAMERR);
				c = c1 + 1;
			}
			routine->addr = (char *)c;
			routine->len = INTCAST(label_ref + label_len - c);
			break;
		}
	}
	if (routine->addr == (char *)label_ref)
	{
		routine->len = label_len;
		routine->addr = (char *)label_ref;
		label->len = 0;
	}
	if (!is_ident(routine))
		rts_error(VARLSTCNT(1) ERR_RUNPARAMERR);
	if (label->len && !is_ident(label))
		rts_error(VARLSTCNT(1) ERR_RUNPARAMERR);

	routine->len = routine->len > MAX_MIDENT_LEN ? MAX_MIDENT_LEN : routine->len;
	label->len = label->len > MAX_MIDENT_LEN ? MAX_MIDENT_LEN : label->len;
}
开发者ID:CeperaCPP,项目名称:fis-gtm,代码行数:43,代码来源:lref_parse.c

示例9: i2smval

void i2smval(mval *v, uint4 i)
{
	char	*c;
	int	exp;
	int4	n;

	v->mvtype = MV_NM | MV_STR;
	v->m[1] = n = i;
	v->sgn = 0;
	c = v->str.addr;
	exp = 100000000;
	while (exp && !(n = i / exp))
		exp /= 10;
	if (!exp)
		*c++ = 0;
	else for (;;)
	{
		*c++ = n + '0';
		i -= n * exp;
		exp /= 10;
		if (!exp)
			break;
		n = i / exp;
	}
	if (v->m[1] < INT_HI)
	{
		v->mvtype |= MV_INT;
		v->m[1] = MV_BIAS * i;
	} else if (v->m[1] < MANT_HI)
	{
		v->m[1] *= ten_pwr[NUM_DEC_DG_1L - exp];
		v->m[0] = 0;
	} else
	{
		v->m[0] = (v->m[1] % 10) * MANT_LO;
		v->m[1] /= 10;
	}
	v->str.len = INTCAST(c - v->str.addr);
	v->e = v->str.len + MV_XBIAS;
	assert(v->m[1] < MANT_HI);
}
开发者ID:ChristopherEdwards,项目名称:fis-gtm,代码行数:41,代码来源:mvalconv.c

示例10: get_reference

void get_reference(mval *var)
{
	char	*end, *start;
	char	extnamdelim[] = "^|\"\"|";
	char	*extnamsrc, *extnamtop;
	int	maxlen;

	/* you need to return a double-quote for every single-quote. assume worst case. */
	maxlen = MAX_ZWR_KEY_SZ + (!extnam_str.len ? 0 : ((extnam_str.len * 2) + SIZEOF(extnamdelim)));
	ENSURE_STP_FREE_SPACE(maxlen);
	var->mvtype = MV_STR;
	start = var->str.addr = (char *)stringpool.free;
	var->str.len = 0;
	if (gv_currkey && gv_currkey->end)
	{
		if (extnam_str.len)
		{
			*start++ = extnamdelim[0];
			*start++ = extnamdelim[1];
			*start++ = extnamdelim[2];
			extnamsrc = &extnam_str.addr[0];
			extnamtop = extnamsrc + extnam_str.len;
			for ( ; extnamsrc < extnamtop; )
			{
				*start++ = *extnamsrc;
				if ('"' == *extnamsrc++)	/* caution : pointer increment side-effect */
					*start++ = '"';
			}
			*start++ = extnamdelim[3];
		}
		end = (char *)format_targ_key((unsigned char *)start, MAX_ZWR_KEY_SZ, gv_currkey, TRUE);
		if (extnam_str.len)
			/* Note: the next vertical bar overwrites the caret that
			 * was part of he original name of the global variable
			 */
			*start = extnamdelim[4];
		var->str.len = INTCAST(end - var->str.addr);
		stringpool.free += var->str.len;
	}
}
开发者ID:CeperaCPP,项目名称:fis-gtm,代码行数:40,代码来源:get_reference.c

示例11: __dsymm__

void __dsymm__(char* Side, char* Uplo, const int* M, const int* N, const double* alpha, const double* A, const int* lda, 
               const double* B, const int* ldb, const double* beta, double* C, const int* ldc) {
    EigenFunc_dsymm(Side, Uplo, INTCAST(M), INTCAST(N), DOUBLECAST(alpha), DOUBLECAST(A), INTCAST(lda), 
                    DOUBLECAST(B), INTCAST(ldb), DOUBLECAST(beta), DOUBLECAST(C), INTCAST(ldc));
}
开发者ID:Acorld,项目名称:WinObjC-Heading,代码行数:5,代码来源:blasDouble.cpp

示例12: __dgemm__

void __dgemm__(char* TransA, char* TransB, const int* M, const int* N, const int* K, const double* alpha, const double* A, 
               const int* lda, const double* B, const int* ldb, const double* beta, double* C, const int* ldc) {
    EigenFunc_dgemm(TransA, TransB, INTCAST(M), INTCAST(N), INTCAST(K), DOUBLECAST(alpha), DOUBLECAST(A), 
                    INTCAST(lda), DOUBLECAST(B), INTCAST(ldb), DOUBLECAST(beta), DOUBLECAST(C), INTCAST(ldc));
}
开发者ID:Acorld,项目名称:WinObjC-Heading,代码行数:5,代码来源:blasDouble.cpp

示例13: __dgemv__

void __dgemv__(char* TransA, const int* M, const int* N, const double* alpha, const double* A, const int* lda, const double* X,
               const int* incX, const double* beta, double* Y, const int* incY) {
    EigenFunc_dgemv(TransA, INTCAST(M), INTCAST(N), DOUBLECAST(alpha), DOUBLECAST(A), INTCAST(lda), DOUBLECAST(X),
                    INTCAST(incX), DOUBLECAST(beta), DOUBLECAST(Y), INTCAST(incY));
}
开发者ID:Acorld,项目名称:WinObjC-Heading,代码行数:5,代码来源:blasDouble.cpp

示例14: __drot__

void __drot__(const int* N, double* X, const int* incX, double* Y, const int* incY, const double* c, const double* s) {
    EigenFunc_drot(INTCAST(N), DOUBLECAST(X), INTCAST(incX), DOUBLECAST(Y), INTCAST(incY), DOUBLECAST(c), DOUBLECAST(s));
}
开发者ID:Acorld,项目名称:WinObjC-Heading,代码行数:3,代码来源:blasDouble.cpp

示例15: __dswap__

void __dswap__(const int* N, double* X, const int* incX, double* Y, const int* incY) {
    EigenFunc_dswap(INTCAST(N), DOUBLECAST(X), INTCAST(incX), DOUBLECAST(Y), INTCAST(incY));
}
开发者ID:Acorld,项目名称:WinObjC-Heading,代码行数:3,代码来源:blasDouble.cpp


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