1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-01 22:05:08 +00:00
freebsd-ports/japanese/mnews/files/patch-ab
Munechika SUMIKAWA e563579165 - use ${OSVERSION} instead of ${USE_INET6}
- fix memoly leak when using getaddrinfo()
- support draft-ietf-drums-msg-fmt-07

Partly submitted by:	Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>
Approved by:		maintainer
2000-01-25 22:01:31 +00:00

43 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- ../src/mnews.c.orig Wed Dec 15 00:29:56 1999
+++ ../src/mnews.c Sun Jan 16 07:37:37 2000
@@ -2870,8 +2870,17 @@
}
dates = next_param(dates);
*year = atoi(dates); /* 年 */
- if ((*year > 0) && (*year < 1000)) {
- *year += 1900;
+ if ((*year >= 0) && (*year < 1000)){
+#ifdef Y2K_DONT_CONVERT_YEAR_00XX
+ for (i = 0; i < 5; i++)
+ if (dates[i] == '\0' || !isdigit(dates[i])) break;
+ if (i < 4){
+#endif
+ /* [Y2K] 13桁年表示日付変換 */
+ *year += (*year < 50) ? 2000 : 1900; /* draft-ietf-drums-msg-fmt-07 */
+#ifdef Y2K_DONT_CONVERT_YEAR_00XX
+ }
+#endif
}
dates = next_param(dates);
} else { /* Date, Day Month Year Time Zone */
@@ -2885,8 +2894,17 @@
}
dates = next_param(dates);
*year = atoi(dates); /* 年 */
- if ((*year > 0) && (*year < 1000)) {
- *year += 1900;
+ if ((*year >= 0) && (*year < 1000)){
+#ifdef Y2K_DONT_CONVERT_YEAR_00XX
+ for (i = 0; i < 5; i++)
+ if (dates[i] == '\0' || !isdigit(dates[i])) break;
+ if (i < 4){
+#endif
+ /* [Y2K] 13桁年表示日付変換 */
+ *year += (*year < 50) ? 2000 : 1900; /* draft-ietf-drums-msg-fmt-07 */
+#ifdef Y2K_DONT_CONVERT_YEAR_00XX
+ }
+#endif
}
dates = next_param(dates);
*hour = atoi(dates); /* 時 */