diff rogue5/mach_dep.c @ 34:655c317b6237

rogue5: add savedir, logfile, bugfixes
author elwin
date Mon, 24 May 2010 20:16:15 +0000
parents f502bf60e6e4
children 2c62bd925c17
line wrap: on
line diff
--- a/rogue5/mach_dep.c	Mon May 24 20:10:59 2010 +0000
+++ b/rogue5/mach_dep.c	Mon May 24 20:16:15 2010 +0000
@@ -129,6 +129,21 @@
 #endif
 }
 
+void
+open_log(void)
+{
+#ifdef LOGFILE
+    logfi = fopen(LOGFILE, "a");
+    if (logfi == NULL)
+    {
+        fprintf(stderr, "Could not open %s for appending: %s\n", LOGFILE,
+                strerror(errno));
+        fflush(stderr);
+    }
+#endif
+    return;
+}
+
 /*
  * getltchars:
  *	Get the local tty chars for later use
@@ -163,6 +178,7 @@
 
     raw();				/* Raw mode */
     noecho();				/* Echo off */
+    nonl();
     keypad(stdscr,1);
     getltchars();			/* get the local tty chars */
 }