-/* 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
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))
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",
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)
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';