Commit d263a522b001469f5ba9987e1b854cab55449b8f

Baptiste 2024-08-03T14:49:00

little front update

diff --git a/httpd/httpd.c b/httpd/httpd.c
index cff9c4d..a72214c 100644
--- a/httpd/httpd.c
+++ b/httpd/httpd.c
@@ -29,6 +29,7 @@ int main (int argc, char **argv)
   call_init(&call);
   call.ident.module = module;
   call.ident.sym = sym_1("main");
+  //FIXME
   if (argc >= 2)
     call.arguments = list_new_str_1
       (NULL, argv[0], list_new_str_1
diff --git a/lib/kc3/0.1/httpd.kc3 b/lib/kc3/0.1/httpd.kc3
index ac4224f..832c785 100644
--- a/lib/kc3/0.1/httpd.kc3
+++ b/lib/kc3/0.1/httpd.kc3
@@ -5,9 +5,18 @@ defmodule HTTPd do
     req = HTTP.Request.buf_parse(client.buf_rw.r)
     if req do
       puts("HTTPd.server_loop: got request #{req}")
-      res = %HTTP.Response{body: "<html>
+       res = %HTTP.Response{body: "<html>
   <head>
     <title>KC3 HTTPd</title>
+    <style>
+      pre {
+        white-space: pre-wrap; /* CSS3 */
+        white-space: -moz-pre-wrap; /* Mozilla */
+        white-space: -pre-wrap; /* Opera 4-6 */
+        white-space: -o-pre-wrap; /* Opera 7 */
+        word-wrap: break-word; /* Internet Explorer 5.5+ */
+      }
+    </style>
   </head>
   <body>
     <h1>KC3 HTTPd</h1>
@@ -42,7 +51,7 @@ defmodule HTTPd do
     }
     (host, port) {
       server(host, port)
-    }     
+    }
   }
 
 end