42 lines
463 B
C
42 lines
463 B
C
#include <stdio.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <unistd.h>
|
|
#include <time.h>
|
|
#include <strings.h>
|
|
|
|
#include "lint.h"
|
|
|
|
struct bsttab {
|
|
time_t tm;
|
|
int bst;
|
|
};
|
|
|
|
#include "bst.h"
|
|
|
|
int
|
|
is_bst(time_t tm)
|
|
{
|
|
int i, is_bst;
|
|
|
|
is_bst = 0;
|
|
for (i = 0; bst[i].tm; i++)
|
|
{
|
|
if (bst[i].tm > tm)
|
|
break;
|
|
is_bst = bst[i].bst;
|
|
}
|
|
|
|
return is_bst;
|
|
}
|
|
|
|
void
|
|
bstise(time_t *tm)
|
|
{
|
|
if (is_bst(*tm))
|
|
*tm += 3600;
|
|
}
|
|
|