Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/coreutils/cal.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/coreutils/cal.c
r2725 r3232 17 17 * Major size reduction... over 50% (>1.5k) on i386. 18 18 */ 19 20 //usage:#define cal_trivial_usage 21 //usage: "[-jy] [[MONTH] YEAR]" 22 //usage:#define cal_full_usage "\n\n" 23 //usage: "Display a calendar\n" 24 //usage: "\n -j Use julian dates" 25 //usage: "\n -y Display the entire year" 26 19 27 #include "libbb.h" 20 28 #include "unicode.h" … … 36 44 37 45 static const unsigned char sep1752[] ALIGN1 = { 38 46 1, 2, 14, 15, 16, 39 47 17, 18, 19, 20, 21, 22, 23, 40 48 24, 25, 26, 27, 28, 29, 30 … … 139 147 *hp++ = ' '; 140 148 { 141 char *two_wchars = unicode_conv_to_printable_fixedwidth( NULL,buf, 2);149 char *two_wchars = unicode_conv_to_printable_fixedwidth(/*NULL,*/ buf, 2); 142 150 strcpy(hp, two_wchars); 143 151 free(two_wchars); … … 160 168 len = sprintf(lineout, "%s %d", month_names[month - 1], year); 161 169 printf("%*s%s\n%s\n", 162 163 170 ((7*julian + WEEK_LEN) - len) / 2, "", 171 lineout, day_headings); 164 172 for (row = 0; row < 6; row++) { 165 173 build_row(lineout, dp)[0] = '\0'; … … 174 182 sprintf(lineout, "%u", year); 175 183 center(lineout, 176 (WEEK_LEN * 3 + HEAD_SEP * 2) 177 + julian * (J_WEEK_LEN * 2 + HEAD_SEP 178 - (WEEK_LEN * 3 + HEAD_SEP * 2)), 179 0); 184 (WEEK_LEN * 3 + HEAD_SEP * 2) 185 + julian * (J_WEEK_LEN * 2 + HEAD_SEP 186 - (WEEK_LEN * 3 + HEAD_SEP * 2)), 187 0 188 ); 180 189 puts("\n"); /* two \n's */ 181 190 for (i = 0; i < 12; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.