jfb2 writes in Bug 119:
[oweals/busybox.git] / coreutils / cal.c
index ed480dd787d8e798aba1f7106299f19f317db33c..93c5692d0dd21043b20aca63cd0d5ace6cc159a7 100644 (file)
@@ -1,19 +1,6 @@
-/* NOTE:
- *
- * Apparently, all "Steven J. Merrifield" did was grab the util-linux cal applet,
- * spend maybe 5 minutes integrating it into busybox, slapped a copyright on it,
- * and submitted it.  I certainly saw no evidence of any attempt at size reduction.
- * Not only do I consider his copyright below meaningless, I also consider his
- * actions shameful.
- *
- * Manuel Novoa III   (mjn3@codepoet.org)
- */
-
 /*
  * Calendar implementation for busybox
  *
- * Copyright (C) 2001 by Steven J. Merrifield <steve@labyrinth.net.au>
- *
  * See original copyright at the end of this file
  *
  * This program is free software; you can redistribute it and/or modify
@@ -78,7 +65,7 @@ static const char sep1752[] = {
 
 static int julian;
 
-/* leap year -- account for gregorian reformation in 1752 */
+/* leap year -- account for Gregorian reformation in 1752 */
 #define        leap_year(yr) \
        ((yr) <= 1752 ? !((yr) % 4) : \
        (!((yr) % 4) && ((yr) % 100)) || !((yr) % 400))
@@ -174,7 +161,7 @@ int cal_main(int argc, char **argv)
                int row, len, days[MAXDAYS];
                int *dp = days;
                char lineout[30];
-               
+
                day_array(month, year, dp);
                len = sprintf(lineout, "%s %d", month_names[month - 1], year);
                bb_printf("%*s%s\n%s\n",
@@ -189,7 +176,7 @@ int cal_main(int argc, char **argv)
                int row, which_cal, week_len, days[12][MAXDAYS];
                int *dp;
                char lineout[80];
-               
+
                sprintf(lineout, "%d", year);
                center(lineout,
                           (WEEK_LEN * 3 + HEAD_SEP * 2)
@@ -330,14 +317,14 @@ static void blank_string(char *buf, size_t buflen)
 static char *build_row(char *p, int *dp)
 {
        int col, val, day;
-               
+
        memset(p, ' ', (julian + DAY_LEN) * 7);
 
        col = 0;
        do {
                if ((day = *dp++) != SPACE) {
                        if (julian) {
-                               *++p;
+                               ++p;
                                if (day >= 100) {
                                        *p = '0';
                                        p[-1] = (day / 100) + '0';