projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First phase of porting. pterm now compiles and runs under Linux+gtk.
[u/mdw/putty]
/
logging.c
diff --git
a/logging.c
b/logging.c
index
b311784
..
c843118
100644
(file)
--- a/
logging.c
+++ b/
logging.c
@@
-1,5
+1,3
@@
-#include <windows.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@
-11,7
+9,6
@@
/* log session to file stuff ... */
static FILE *lgfp = NULL;
/* log session to file stuff ... */
static FILE *lgfp = NULL;
-static char timdatbuf[20];
static char currlogfilename[FILENAME_MAX];
static void xlatlognam(char *d, char *s, char *hostname, struct tm *tm);
static char currlogfilename[FILENAME_MAX];
static void xlatlognam(char *d, char *s, char *hostname, struct tm *tm);
@@
-150,7
+147,6
@@
void logfclose(void)
static void xlatlognam(char *d, char *s, char *hostname, struct tm *tm) {
char buf[10], *bufp;
int size;
static void xlatlognam(char *d, char *s, char *hostname, struct tm *tm) {
char buf[10], *bufp;
int size;
- char *ds = d; /* save start pos. */
int len = FILENAME_MAX-1;
while (*s) {
int len = FILENAME_MAX-1;
while (*s) {
@@
-159,6
+155,7
@@
static void xlatlognam(char *d, char *s, char *hostname, struct tm *tm) {
if (*s == '&') {
char c;
s++;
if (*s == '&') {
char c;
s++;
+ size = 0;
if (*s) switch (c = *s++, tolower(c)) {
case 'y':
size = strftime(buf, sizeof(buf), "%Y", tm);
if (*s) switch (c = *s++, tolower(c)) {
case 'y':
size = strftime(buf, sizeof(buf), "%Y", tm);