Logo Search packages:      
Sourcecode: libical version File versions  Download package

static int icalrecur_two_byrule ( icalrecur_iterator impl,
enum byrule  one,
enum byrule  two 
) [static]

Check that the rule has only the two given interday byrule parts.

Definition at line 653 of file icalrecur.c.

Referenced by icalrecur_iterator_new().

{
    short test_array[9];
    enum byrule itr;
    int passes = 0;

    memset(test_array,0,sizeof(test_array));

    test_array[one] = 1;
    test_array[two] = 1;

    for(itr = BY_DAY; itr != BY_SET_POS; itr++){

      if( (test_array[itr] == 0  &&
           impl->by_ptrs[itr][0] != ICAL_RECURRENCE_ARRAY_MAX
          ) ||
          (test_array[itr] == 1  &&
           impl->by_ptrs[itr][0] == ICAL_RECURRENCE_ARRAY_MAX
            ) 
          ) {
          /* test failed */
          passes = 0;
      }
    }

    return passes;

} 


Generated by  Doxygen 1.6.0   Back to index