马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
关于模型中对象访问的问题,用printf打印后怎么找不到在哪里啊????
请各位大虾棒棒忙.下面是我的程序:
static int report( char *file, int line, char *call, int irc)
{
if (irc)
{
char messg[133];
printf("%s, line %d: %s\n", file, line, call);
(UF_get_fail_message(irc, messg)) ?
printf(" returned a %d\n", irc) :
printf(" returned error %d: %s\n", irc, messg);
}
return(irc);
}
static void do_ugopen_api(void)
{
char part_fspec[MAX_FSPEC_SIZE+1], title0[MAX_FSPEC_SIZE+1];
int curr_part,num_parts;
int type;
int count_1;
tag_t part;
tag_t feature;
/*acquire the current number of the chat's part*/
num_parts=UF_PART_ask_num_parts();
for(curr_part=0;curr_part<num_parts;curr_part++);
{
part=UF_PART_ask_nth_part(curr_part);
UF_PART_ask_part_name(part,part_fspec);
printf(title0,part_fspec);
count_1=0;
type=UF_feature_type;
feature=NULL_TAG;
/* BEGIN TO CYCLE.THE START POINT IS NULL_TAG*/
UF_OBJ_cycle_objs_in_part(part,type,[$feature)]
//the end point is NULL_TAG
while (feature!=NULL_TAG)
{
count_1++;
UF_OBJ_cycle_objs_in_part(part,type,[$feature)]
}
printf("UF_OBJ_cycle_objs_in_part shows %d features\n",count_1);
}
}
void ufusr(char *param, int *retcode, int param_len)
{
if (!UF_CALL(UF_initialize()))
{
do_ugopen_api();
UF_CALL(UF_terminate());
}
}
int ufusr_ask_unload(void)
{
return (UF_UNLOAD_IMMEDIATELY);
} |