Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/coreutils/cal.c


Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/coreutils/cal.c

    r2725 r3232  
    1717 * Major size reduction... over 50% (>1.5k) on i386.
    1818 */
     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
    1927#include "libbb.h"
    2028#include "unicode.h"
     
    3644
    3745static const unsigned char sep1752[] ALIGN1 = {
    38          1, 2,  14, 15, 16,
     46        1,  2,  14, 15, 16,
    3947    17, 18, 19, 20, 21, 22, 23,
    4048    24, 25, 26, 27, 28, 29, 30
     
    139147                *hp++ = ' ';
    140148            {
    141                 char *two_wchars = unicode_conv_to_printable_fixedwidth(NULL, buf, 2);
     149                char *two_wchars = unicode_conv_to_printable_fixedwidth(/*NULL,*/ buf, 2);
    142150                strcpy(hp, two_wchars);
    143151                free(two_wchars);
     
    160168        len = sprintf(lineout, "%s %d", month_names[month - 1], year);
    161169        printf("%*s%s\n%s\n",
    162                ((7*julian + WEEK_LEN) - len) / 2, "",
    163                lineout, day_headings);
     170                ((7*julian + WEEK_LEN) - len) / 2, "",
     171                lineout, day_headings);
    164172        for (row = 0; row < 6; row++) {
    165173            build_row(lineout, dp)[0] = '\0';
     
    174182        sprintf(lineout, "%u", year);
    175183        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        );
    180189        puts("\n");     /* two \n's */
    181190        for (i = 0; i < 12; i++) {
Note: See TracChangeset for help on using the changeset viewer.