--- /dev/null
+ <h1>ENHANCE!</h1>
+ <form method="post" action="/enhance/bluenh" enctype='multipart/form-data'>
+ <img src="param.png" alt="parameter explanation picture"><br>
+ <br>
+ a=<input type="text" name="a" value= "0">, b=<input type="text" name="b" value= "34">, c=<input type="text" name="c" value= "41">,<br>
+ d=<input type="text" name="d" value= "0">, e=<input type="text" name="e" value= "40">, f=<input type="text" name="f" value="255">.<br>
+ a < b < c<br>
+ <br>
+ Enhance by URL<br>
+ URL of image:
+ <input type="text" name="inpix">
+ <input type="submit" value="ENHANCE!"><br>
+ <br>
+ Enhance by file upload<br>
+ Upload the image:
+ <input type="file" name="inpix2">
+ <input type="submit" value="ENHANCE!">
+ </form>
+
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
-<html lang="pl">
- <head>
- <title>ENHANCE! • Bicycles on the Moon</title>
- <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
- <link rel="icon" type="image/png" href="/img/favicon.png">
- </head>
- <body>
- <a href="/"><img src="/img/botmlogo2.png" alt="1190.bicyclesonthemoon.dnsd.info" border="0"></a>
- <h1>ENHANCE!</h1>
- <form method="post" action="/cgi/bluenh/bluenhd" enctype='multipart/form-data'>
- <img src="param.png" alt="parameter explanation picture"><br>
- <br>
- a=<input type="text" name="a" value= "0">, b=<input type="text" name="b" value= "34">, c=<input type="text" name="c" value= "41">,<br>
- d=<input type="text" name="d" value= "0">, e=<input type="text" name="e" value= "40">, f=<input type="text" name="f" value="255">.<br>
- a < b < c<br>
- <br>
- Enhance by URL<br>
- URL of image:
- <input type="text" name="inpix">
- <input type="submit" value="ENHANCE!"><br>
- <br>
- Enhance by file upload<br>
- Upload the image:
- <input type="file" name="inpix2">
- <input type="submit" value="ENHANCE!">
- </form>
- <br>
- <br>
- Source code available at <a href="svn://bicyclesonthemoon.dnsd.info/bluenh">svn://bicyclesonthemoon.dnsd.info/bluenh</a> (use "e" to login) or <a href="http://1190.bicyclesonthemoon.dnsd.info/pro/bluenh">http://1190.bicyclesonthemoon.dnsd.info/pro/bluenh</a>.
-
- </body>
-</html>
--- /dev/null
+ <br>
+ <br>
+ Source code available at <a href="http://bicyclesonthemoon.info/git-projects/?p=ott/enhance">http://bicyclesonthemoon.info/git-projects/?p=ott/enhance</a>.
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<html lang="pl">
+ <head>
+ <title>###HTML_TITLE; • Bicycles on the Moon</title>
+ <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
+ <link rel="icon" type="image/png" href="/img/favicon.png">
+ </head>
+ <body>
+ <a href="/"><img src="/img/botmlogo2.png" alt="1190.bicyclesonthemoon.dnsd.info" border="0"></a>
--- /dev/null
+# Enhance tools
+
+ScriptAlias /enhance/bluenh ###CONF_bluenh;
+
+<Directory ###CONF_bin;>
+ Require all granted
+</Directory>
L_IL =-lIL
L_CGI=-lcgi
+CAT =/usr/bin/cat
CHMOD=/usr/bin/chmod
CP =/usr/bin/cp
MKDIR=/usr/bin/mkdir
BIN_PATH = /botm/bin/enhance
TMP_PATH = /botm/tmp/enhance
+WWW_PATH = /botm/www/1190/enhance
+
+CONF = /botm/etc/www/conf/1190/enhance.conf
CONFIGFILE = settings-$(TARGET).txt settings.txt
CGI=\
bluenh-cgi
-#C_CGI=\
-#bluenh-cgi.c
+HTM_CGI=\
+bluenh.htm
+
+HTM_CGI_1=\
+bluenh.1.htm
# keep these 2 lists in the same order!:
GENERATE_FROM=\
-online-core.1.h
+online-core.1.h\
+enhance.1.conf
TO_GENERATE=\
-online-core.h
+online-core.h\
+enhance.conf
DIR=\
$(BIN_PATH)\
-$(TMP_PATH)
+$(TMP_PATH)\
+$(WWW_PATH)
SETUID=\
$(CGI)
$(STANDALONE)\
$(CGI)
+WWW=\
+index.htm\
+$(HTM_CGI)\
+param.png
#all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd
-all: $(BIN)
+all: $(BIN) $(WWW)
makefile: makefile.1.mak $(CONFIGFILE)
f2h: f2h.c
$(CC) $(CF) -o f2h f2h.c
+$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE)
+ $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > bluenh.htm
+
+index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE)
+ $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm
+
setuid: $(SETUID)
$(CHMOD) u+s,g+s $(SETUID)
$(CP) -p $(BIN) $(BIN_PATH)
endif
-install: cp_bin
+cp_conf: enhance.conf
+ $(CP) enhance.conf $(CONF)
+
+cp_www: $(WWW) | mktree
+ $(CP) -r $(WWW) $(WWW_PATH)
+
+install: cp_bin cp_www cp_conf
clean:
- $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI)
+ $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
-PHONY: all clean install setuid mktree cp_bin
+PHONY: all clean install setuid mktree cp_bin cp_www
#npbd-ong1: npb npbd-ong1.cpp makefile
# $(CC) $(CF) -o npbd-ong1 npbd-ong1.cpp $(LF2)
###MAKE_L_IL: L_IL=-lIL
###MAKE_L_CGI: L_CGI=-lcgi
+###MAKE_CAT: CAT = cat
###MAKE_CHMOD: CHMOD = chmod
###MAKE_CP: CP = cp
###MAKE_MKDIR: MKDIR = mkdir
###MAKE_PERL: PERL = perl
###MAKE_RM: RM = rm
-###MAKE_BIN_PATH: BIN_PATH = /botm/bin/ottmirror
-###MAKE_TMP_PATH: TMP_PATH = /botm/tmp/ottmirror
+###MAKE_BIN_PATH: BIN_PATH = /botm/bin/enhance
+###MAKE_TMP_PATH: TMP_PATH = /botm/tmp/enhance
+###MAKE_WWW_PATH: WWW_PATH = /botm/www/1190/enhance
+
+###MAKE_CONF: CONF = /botm/etc/www/conf/1190/enhance.conf
CONFIGFILE = settings-$(TARGET).txt settings.txt
CGI=\
bluenh-cgi
-#C_CGI=\
-#bluenh-cgi.c
+HTM_CGI=\
+bluenh.htm
+
+HTM_CGI_1=\
+bluenh.1.htm
# keep these 2 lists in the same order!:
GENERATE_FROM=\
-online-core.1.h
+online-core.1.h\
+enhance.1.conf
TO_GENERATE=\
-online-core.h
+online-core.h\
+enhance.conf
DIR=\
$(BIN_PATH)\
-$(TMP_PATH)
+$(TMP_PATH)\
+$(WWW_PATH)
SETUID=\
$(CGI)
$(STANDALONE)\
$(CGI)
+WWW=\
+index.htm\
+$(HTM_CGI)\
+param.png
#all: 403 npb npbd npb-ong1 npbd-ong1 bluenh bluenhd insert extract seediff insertframe mremapt-1 compare nofading nofadingd
-all: $(BIN)
+all: $(BIN) $(WWW)
makefile: makefile.1.mak $(CONFIGFILE)
f2h: f2h.c
$(CC) $(CF) -o f2h f2h.c
+$(HTM_CGI): %.htm: enhance-top.htm enhance-bottom.htm %.1.htm $(CONFIGFILE)
+ $(CAT) enhance-top.htm $*.1.htm enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_$* $(CONFIGFILE) > bluenh.htm
+
+index.htm: enhance-top.htm enhance-bottom.htm $(HTM_CGI_1) $(CONFIGFILE)
+ $(CAT) enhance-top.htm $(HTM_CGI_1) enhance-bottom.htm | $(CONFIGURE) _HTML_TITLE=\$$title_enhance $(CONFIGFILE) > index.htm
+
setuid: $(SETUID)
$(CHMOD) u+s,g+s $(SETUID)
$(CP) -p $(BIN) $(BIN_PATH)
endif
-install: cp_bin
+cp_conf: enhance.conf
+ $(CP) enhance.conf $(CONF)
+
+cp_www: $(WWW) | mktree
+ $(CP) -r $(WWW) $(WWW_PATH)
+
+install: cp_bin cp_www cp_conf
clean:
- $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI)
+ $(RM) -f enhance $(C_STANDALONE) $(STANDALONE) $(TO_GENERATE) f2h $(H_PNG) $(H_SUBTOOL) $(CGI) index.htm $(HTM_CGI)
-PHONY: all clean install setuid mktree cp_bin
+PHONY: all clean install setuid mktree cp_bin cp_www
#npbd-ong1: npb npbd-ong1.cpp makefile
# $(CC) $(CF) -o npbd-ong1 npbd-ong1.cpp $(LF2)
if (status != 0)
fprintf(stdout, "Status: %u\n", status);
if (content_type!=NULL)
- fprintf(stdout, "Content-type: %s", content_type);
+ fprintf(stdout, "Content-type: %s\n", content_type);
fprintf(stdout, "Content-Length: %" PRId64 "\n\n", size);
while (size>0)
if (status != 0)
fprintf(stdout, "Status: %u\n", status);
if (content_type!=NULL)
- fprintf(stdout, "Content-type: %s", content_type);
+ fprintf(stdout, "Content-type: %s\n", content_type);
fprintf(stdout, "Content-Length: %" PRId64 "\n\n", (uint64_t)size);
off = 0;
useragent: ENHANCE!ment tool (http://1190.bicyclesonthemoon.info/enhance)
+title_enhance: ENHANCE!
+title_bluenh: ENHANCE!
+
bin_path: /botm/bin/enhance
+conf_path: /botm/etc/www/conf/1190
tmp_path: /botm/tmp/enhance
+www_path: /botm/www/1190/enhance
+cat: /usr/bin/cat
cp: /usr/bin/cp
chmod: /usr/bin/chmod
mkdir: /usr/bin/mkdir
_C_DEFINE_STR: #define $0 "@_ESCAPE($1)"
# _C_INCLUDE_STR: #include "@_ESCAPE($0)"
-_bin_bluenh_path = @_PATH($bin_path, bluenh)
-_bin_npb_path = @_PATH($bin_path, npb)
+_bin_bluenh_path = @_PATH($bin_path, bluenh)
+_bin_bluenh_cgi_path = @_PATH($bin_path, bluenh-cgi)
+_bin_npb_path = @_PATH($bin_path, npb)
+_bin_npb_cgi_path = @_PATH($bin_path, npb-cgi)
+
+_conf_path = @_PATH($conf_path, $name\.conf)
+
+HTML_TITLE = @_HTML_TITLE()
+
+
+CONF_bin = $bin_path
+CONF_bluenh = $_bin_bluenh_cgi_path
+
MAKE_CONFIGURE = CONFIGURE = $configure
MAKE_TARGET = TARGET = $target
+MAKE_CAT = CAT =$cat
MAKE_CHMOD = CHMOD=$chmod
MAKE_CP = CP =$cp
MAKE_MKDIR = MKDIR=$mkdir
MAKE_L_IL = L_IL =$L_IL
MAKE_L_CGI = L_CGI=$L_CGI
+MAKE_CONF = CONF = $_conf_path
+
MAKE_BIN_PATH = BIN_PATH = $bin_path
MAKE_TMP_PATH = TMP_PATH = $tmp_path
+MAKE_WWW_PATH = WWW_PATH = $www_path
+
C_USERAGENT = @_C_DEFINE_STR(USERAGENT, $useragent)