| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflslot.h" int day_slot_set (byte *range, int min_from, int min_to)
Sets the slots for the specified minute range. If min_to is zero, it is ignored; only the slot for min_from is set. Returns 0 if okay, -1 if the specified range is invalid.
{ if (min_to == 0) min_to = min_from; /* Range is just one minute */ if (min_from > min_to) return (-1); /* Bad range */ while (min_from <= min_to) /* Find and set each bit */ { ASSERT (min_from >= 0 && min_from < MAX_MIN); range [BYTE (min_from)] |= BIT (min_from); min_from++; } return (0); /* No errors */ }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |