]> Git repositories of Nishi - tewi.git/commitdiff
forgot to commit itworks.c
authorNishi <nishi@nishi.boats>
Mon, 23 Sep 2024 10:21:20 +0000 (10:21 +0000)
committerNishi <nishi@nishi.boats>
Mon, 23 Sep 2024 10:21:20 +0000 (10:21 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@129 8739d7e6-ffea-ec47-b151-bdff447c6205

Makefile
Tool/genconf.c
Tool/itworks.c [new file with mode: 0644]
installer.sh

index f026bba3f66bf6eada96e0af41344c3821e11d18..68b4f7e06dd764d1711825dbf851e7765f55236a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ install: all ./Tool/genconf ./Tool/itworks
        cp ./Manpage/tewi.conf.5 $(PREFIX)/share/man/man5/
 
 format:
-       clang-format --verbose -i `find ./Server ./Common ./Module "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
+       clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
 
 get-version:
        @grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed -E 's/^"//g'
index 6a9a9a62ce074d82cfe5fb57e5e4650df0a516ef..ef4244b2f7c81f5cba9deeee26b3e1ea9c0a049c 100644 (file)
@@ -4,8 +4,8 @@
 
 #include <stdio.h>
 
-int main(int argc, char** argv){
-       if(argc < 2){
+int main(int argc, char** argv) {
+       if(argc < 2) {
                return 1;
        }
        printf("##\n");
diff --git a/Tool/itworks.c b/Tool/itworks.c
new file mode 100644 (file)
index 0000000..14224b2
--- /dev/null
@@ -0,0 +1,35 @@
+/* $Id$ */
+
+#include "../config.h"
+
+#include <stdio.h>
+
+int main() {
+       printf("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n");
+       printf("<html>\n");
+       printf("        <head>\n");
+       printf("                <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
+       printf("                <title>Test Page for Tewi HTTPd Installation</title>\n");
+       printf("        </head>\n");
+       printf("        <body vlink=\"#000080\" text=\"#000000\" link=\"#0000FF\" bgcolor=\"#FFFFFF\" alink=\"#FF0000\">\n");
+       printf("                <h1 align=\"center\">It works! - Tewi HTTPd is installed on this website!</h1>\n");
+       printf("                <p>\n");
+       printf("                        If you can see this page, then the people who own this domain have just installed <a href=\"http://nishi.boats/tewi\">Tewi HTTPd</a> successfully. They not have to add content to this directoryt and replace this placeholder page, or else point the server at their real content.\n");
+       printf("                </p>\n");
+       printf("                <hr>\n");
+       printf("                <blockquote>\n");
+       printf("                        If you are seeing this page instead of the website you expected, please <strong>contact the administrator of the website involved.</strong> (Try sending email to <samp>&lt;%s&gt;</samp>.) Although this site is running Tewi HTTPd it almost certainly has no other connection to the developers of Tewi HTTPd, so please do not send email about this website or its contents to the developers of Tewi HTTPd. If you do, your message will be <strong><big>ignored</big></strong>.\n", SERVER_ADMIN);
+       printf("                </blockquote>\n");
+       printf("                <hr>\n");
+       printf("                <p>\n");
+       printf("                        For the document, take a look at <a href=\"https://trac.nishi.boats/tewi\">Tewi HTTPd Trac</a>.\n");
+       printf("                </p>\n");
+       printf("                <p>\n");
+       printf("                        The Webmaster of this site is free to use the iamge below on the Tewi HTTPd-powered Web server. Thanks for using Tewi HTTPd!\n");
+       printf("                </p>\n");
+       printf("                <div align=\"center\">\n");
+       printf("                        <img src=\"/pbtewi.gif\">\n");
+       printf("                </div>\n");
+       printf("        </body>\n");
+       printf("</html>\n");
+}
index dea0117cad644a0d8d129d2659e37e2ce1686866..e500e2dc18eef26a095f0f99050a7585895051d1 100755 (executable)
@@ -6,7 +6,6 @@ fail() {
        rm -f tewi.exe
        rm -f generated.conf
        rm -f itworks.html
-       mv config.h.bak config.h
        exit 1
 }