.\" pragma ident "@(#)KcsOptimizeProfile.3 1.3 04/21/95" .TH KcsOptimizeProfile 3 "21 April 1995" "" "KCMS Library" .SH NAME KcsOptimizeProfile \- Optimize a profile .SH SYNOPSIS .ft B .nf #include #include .sp KcsStatusId KcsOptimizeProfile( KcsProfileId profile, KcsOptimizationType optimizationType, KcsLoadHints operationLoadSet) .fi .ft R .SH MT-LEVEL MT-Unsafe .SH DESCRIPTION Use .B KcsOptimizeProfile() to optimize the profile for any condition or combination of conditions below: .br .in +3 Reduce the profile's size. .br Make the profile run faster. .br Make the profile more accurate. .in -3 .PP The optimization performed is CMM-dependent. The CMM always interprets the load hints in terms of the particular situation. .SH ARGUMENTS .TP .SB profile The identifier of the profile. .TP .SB optimizationType The kinds of optimization (size, speed, and accuracy) you want to perform on the profile. When a combination of values is specified, it is left up to the CMM to determine which value is more important. .TP .SB operationLoadSet One or more flags symbolizing the kind of information wanted in profile. It also describes what/how/when/where to load/unload profile. .SH RETURN VALUES Upon successful completion KCS_SUCCESS is returned. Otherwise one of the following errors will be returned. .SH ERRORS .nf KCS_OPERATION_CANCELLED KCS_MEM_ALLOC_ERROR KCS_PROF_ID_BAD .fi .SH SEE ALSO .BR KcsConnectProfiles (3) .BR KcsLoadProfile (3) .BR KcsSaveProfile (3) .SH NOTE If you have limited a profile's load operation/state with .B KcsOptimizeProfile(), only that particular load operation/state is saved with KcsSaveProfile(3). Therefore, operations not included in the profile will not be available the next time the profile is loaded. .SH EXAMPLE .nf KcsProfileId monitorprofile, scannerprofile, completeProfile; KcsStatusId status; KcsErrDesc errDesc; /* the monitor profile and scanner profile have been loaded and connected * * to become a completeprofile, now optimize */ status = KcsOptimizeProfile(completeProfile, KcsOptSpeed, KcsLoadAllNow); if (status != KCS_SUCCESS) { status = KcsGetLastError(&errDesc); fprintf(stderr,"KcsOptimizeProfile failed error = %s\\n", errDesc.desc); KcsFreeProfile(monitorProfile); KcsFreeProfile(scannerProfile); return(-1); } .fi