File: ncal_altmon.diff

package info (click to toggle)
bsdmainutils 12.1.8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,108 kB
  • sloc: ansic: 2,356; sh: 131; python: 105; makefile: 50; perl: 39
file content (29 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/usr.bin/ncal/ncal.c
+++ b/usr.bin/ncal/ncal.c
@@ -871,7 +871,7 @@
 	memset(&tm, 0, sizeof(tm));
 	tm.tm_mon = m;
 	wcsftime(mlines->name, sizeof(mlines->name) / sizeof(mlines->name[0]),
-		 L"%B", &tm);
+		 L"%OB", &tm);
 	mlines->name[0] = towupper(mlines->name[0]);
 
 	/*
@@ -974,7 +974,7 @@
 	memset(&tm, 0, sizeof(tm));
 	tm.tm_mon = m;
 	wcsftime(mlines->name, sizeof(mlines->name) / sizeof(mlines->name[0]),
-		 L"%B", &tm);
+		 L"%OB", &tm);
 	mlines->name[0] = towupper(mlines->name[0]);
 
 	/*
@@ -1207,7 +1207,7 @@
 		*y = ny;
 		return (0);
 	}
-	if (strptime(s, "%B", &tm) != NULL || strptime(s, "%b", &tm) != NULL) {
+	if (strptime(s, "%OB", &tm) != NULL || strptime(s, "%Ob", &tm) != NULL) {
 		*m = tm.tm_mon + 1;
 		return (0);
 	}