mon_start_days1(2) -> month_start_days(_leap)

This commit is contained in:
xmm15 2020-02-19 15:10:37 -06:00
parent 130fb30910
commit 902f80e007
8 changed files with 13 additions and 23 deletions

Binary file not shown.

Binary file not shown.

View file

@ -1,10 +0,0 @@
$TR,"Zenith"$
$ID,2$$TR,"SysMessageFlags"$
$ID,2$sys_message_flags[0]=0;
$ID,-2$$TR,"SysRegVer"$
$ID,2$registry_version=0.100;
$ID,-2$$ID,-2$$TR,"Once"$
$ID,2$$TR,"Zenith"$
$ID,2$$ID,-2$$TR,"User"$
$ID,2$$ID,-2$$ID,-2$$TR,"AutoComplete"$
$ID,2$ac.col = TEXT_COLS-30;ac.row = 15;$ID,-2$

Binary file not shown.

View file

@ -1,8 +1,8 @@
//See $LK,"::/Doc/TimeDate.DD"$
U16 mon_start_days1[12]={
U16 month_start_days[12]={
0,31,59,90,120,151,181,212,243,273,304,334};
U16 mon_start_days2[12]={
U16 month_start_days_leap[12]={
0,31,60,91,121,152,182,213,244,274,305,335};
I64 YearStartDate(I64 year)
@ -18,9 +18,9 @@ CDate Struct2Date(CDateStruct *_ds)
i1=YearStartDate(_ds->year);
i2=YearStartDate(_ds->year+1);
if (i2-i1==365)
i1+=mon_start_days1[_ds->mon-1];
i1+=month_start_days[_ds->mon-1];
else
i1+=mon_start_days2[_ds->mon-1];
i1+=month_start_days_leap[_ds->mon-1];
cdt.date=i1+_ds->day_of_mon-1;
cdt.time=(_ds->sec10000+100*(_ds->sec100+100*(_ds->sec
+60*(_ds->min+60*_ds->hour))))<<21/(15*15*3*625);
@ -49,14 +49,14 @@ U0 Date2Struct(CDateStruct *_ds,CDate cdt)
date-=i;
if (YearStartDate(_ds->year+1)-i==365) {
k=0;
while (date>=mon_start_days1[k+1] && k<11)
while (date>=month_start_days[k+1] && k<11)
k++;
date-=mon_start_days1[k];
date-=month_start_days[k];
} else {
k=0;
while (date>=mon_start_days2[k+1] && k<11)
while (date>=month_start_days_leap[k+1] && k<11)
k++;
date-=mon_start_days2[k];
date-=month_start_days_leap[k];
}
_ds->mon=k+1;
_ds->day_of_mon=date+1;
@ -208,7 +208,7 @@ U0 TimeSet(CDateStruct *ds)
PUSHFD
CLI
while (LBts(&sys_semas[SEMA_SYS_DATE],0))
 PAUSE
PAUSE
while (CMOSRegRead(CMOSR_STATUS_A) & CMOSF_UPDATING)
PAUSE

View file

@ -705,6 +705,7 @@ $LK,"PCIR_SUBSYS_ID",A="FL:::/Kernel/KernelA.HH,2385"$
$LK,"MDG_DISP_SIB_RIP",A="FL:::/Kernel/KernelA.HH,1711"$
$LK,"DOCEt_BLINK",A="FL:::/Kernel/KernelA.HH,1067"$
$LK,"DOCET_BLINK",A="FL:::/Kernel/KernelA.HH,1061"$
$LK,"month_start_days_leap",A="FL:::/Kernel/KDate.CC,5"$
$LK,"mp_count_initial",A="FL:::/Kernel/KernelB.HH,222"$
$LK,"C:/Doc/MultiCore.DD",A="FL:::/Kernel/KernelB.HH,220"$
$LK,"JOBf_DONE",A="FL:::/Kernel/KernelA.HH,3314"$
@ -1448,6 +1449,7 @@ $LK,"FUF_IGNORE",A="FL:::/Kernel/KernelA.HH,2738"$
$LK,"FUf_IGNORE",A="FL:::/Kernel/KernelA.HH,2710"$
$LK,"AAT_SUB_U32",A="FL:::/Kernel/KernelA.HH,2096"$
$LK,"AAT_SUB_U16",A="FL:::/Kernel/KernelA.HH,2094"$
$LK,"month_start_days",A="FL:::/Kernel/KDate.CC,3"$
$LK,"UserCmdLine",A="FL:::/Kernel/KTask.CC,414",BI=299$
$LK,"GVF_FUN",A="FL:::/Kernel/KernelA.HH,980"$
$LK,"LAPICF_APIC_ENABLED",A="FL:::/Kernel/KernelA.HH,623"$
@ -2462,10 +2464,8 @@ $LK,"COLORS_NUM",A="FL:::/Kernel/KernelA.HH,3101"$
$LK,"IEF_GOTO_LABEL",A="FL:::/Kernel/KernelA.HH,2080"$
$LK,"CMT_GOTO_LABEL",A="FL:::/Kernel/KernelA.HH,1811"$
$LK,"DriveIsWritable",A="FL:::/Kernel/BlkDev/DiskDrive.CC,206",BI=517$
$LK,"mon_start_days1",A="FL:::/Kernel/KDate.CC,3"$
$LK,"BLKDEVS_NUM",A="FL:::/Kernel/KernelA.HH,2802"$
$LK,"HTF_GOTO_LABEL",A="FL:::/Kernel/KernelA.HH,820"$
$LK,"mon_start_days2",A="FL:::/Kernel/KDate.CC,5"$
$LK,"FONT_HEIGHT",A="FL:::/Kernel/KernelA.HH,3731"$
$LK,"HTf_GOTO_LABEL",A="FL:::/Kernel/KernelA.HH,790"$
$LK,"ATAR0_LCYL",A="FL:::/Kernel/KernelA.HH,2462"$

View file

@ -751,8 +751,8 @@ public extern I64 FirstDayOfYear(I64 i);
public extern I64 LastDayOfMon(I64 i);
public extern I64 LastDayOfYear(I64 i);
public extern I64 YearStartDate(I64 year);
public extern U16 mon_start_days1[12];
public extern U16 mon_start_days2[12];
public extern U16 month_start_days[12];
public extern U16 month_start_days_leap[12];
#help_index "Time/Jiffies"
#help_file "::/Doc/TimeJiffy"

Binary file not shown.