Mapper
libraries
shef
shcal.c
Go to the documentation of this file.
1
/*Translated by FOR_C, v3.4.2 (-), on 06/07/94 at 16:59:29 */
2
/*FOR_C Options SET: c=2 com=u do=r4 ftn=2ln6k op=iv s=dvn str=l sq=i */
3
4
#define _POSIX_SOURCE
5
#include <stdio.h>
6
#include <stdlib.h>
7
#include <ctype.h>
8
#include <dirent.h>
9
#include <unistd.h>
10
#include <math.h>
11
#include <string.h>
12
#include <fcntl.h>
13
#include <sys/stat.h>
14
#include "
shef_structs_external.h
"
15
16
/*---------------------------------------------------------------------
17
18
NAME
19
SUBROUTINE SHCAL(IORD,LEAP,LMON,LDAY)
20
21
PURPOSE
22
Calculate the calender month and day given the ordinal
23
day in IORD. LEAP is 1 is a leap year, 0 otherwise.
24
25
VERSION and UPDATES
26
1.0 JUL 82 Geoffrey M. Bonnin
27
Original Version
28
1.1 FEB 84
29
Tableless date conversion
30
2.0 MAY 94 David G. Brandon
31
Also Translated to 'C' using FOR_C
32
33
--------------------------------------------------------------------- */
34
35
void
shcal
(iord,
leap
, lmon, lday)
36
short
int
*iord, *
leap
, *lmon, *lday;
37
{
38
static
short
int
ia
;
39
40
ia
= *iord + ((305 + *iord - *
leap
)/365)*(2 - *
leap
);
41
*lmon = ((
ia
+ 91)*20)/611 - 2;
42
*lday =
ia
+ 30 - 30**lmon - (56**lmon)/100;
43
44
return
;
45
46
}
47
shcal
void shcal(short int *iord, short int *leap, short int *lmon, short int *lday)
Definition:
shcal.c:35
shef_structs_external.h
leap
void * leap
Definition:
shleap.cc:39
ia
ia
Definition:
shleap.cc:45
Generated by
1.9.1