shithub: drawterm

Download patch

ref: 04e6c5fd2e8f43f21f0ce6f9903a755b54deea34
parent: fe1e2947710aca3e27730081e5dfa59ea62764f1
author: cinap_lenrek <[email protected]>
date: Sun Jan 15 17:12:32 EST 2017

set kerndate in main(), move global variables to cpu.c

--- a/cpu.c
+++ b/cpu.c
@@ -35,6 +35,8 @@
 
 char *authserver;
 char *secstore;
+char *user;
+char secstorebuf[65536];
 
 char*
 estrdup(char *s)
--- a/drawterm.h
+++ b/drawterm.h
@@ -1,10 +1,8 @@
 extern int havesecstore(char *addr, char *owner);
 extern char *secstore;
-extern char secstorebuf[65536];
 extern char *secstorefetch(char *addr, char *owner, char *passwd);
 extern char *authserver;
 extern int exportfs(int);
-extern char *user;
 extern int dialfactotum(void);
 extern char *getuser(void);
 extern void cpumain(int, char**);
--- a/main.c
+++ b/main.c
@@ -6,10 +6,7 @@
 #include "drawterm.h"
 
 char *argv0;
-char *user;
-char secstorebuf[65536];
 
-extern int errfmt(Fmt*);
 void
 sizebug(void)
 {
@@ -31,6 +28,9 @@
 int
 main(int argc, char **argv)
 {
+	extern ulong kerndate;
+
+	kerndate = seconds();
 	eve = getuser();
 	if(eve == nil)
 		eve = "drawterm";