diff options
Diffstat (limited to 'coreutils/cal.c')
-rw-r--r-- | coreutils/cal.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/coreutils/cal.c b/coreutils/cal.c index b470ad968..0d388aa1c 100644 --- a/coreutils/cal.c +++ b/coreutils/cal.c | |||
@@ -43,7 +43,7 @@ static const unsigned char days_in_month[] ALIGN1 = { | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | static const unsigned char sep1752[] ALIGN1 = { | 45 | static const unsigned char sep1752[] ALIGN1 = { |
46 | 1, 2, 14, 15, 16, | 46 | 1, 2, 14, 15, 16, |
47 | 17, 18, 19, 20, 21, 22, 23, | 47 | 17, 18, 19, 20, 21, 22, 23, |
48 | 24, 25, 26, 27, 28, 29, 30 | 48 | 24, 25, 26, 27, 28, 29, 30 |
49 | }; | 49 | }; |
@@ -167,8 +167,8 @@ int cal_main(int argc UNUSED_PARAM, char **argv) | |||
167 | day_array(month, year, dp); | 167 | day_array(month, year, dp); |
168 | len = sprintf(lineout, "%s %d", month_names[month - 1], year); | 168 | len = sprintf(lineout, "%s %d", month_names[month - 1], year); |
169 | printf("%*s%s\n%s\n", | 169 | printf("%*s%s\n%s\n", |
170 | ((7*julian + WEEK_LEN) - len) / 2, "", | 170 | ((7*julian + WEEK_LEN) - len) / 2, "", |
171 | lineout, day_headings); | 171 | lineout, day_headings); |
172 | for (row = 0; row < 6; row++) { | 172 | for (row = 0; row < 6; row++) { |
173 | build_row(lineout, dp)[0] = '\0'; | 173 | build_row(lineout, dp)[0] = '\0'; |
174 | dp += 7; | 174 | dp += 7; |
@@ -181,10 +181,11 @@ int cal_main(int argc UNUSED_PARAM, char **argv) | |||
181 | 181 | ||
182 | sprintf(lineout, "%u", year); | 182 | sprintf(lineout, "%u", year); |
183 | center(lineout, | 183 | center(lineout, |
184 | (WEEK_LEN * 3 + HEAD_SEP * 2) | 184 | (WEEK_LEN * 3 + HEAD_SEP * 2) |
185 | + julian * (J_WEEK_LEN * 2 + HEAD_SEP | 185 | + julian * (J_WEEK_LEN * 2 + HEAD_SEP |
186 | - (WEEK_LEN * 3 + HEAD_SEP * 2)), | 186 | - (WEEK_LEN * 3 + HEAD_SEP * 2)), |
187 | 0); | 187 | 0 |
188 | ); | ||
188 | puts("\n"); /* two \n's */ | 189 | puts("\n"); /* two \n's */ |
189 | for (i = 0; i < 12; i++) { | 190 | for (i = 0; i < 12; i++) { |
190 | day_array(i + 1, year, days[i]); | 191 | day_array(i + 1, year, days[i]); |