68 static int multimode; |
68 static int multimode; |
69 static char *multiline; |
69 static char *multiline; |
70 int update_roster; |
70 int update_roster; |
71 int utf8_mode = 0; |
71 int utf8_mode = 0; |
72 static bool Autoaway; |
72 static bool Autoaway; |
|
73 static bool Curses; |
73 |
74 |
74 static char inputLine[INPUTLINE_LENGTH+1]; |
75 static char inputLine[INPUTLINE_LENGTH+1]; |
75 static char *ptr_inputline; |
76 static char *ptr_inputline; |
76 static short int inputline_offset; |
77 static short int inputline_offset; |
77 static int completion_started; |
78 static int completion_started; |
1103 buffer = (char *) calloc(1, 1024); |
1106 buffer = (char *) calloc(1, 1024); |
1104 } while (!buffer); |
1107 } while (!buffer); |
1105 |
1108 |
1106 timestamp = time(NULL); |
1109 timestamp = time(NULL); |
1107 strftime(buffer, 64, "[%H:%M:%S] ", localtime(×tamp)); |
1110 strftime(buffer, 64, "[%H:%M:%S] ", localtime(×tamp)); |
1108 wprintw(logWnd, "\n%s", buffer); |
1111 if (Curses) |
|
1112 wprintw(logWnd, "\n%s", buffer); |
|
1113 else |
|
1114 printf("%s", buffer); |
1109 |
1115 |
1110 va_start(ap, fmt); |
1116 va_start(ap, fmt); |
1111 vsnprintf(buffer, 1024, fmt, ap); |
1117 vsnprintf(buffer, 1024, fmt, ap); |
1112 va_end(ap); |
1118 va_end(ap); |
1113 |
1119 |
1114 wprintw(logWnd, "%s", buffer); |
1120 if (Curses) { |
|
1121 wprintw(logWnd, "%s", buffer); |
|
1122 update_panels(); |
|
1123 doupdate(); |
|
1124 } else { |
|
1125 printf("%s\n", buffer); |
|
1126 } |
1115 free(buffer); |
1127 free(buffer); |
1116 |
|
1117 update_panels(); |
|
1118 doupdate(); |
|
1119 } |
1128 } |
1120 |
1129 |
1121 // scr_set_chatmode() |
1130 // scr_set_chatmode() |
1122 // Public function to (un)set chatmode... |
1131 // Public function to (un)set chatmode... |
1123 inline void scr_set_chatmode(int enable) |
1132 inline void scr_set_chatmode(int enable) |