/****************************************************************************** Copyright (c) 1999 Unigraphics Solutions, Inc. Unpublished - All Rights Reserved *******************************************************************************/ #include #include #include #include #include #include #define UF_CALL(X) (report( __FILE__, __LINE__, #X, (X))) 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) { int i,j, num_exps; tag_t *oexps; tag_t part; int num_feats; tag_t *feats; char *string; char *feat_type; char *feat_name; /* Test UF_MODL_ask_features_of_exp */ part = UF_ASSEM_ask_work_part(); UF_CALL(UF_MODL_ask_exps_of_part(part, &num_exps, &oexps)); printf ("Total number of expressions in part = %d\n", num_exps); for (i=0; i 0) UF_free(feats); UF_terminate(); } else { printf ("Number of times expression %s is used = %d\n", string, num_feats); printf ("The following features are affected:\n"); for (j=0; j 0) UF_free(feats); } UF_free(oexps); } /*ARGSUSED*/ 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); }