about summary refs log tree commit diff stats
path: root/src/LYUtils.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-02-27 19:00:00 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1998-02-27 19:00:00 -0500
commit86b4d41a7463bd35cf662fc748aa338caef609c9 (patch)
treedb4ba2deed8edca7df91182c0253ee93248c7382 /src/LYUtils.c
parent899516a7c8880df05e30bbbed72ca1d3cb7a4f00 (diff)
downloadlynx-snapshots-86b4d41a7463bd35cf662fc748aa338caef609c9.tar.gz
snapshot of project "lynx", label v2-7-1ac-0_117
Diffstat (limited to 'src/LYUtils.c')
-rw-r--r--src/LYUtils.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/LYUtils.c b/src/LYUtils.c
index dd9538ba..c60ce6ed 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1972,7 +1972,7 @@ PUBLIC void toggle_novice_line NOARGS
 }
 
 PUBLIC void noviceline ARGS1(
-	int,		more_flag)
+	int,		more_flag GCC_UNUSED)
 {
 
     if (dump_output_immediately)
@@ -2908,7 +2908,7 @@ PUBLIC BOOLEAN inlocaldomain NOARGS
 #endif	/* TERMIO_AND_TERMIOS */
 
 PUBLIC void size_change ARGS1(
-	int,		sig)
+	int,		sig GCC_UNUSED)
 {
     int old_lines = LYlines;
     int old_cols = LYcols;
@@ -4937,6 +4937,7 @@ PUBLIC CONST char * Home_Dir NOARGS
 		StrAllocCopy(HomeDir, cp);
 	    }
 #else
+#if HAVE_UTMP
 	    /*
 	     *	One could use getlogin() and getpwnam() here instead.
 	     */
@@ -4944,7 +4945,9 @@ PUBLIC CONST char * Home_Dir NOARGS
 
 	    if (pw && pw->pw_dir) {
 		StrAllocCopy(HomeDir, pw->pw_dir);
-	    } else {
+	    } else
+#endif
+	    {
 		/*
 		 *  Use /tmp; it should be writable.
 		 */
@@ -4973,7 +4976,7 @@ PUBLIC CONST char * Home_Dir NOARGS
  */
 PUBLIC BOOLEAN LYPathOffHomeOK ARGS2(
 	char *, 	fbuffer,
-	int,		fbuffer_size)
+	size_t, 	fbuffer_size)
 {
     char *file = NULL;
     char *cp, *cp1;
@@ -5146,7 +5149,7 @@ PUBLIC BOOLEAN LYPathOffHomeOK ARGS2(
  */
 PUBLIC void LYAddPathToHome ARGS3(
 	char *, 	fbuffer,
-	int,		fbuffer_size,
+	size_t, 	fbuffer_size,
 	char *, 	fname)
 {
     char *home = NULL;
@@ -5399,7 +5402,19 @@ PUBLIC time_t LYmktime ARGS2(
 	LYstrncpy(temp, start, 4);
     } else if ((s - start) == 2) {
 	now = time(NULL);
-	LYstrncpy(temp, ((char *)ctime(&now) + 20), 2);
+	/*
+	 * Assume that received 2-digit dates >= 70 are 19xx; others
+	 * are 20xx.  Only matters when dealing with broken software
+	 * (HTTP server or web page) which is not Y2K compliant.  The
+	 * line is drawn on a best-guess basis; it is impossible for
+	 * this to be completely accurate because it depends on what
+	 * the broken sender software intends.	(This totally breaks
+	 * in 2100 -- setting up the next crisis...) - BL
+	 */
+	if (atoi(start) >= 70)
+	    LYstrncpy(temp, "19", 2);
+	else
+	    LYstrncpy(temp, "20", 2);
 	strncat(temp, start, 2);
 	temp[4] = '\0';
     } else {
-06-10 01:08:30 +0200 committer hut <hut@lavabit.com> 2013-06-10 01:08:30 +0200 doc/colorschemes.txt: update' href='/akspecs/ranger/commit/doc/colorschemes.txt?h=v1.9.0b6&id=29b05d00bf3ff1dab8d2e25a81ab7e9d31791c6e'>29b05d00 ^
efdc7b16 ^
f597489c ^


efdc7b16 ^

a8f9cf2c ^

efdc7b16 ^






f597489c ^
efdc7b16 ^






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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92