Skip to content
This repository
Browse code

Merge pull request #6 from bulk88/master

reduce size of const static tables in time64.c
  • Loading branch information...
commit 7cc50a0399364ae8229623c784a78e6945543e29 2 parents 0f1670b + dae6fe3
Michael G. Schwern authored January 16, 2014

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. 10  time64.c
10  time64.c
@@ -54,12 +54,12 @@ gmtime64_r() is a 64-bit equivalent of gmtime_r().
54 54
 static struct TM   Static_Return_Date;
55 55
 static char        Static_Return_String[35];
56 56
 
57  
-static const int days_in_month[2][12] = {
  57
+static const char days_in_month[2][12] = {
58 58
     {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
59 59
     {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
60 60
 };
61 61
 
62  
-static const int julian_days_by_month[2][12] = {
  62
+static const short julian_days_by_month[2][12] = {
63 63
     {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
64 64
     {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335},
65 65
 };
@@ -73,7 +73,7 @@ static char mon_name[12][4] = {
73 73
     "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
74 74
 };
75 75
 
76  
-static const int length_of_year[2] = { 365, 366 };
  76
+static const short length_of_year[2] = { 365, 366 };
77 77
 
78 78
 /* Some numbers relating to the gregorian cycle */
79 79
 static const Year     years_in_gregorian_cycle   = 400;
@@ -88,7 +88,7 @@ static const Time64_T seconds_in_gregorian_cycle = days_in_gregorian_cycle * 60L
88 88
 #define SOLAR_CYCLE_LENGTH 28
89 89
 
90 90
 /* Year cycle from MAX_SAFE_YEAR down. */
91  
-static const int safe_years_high[SOLAR_CYCLE_LENGTH] = {
  91
+static const short safe_years_high[SOLAR_CYCLE_LENGTH] = {
92 92
     2016, 2017, 2018, 2019,
93 93
     2020, 2021, 2022, 2023,
94 94
     2024, 2025, 2026, 2027,
@@ -110,7 +110,7 @@ static const int safe_years_low[SOLAR_CYCLE_LENGTH] = {
110 110
 };
111 111
 
112 112
 /* This isn't used, but it's handy to look at */
113  
-static const int dow_year_start[SOLAR_CYCLE_LENGTH] = {
  113
+static const char dow_year_start[SOLAR_CYCLE_LENGTH] = {
114 114
     5, 0, 1, 2,     /* 0       2016 - 2019 */
115 115
     3, 5, 6, 0,     /* 4  */
116 116
     1, 3, 4, 5,     /* 8       1996 - 1998, 1971*/

0 notes on commit 7cc50a0

Please sign in to comment.
Something went wrong with that request. Please try again.