API Guide
601355 Rev A API Functions 2-145
Functions
48 for ( i = 0 ; i < numcrit ; i++ )
49 {
50 /* create the criteria for a media
stat field */
51 criteriah = VS_Criteria_Create();
52
53 if ( criteriah ==
(VST_CRITERIA_HANDLE) NULL )
54 {
55 /* could not allocate handle */
56 rc = VSE_FALSE;
57 break;
58 }
59
60 printf ( “Enter the media’s field
number ==> “ );
61 field = atoi(gets(input));
62
63 printf ( “Enter the sort order
(Ascending - 1, Descending - 2)
==> “ );
64 sort = atoi(gets(input));
65
66 /* set the criteria parameters */
67 VS_Criteria_SetFields (
criteriah,
68 VSID_FIELD, field,
69
VSID_MOUNT_CRITERIA_ORDER, sort,
70 VSID_ENDFIELD );
71 /* populate the critera with
expressions */
72 /* (upto 4) */
73 printf ( “Enter the number of
criteria expressions ==> “ );
74 numexpr = atoi(gets(input));
75
76 for ( j = 0 ; j < numexpr ; j++ )
77 {
78 /* create an expression for
this criteria */