42 #include "http-strings.h"
43 #include "webserver.h"
49 static struct ctk_label message =
50 {
CTK_LABEL(0, 0, 15, 1,
"Latest requests")};
52 PROCESS(webserver_process,
"Web server");
54 AUTOSTART_PROCESSES(&webserver_process);
58 static char log[LOG_WIDTH*LOG_HEIGHT];
60 static struct ctk_label loglabel =
61 {
CTK_LABEL(0, 1, LOG_WIDTH, LOG_HEIGHT, log)};
67 ctk_window_new(&mainwindow, LOG_WIDTH, LOG_HEIGHT+1,
"Web server");
80 ev == PROCESS_EVENT_EXIT) {
98 memcpy(log, &log[LOG_WIDTH], LOG_WIDTH * (LOG_HEIGHT - 1));
101 size = sprintf(&log[LOG_WIDTH * (LOG_HEIGHT - 1)],
109 strncpy(&log[LOG_WIDTH * (LOG_HEIGHT - 1) + size], file, LOG_WIDTH - size);
116 webserver_log(
char *msg)
119 memcpy(log, &log[LOG_WIDTH], LOG_WIDTH * (LOG_HEIGHT - 1));
122 strncpy(&log[LOG_WIDTH * (LOG_HEIGHT - 1)], msg, LOG_WIDTH);