summaryrefslogtreecommitdiffstats
path: root/usr.bin/ncal
diff options
context:
space:
mode:
authorhelbig <helbig@FreeBSD.org>1997-12-31 15:55:08 +0000
committerhelbig <helbig@FreeBSD.org>1997-12-31 15:55:08 +0000
commitd3af2f22a4764e38834cac9adc8109c98678c68e (patch)
treef10d0376e051ca754b2d3748a1d3a1ddfed59971 /usr.bin/ncal
parentab7e7a033c349ecd5a931f3e82871405b9cd9f75 (diff)
downloadFreeBSD-src-d3af2f22a4764e38834cac9adc8109c98678c68e.zip
FreeBSD-src-d3af2f22a4764e38834cac9adc8109c98678c68e.tar.gz
Ensure 2 letter abbreviations of weekdays (even if LANG=C
and invoked as "cal").
Diffstat (limited to 'usr.bin/ncal')
-rw-r--r--usr.bin/ncal/ncal.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c
index 032bc52..cbfe3bd 100644
--- a/usr.bin/ncal/ncal.c
+++ b/usr.bin/ncal/ncal.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: ncal.c,v 1.1.1.1 1997/12/15 20:35:22 helbig Exp $
*/
#include <calendar.h>
#include <err.h>
@@ -136,7 +136,7 @@ char jdaystr[] = " 1 2 3 4 5 6 7 8 9"
" 350 351 352 353 354 355 356 357 358 359"
" 360 361 362 363 364 365 366";
-int flag_weeks; /* user wants weekdays */
+int flag_weeks; /* user wants number of week */
int nswitch; /* user defined switch date */
int nswitchb; /* switch date for backward compatibility */
@@ -698,7 +698,8 @@ mkmonthb(int y, int m, int jd_flag, struct monthlines *mlines)
}
/* Put the local names of weekdays into the wds */
-void mkweekdays(struct weekdays *wds)
+void
+mkweekdays(struct weekdays *wds)
{
int i;
struct tm tm;
@@ -708,6 +709,7 @@ void mkweekdays(struct weekdays *wds)
for (i = 0; i != 7; i++) {
tm.tm_wday = (i+1) % 7;
strftime(wds->names[i], 4, "%a", &tm);
+ wds->names[i][2] = ' ';
}
}
OpenPOWER on IntegriCloud