From 59797d0761094925a59e785ee16025d0772b69be Mon Sep 17 00:00:00 2001 From: Nishi Date: Mon, 23 Sep 2024 10:21:20 +0000 Subject: [PATCH] forgot to commit itworks.c git-svn-id: file:///raid/svn-personal/tewi/trunk@129 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Makefile | 2 +- Tool/genconf.c | 4 ++-- Tool/itworks.c | 35 +++++++++++++++++++++++++++++++++++ installer.sh | 1 - 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 Tool/itworks.c diff --git a/Makefile b/Makefile index f026bba..68b4f7e 100644 --- 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' diff --git a/Tool/genconf.c b/Tool/genconf.c index 6a9a9a6..ef4244b 100644 --- a/Tool/genconf.c +++ b/Tool/genconf.c @@ -4,8 +4,8 @@ #include -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 index 0000000..14224b2 --- /dev/null +++ b/Tool/itworks.c @@ -0,0 +1,35 @@ +/* $Id$ */ + +#include "../config.h" + +#include + +int main() { + printf("\n"); + printf("\n"); + printf(" \n"); + printf(" \n"); + printf(" Test Page for Tewi HTTPd Installation\n"); + printf(" \n"); + printf(" \n"); + printf("

It works! - Tewi HTTPd is installed on this website!

\n"); + printf("

\n"); + printf(" If you can see this page, then the people who own this domain have just installed Tewi HTTPd 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("

\n"); + printf("
\n"); + printf("
\n"); + printf(" If you are seeing this page instead of the website you expected, please contact the administrator of the website involved. (Try sending email to <%s>.) 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 ignored.\n", SERVER_ADMIN); + printf("
\n"); + printf("
\n"); + printf("

\n"); + printf(" For the document, take a look at Tewi HTTPd Trac.\n"); + printf("

\n"); + printf("

\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("

\n"); + printf("
\n"); + printf(" \n"); + printf("
\n"); + printf(" \n"); + printf("\n"); +} diff --git a/installer.sh b/installer.sh index dea0117..e500e2d 100755 --- a/installer.sh +++ b/installer.sh @@ -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 } -- 2.45.2