]> bicyclesonthemoon.info Git - ott/mirror/commitdiff
Remaining source files converted to new config system.
authorb <rowerynaksiezycu@gmail.com>
Sun, 25 Sep 2022 17:30:35 +0000 (17:30 +0000)
committerb <rowerynaksiezycu@gmail.com>
Sun, 25 Sep 2022 17:30:35 +0000 (17:30 +0000)
makefile
makefile.1.mak
preview.1.awk
settings-release.txt
settings.txt
update.1.cpp
view.1.cpp

index 9542982bd35e79745419bae314c79b38e675d7c2..3b9dd37897a36705ec110417352079d57c35af4f 100644 (file)
--- a/makefile
+++ b/makefile
 # along with OTT mirror. If not, see <http://www.gnu.org/licenses/>.
 
 
-# CC=g++
-# CF=-g -Wall
-# LF1=-lcgi
+CC   =g++
+CF   =-g -Wall
+L_CGI=-lcgi
 # AI=mawk -f
 
 ifndef TARGET
-TARGET    = release
+TARGET    =release
 # when want to change target run this first:
 # make -B TARGET=target_name makefile
 endif
 
 CONFIGFILE = settings-$(TARGET).txt settings.txt
 
-PERL   = /usr/bin/perl
-RM     = /usr/bin/rm
+PERL=/usr/bin/perl
+RM  =/usr/bin/rm
 
 # The configuration tool
 # http://bicyclesonthemoon.info/git/botm-config 
-CONFIGURE = /botm/bin/config/configure.pl
+CONFIGURE =/botm/bin/config/configure.pl
 CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)
 
-# keep these lists in the same order!:
-TO_GENERATE = bot2.awk bot2.cpp bot3.cpp findpost.cpp index.awk index.cpp mpview.cpp mview.cpp pm.awk post.awk post.cpp posted.cpp preview.awk
-GENERATE_FROM = bot2.1.awk bot2.1.cpp bot3.1.cpp findpost.1.cpp index.1.awk index.1.cpp mpview.1.cpp mview.1.cpp pm.1.awk post.1.awk post.1.cpp posted.1.cpp preview.1.awk
-
-all: $(TO_GENERATE)
+# keep these 2 lists in the same order!:
+GENERATE_FROM=\
+bot2.1.awk\
+bot2.1.cpp\
+bot3.1.cpp\
+findpost.1.cpp\
+index.1.awk\
+index.1.cpp\
+mpview.1.cpp\
+mview.1.cpp\
+pm.1.awk\
+post.1.awk\
+post.1.cpp\
+posted.1.cpp\
+preview.1.awk\
+update.1.cpp\
+view.1.cpp
+TO_GENERATE=\
+bot2.awk\
+bot2.cpp\
+bot3.cpp\
+findpost.cpp\
+index.awk\
+index.cpp\
+mpview.cpp\
+mview.cpp\
+pm.awk\
+post.awk\
+post.cpp\
+posted.cpp\
+preview.awk\
+update.cpp\
+view.cpp
+
+PROGR_NORMAL=\
+bot2\
+bot3\
+findpost\
+image
+
+PROGR_CGI=\
+index\
+mpview\
+mview\
+post\
+posted\
+redirect\
+update\
+view
+
+all: $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
        
 
 makefile: makefile.1.mak $(CONFIGFILE)
@@ -54,8 +100,14 @@ makefile: makefile.1.mak $(CONFIGFILE)
 $(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
        $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
 
+$(PROGR_NORMAL): %: %.cpp
+       $(CC) $(CF) -o $@ $<
+
+$(PROGR_CGI): %: %.cpp
+       $(CC) $(CF) -o $@ $< $(L_CGI)
+
 clean:
-       $(RM) -f $(TO_GENERATE)
+       $(RM) -f $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
 
 PHONY: all clean
 
index f244a65877245b050cc9ecf0bdc668325085c4f1..cba95cd503bf9f39c149641828e7f8ea1bf37307 100644 (file)
@@ -20,9 +20,9 @@
 # along with OTT mirror. If not, see <http://www.gnu.org/licenses/>.
 
 
-# CC=g++
-# CF=-g -Wall
-# LF1=-lcgi
+###MAKE_CC:    CC=g++
+###MAKE_CF:    CF=-g -Wall
+###MAKE_L_CGI: L_CGI=-lcgi
 # AI=mawk -f
 
 ifndef TARGET
@@ -41,11 +41,57 @@ CONFIGFILE = settings-$(TARGET).txt settings.txt
 CONFIGURE = /botm/bin/config/configure.pl ###MAKE_CONFIGURE:
 CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)
 
-# keep these lists in the same order!:
-TO_GENERATE = bot2.awk bot2.cpp bot3.cpp findpost.cpp index.awk index.cpp mpview.cpp mview.cpp pm.awk post.awk post.cpp posted.cpp preview.awk
-GENERATE_FROM = bot2.1.awk bot2.1.cpp bot3.1.cpp findpost.1.cpp index.1.awk index.1.cpp mpview.1.cpp mview.1.cpp pm.1.awk post.1.awk post.1.cpp posted.1.cpp preview.1.awk
-
-all: $(TO_GENERATE)
+# keep these 2 lists in the same order!:
+GENERATE_FROM=\
+bot2.1.awk\
+bot2.1.cpp\
+bot3.1.cpp\
+findpost.1.cpp\
+index.1.awk\
+index.1.cpp\
+mpview.1.cpp\
+mview.1.cpp\
+pm.1.awk\
+post.1.awk\
+post.1.cpp\
+posted.1.cpp\
+preview.1.awk\
+update.1.cpp\
+view.1.cpp
+TO_GENERATE=\
+bot2.awk\
+bot2.cpp\
+bot3.cpp\
+findpost.cpp\
+index.awk\
+index.cpp\
+mpview.cpp\
+mview.cpp\
+pm.awk\
+post.awk\
+post.cpp\
+posted.cpp\
+preview.awk\
+update.cpp\
+view.cpp
+
+PROGR_NORMAL=\
+bot2\
+bot3\
+findpost\
+image
+
+PROGR_CGI=\
+index\
+mpview\
+mview\
+post\
+posted\
+redirect\
+update\
+view
+
+all: $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
        
 
 makefile: makefile.1.mak $(CONFIGFILE)
@@ -54,8 +100,14 @@ makefile: makefile.1.mak $(CONFIGFILE)
 $(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
        $(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
 
+$(PROGR_NORMAL): %: %.cpp
+       $(CC) $(CF) -o $@ $<
+
+$(PROGR_CGI): %: %.cpp
+       $(CC) $(CF) -o $@ $< $(L_CGI)
+
 clean:
-       $(RM) -f $(TO_GENERATE)
+       $(RM) -f $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
 
 PHONY: all clean
 
index 1c1992aa2704810a4cc69d19ee24435aba111017..0f67735a3ef7272bd22f1eb512f04191d246b6b7 100644 (file)
@@ -1,8 +1,8 @@
 # OTT mirror\r
-# Copyright (C) 2014 Balthasar Szczepański\r
-# preview.awk\r
+# Copyright (C) 2014, 2022 Balthasar Szczepański\r
+# preview.awk automatically generated from preview.1.awk\r
 # insert content into the preview page.\r
-# 11.11.2014\r
+# 25.09.2022\r
 \r
 # This file is part of OTT mirror.\r
 #\r
 # along with OTT mirror. If not, see <http://www.gnu.org/licenses/>.\r
 \r
 BEGIN{\r
-###mpostpath\r
-###okpath\r
-###pmpath\r
-###failpath\r
+       ###AWK_mpostpath: mpostpath="/eizm/mem/ottmirror/mpost/"\r
+       ###AWK_okpath:    okpath="/eizm/mem/ottmirror/mpost/ok/"\r
+       ###AWK_pmpath:    pmpath="/eizm/mem/ottmirror/mpost/pm/"\r
+       ###AWK_failpath:  failpath="/eizm/mem/ottmirror/mpost/fail/"\r
+       \r
+       ###AWK_default_subject_encoded: default_subject_encoded="Re: 1190: \\&quot;Time\\&quot;"\r
        \r
        HTML="<div class=\"post bg2\" id=\"preview\">\n<div class=\"inner\"><span class=\"corners-top\"><span></span></span>\n<div class=\"postbody\">\n<h3>Preview: %s</h3><div class=\"content\">%s</div></div><span class=\"corners-bottom\"><span></span></span></div></div>\n"\r
        wrong="<p class=\"error\">%s</p>\n"\r
@@ -139,7 +141,7 @@ BEGIN{
                        print title0\r
        }\r
        else if ($0 ~ /^###subject/)\r
-                       printf(subject,((argtab["subject"]=="")?"###default_subject;":argtab["subject"]))\r
+                       printf(subject,((argtab["subject"]=="")?default_subject_encoded:argtab["subject"]))\r
        else if ($0 ~ /^###username/)\r
                printf(username,argtab["username"])\r
        else if ($0 ~ /^###message/)\r
index 528fe5b529ef7bcc4414b950a79ba72b11a8ba0c..f2dac32a16c1cdcefddd534fcaac4925e3499e54 100644 (file)
@@ -4,7 +4,6 @@ configure: /botm/bin/config/configure.pl
 useragent2: bothasar_t (http://1190.bicyclesonthemoon.info/ott/; Time thread mirror bot)
 useragent3: bothasar_p (http://1190.bicyclesonthemoon.info/ott/; Time thread post bot)
 
-
 bin_path: /botm/bin/ottmirror
 log_path: /botm/log/ottmirror
 mem_path: /botm/data/ottmirror
@@ -30,6 +29,7 @@ own_domain: 1190.bicyclesonthemoon.info
 own_url: http://1190.bicyclesonthemoon.info/ott
 bot3name: bothasar_p
 bot3_url: http://1190.bicyclesonthemoon.info/bothasar_p/
+default_subject: Re: 1190: "Time"
 
 cat: /usr/bin/cat
 mv: /usr/bin/mv
@@ -38,3 +38,7 @@ rm: /usr/bin/rm
 ls: /usr/bin/ls
 wget: /usr/bin/wget
 awk: /usr/bin/mawk
+
+CC: g++
+CF: -g -Wall
+L_CGI: -lcgi
index 5b6d9c88772694855ae9a042f79a468dbcc9f637..c6dea8212f7fd3fdf87ed5dbf8832f1874118eb7 100644 (file)
@@ -5,6 +5,8 @@ _bot3name_encoded   = @_URL_ENCODE($bot3name)
 _own_domain_encoded = @_URL_ENCODE($own_domain)
 _own_url_encoded    = @_URL_ENCODE($own_url)
 
+_default_subject_encoded = @_HT_ENCODE($default_subject)
+
 _bin_awk_b2h_path    = @_PATH($bin_path, bb2html.awk)
 _bin_awk_bot2_path   = @_PATH($bin_path, bot2.awk)
 _bin_awk_index_path  = @_PATH($bin_path, index.awk)
@@ -13,11 +15,12 @@ _bin_awk_list_path   = @_PATH($bin_path, list.awk)
 _bin_awk_mview_path  = @_PATH($bin_path, mview.awk)
 _bin_awk_pm_path     = @_PATH($bin_path, pm.awk)
 _bin_awk_post_path   = @_PATH($bin_path, post.awk)
-_bin_awk_posted_path   = @_PATH($bin_path, posted.awk)
+_bin_awk_posted_path = @_PATH($bin_path, posted.awk)
 _bin_awk_preview_path= @_PATH($bin_path, preview.awk)
 _bin_awk_upload_path = @_PATH($bin_path, upload.awk)
 _bin_awk_verify_path = @_PATH($bin_path, verify.awk)
 _bin_awk_view_path   = @_PATH($bin_path, view.awk)
+_bin_bot2_path       = @_PATH($bin_path, bot2)
 _bin_findpost_path   = @_PATH($bin_path, findpost)
 _bin_image_path      = @_PATH($bin_path, image)
 
@@ -35,21 +38,22 @@ _mem_last_path_3 = @_PATH($_mem_list_path, last)
 _mem_ok_path     = @_PATH($_mem_post_path, ok)
 _mem_pm_path     = @_PATH($_mem_post_path, pm)
 
-_mem_fail_path_ = @_PATH($_mem_fail_path,)
-_mem_list_path_ = @_PATH($_mem_list_path,)
-_mem_ok_path_   = @_PATH($_mem_ok_path,)
-_mem_pm_path_   = @_PATH($_mem_pm_path,)
-_mem_post_path_ = @_PATH($_mem_post_path,)
+_mem_fail_path_ = @_PATH($_mem_fail_path, )
+_mem_list_path_ = @_PATH($_mem_list_path, )
+_mem_ok_path_   = @_PATH($_mem_ok_path,   )
+_mem_pm_path_   = @_PATH($_mem_pm_path,   )
+_mem_post_path_ = @_PATH($_mem_post_path, )
 
-_tmp_bot3cook_path =  @_PATH($tmp_path, bot3cook)
-_tmp_bot3post_path =  @_PATH($tmp_path, bot3post)
-_tmp_bot3stop_path =  @_PATH($tmp_path, bot3stop)
-_tmp_bot3temp_path =  @_PATH($tmp_path, bot3temp)
+_tmp_bot3cook_path = @_PATH($tmp_path, bot3cook)
+_tmp_bot3post_path = @_PATH($tmp_path, bot3post)
+_tmp_bot3stop_path = @_PATH($tmp_path, bot3stop)
+_tmp_bot3temp_path = @_PATH($tmp_path, bot3temp)
 _tmp_np_path_0     = @_PATH($tmp_path, np.p0.)
 _tmp_np_path_1     = @_PATH($tmp_path, np.p1.)
 _tmp_np_path_2     = @_PATH($tmp_path, np.p2.)
 _tmp_np_path_3     = @_PATH($tmp_path, np.p3.)
 _tmp_stop_path     = @_PATH($tmp_path, fullstop.)
+_tmp_view_path     = @_PATH($tmp_path, view.)
 
 _www_att_path     = @_PATH($www_path, attachment)
 _www_av_path      = @_PATH($www_path, avatar)
@@ -69,42 +73,50 @@ _www_last_path    = @_PATH($_www_up_path, last)
 _www_np_top_path  = @_PATH($_www_up_path, top)
 _www_np_end_path  = @_PATH($_www_up_path, end)
 
-_www_att_path_    = @_PATH($_www_att_path,)
-_www_av_path_     = @_PATH($_www_av_path,)
-_www_img_path_    = @_PATH($_www_img_path,)
-_www_inf_path_    = @_PATH($_www_inf_path,)
-_www_list_path_   = @_PATH($_www_list_path,)
-_www_sig_path_    = @_PATH($_www_sig_path,)
-_www_up_path_     = @_PATH($_www_up_path,)
+_www_att_path_    = @_PATH($_www_att_path,  )
+_www_av_path_     = @_PATH($_www_av_path,   )
+_www_img_path_    = @_PATH($_www_img_path,  )
+_www_inf_path_    = @_PATH($_www_inf_path,  )
+_www_list_path_   = @_PATH($_www_list_path, )
+_www_sig_path_    = @_PATH($_www_sig_path,  )
+_www_up_path_     = @_PATH($_www_up_path,   )
 
 
-MAKE_CONFIGURE = CONFIGURE = $configure
-MAKE_TARGET    = TARGET    = $target
+MAKE_CONFIGURE = CONFIGURE =$configure
+MAKE_TARGET    = TARGET    =$target
 
-MAKE_PERL   = PERL   = $perl
-MAKE_RM     = RM     = $rm
+MAKE_PERL   = PERL=$perl
+MAKE_RM     = RM  =$rm
 
+MAKE_CC    = CC   =$CC
+MAKE_CF    = CF   =$CF
+MAKE_L_CGI = L_CGI=$L_CGI
 
-AWK_findpost_path  = \t@_AWK_DEFINE_STR(findpost_path, $_bin_findpost_path)
-AWK_fora           = \t@_AWK_DEFINE_STR(fora, $fora_addr)
+AWK_default_subject_encoded= \t@_AWK_DEFINE_STR(default_subject_encoded,$_default_subject_encoded)
+AWK_failpath       = \t@_AWK_DEFINE_STR(failpath,       $_mem_fail_path_)
+AWK_findpost_path  = \t@_AWK_DEFINE_STR(findpost_path,  $_bin_findpost_path)
+AWK_fora           = \t@_AWK_DEFINE_STR(fora,           $fora_addr)
 AWK_imgformat_path = \t@_AWK_DEFINE_STR(imgformat_path, $_bin_image_path)
-AWK_mv             = \t@_AWK_DEFINE_STR(mv, $mv)
-AWK_useragent_2    = \t@_AWK_DEFINE_STR(useragent, "$useragent2")
-AWK_useragent_3    = \t@_AWK_DEFINE_STR(useragent, "$useragent3")
-AWK_wayback        = \t@_AWK_DEFINE_STR(wayback, $wayback_addr)
-AWK_wget           = \t@_AWK_DEFINE_STR(wget, $wget)
+AWK_mv             = \t@_AWK_DEFINE_STR(mv,             $mv)
+AWK_mpostpath      = \t@_AWK_DEFINE_STR(mpostpath,      $_mem_post_path_)
+AWK_okpath         = \t@_AWK_DEFINE_STR(okpath,         $_mem_ok_path_)
+AWK_pmpath         = \t@_AWK_DEFINE_STR(pmpath,         $_mem_pm_path_)
+AWK_useragent_2    = \t@_AWK_DEFINE_STR(useragent,      "$useragent2")
+AWK_useragent_3    = \t@_AWK_DEFINE_STR(useragent,      "$useragent3")
+AWK_wayback        = \t@_AWK_DEFINE_STR(wayback,        $wayback_addr)
+AWK_wget           = \t@_AWK_DEFINE_STR(wget,           $wget)
 
 AWK_attachment_regexp = /$attachment_regexp/
 AWK_avatar_regexp     = /$avatar_regexp/
-AWK_bot3name_encoded  = $_bot3name_encoded
+AWK_bot3name_encoded  = @_ESCAPE($_bot3name_encoded)
 AWK_links_regexp      = /$links_regexp/
 AWK_own_image_regexp  = /$own_image_regexp/
-AWK_own_url_encoded   = $_own_url_encoded
+AWK_own_url_encoded   = @_ESCAPE($_own_url_encoded)
 AWK_prosilver_regexp  = /$prosilver_regexp/
 AWK_prosilver_regexp2 = /$prosilver_regexp2/
 AWK_smiley_regexp     = /$smiley_regexp/
 AWK_smiley_regexp2    = /$smiley_regexp2/
-AWK_thread_id         = $thread_id
+AWK_thread_id         = @_ESCAPE($thread_id)
 
 # data
 C_BOT3NAME_ENCODED   = @_C_DEFINE_STR(BOT3NAME_ENCODED,   $_bot3name_encoded)
@@ -138,15 +150,16 @@ C_PM_PATH_3     = @_C_DEFINE_STR(PM_PATH,       $_mem_pm_path_)
 C_POST_PATH_3   = @_C_DEFINE_STR(POST_PATH,     $_mem_post_path_)
 
 # dir-tmp
-C_COOKIE_PATH_3   = @_C_DEFINE_STR(COOKIE_PATH, $_tmp_bot3cook_path)
-C_NP_PATH_0       = @_C_DEFINE_STR(NP_PATH, $_tmp_np_path_0)
-C_NP_PATH_1       = @_C_DEFINE_STR(NP_PATH_1, $_tmp_np_path_1)
-C_NP_PATH_2       = @_C_DEFINE_STR(NP_PATH_2, $_tmp_np_path_2)
-C_NP_PATH_3       = @_C_DEFINE_STR(NP_PATH_3, $_tmp_np_path_3)
-C_POSTDATA_PATH_3 = @_C_DEFINE_STR(POSTDATA_PATH, $_tmp_bot3post_path)
-C_STOP_PATH       = @_C_DEFINE_STR(STOP_PATH, $_tmp_stop_path)
-C_STOP_PATH_3     = @_C_DEFINE_STR(STOP_PATH, $_tmp_bot3stop_path)
-C_TEMPFILE_PATH_3 = @_C_DEFINE_STR(TEMPFILE_PATH, $_tmp_bot3temp_path)
+C_COOKIE_PATH_3   = @_C_DEFINE_STR(COOKIE_PATH,  $_tmp_bot3cook_path)
+C_NP_PATH_0       = @_C_DEFINE_STR(NP_PATH,      $_tmp_np_path_0)
+C_NP_PATH_1       = @_C_DEFINE_STR(NP_PATH_1,    $_tmp_np_path_1)
+C_NP_PATH_2       = @_C_DEFINE_STR(NP_PATH_2,    $_tmp_np_path_2)
+C_NP_PATH_3       = @_C_DEFINE_STR(NP_PATH_3,    $_tmp_np_path_3)
+C_POSTDATA_PATH_3 = @_C_DEFINE_STR(POSTDATA_PATH,$_tmp_bot3post_path)
+C_STOP_PATH       = @_C_DEFINE_STR(STOP_PATH,    $_tmp_stop_path)
+C_STOP_PATH_3     = @_C_DEFINE_STR(STOP_PATH,    $_tmp_bot3stop_path)
+C_TEMP_PATH_VIEW  = @_C_DEFINE_STR(TEMP_PATH,    $_tmp_view_path)
+C_TEMPFILE_PATH_3 = @_C_DEFINE_STR(TEMPFILE_PATH,$_tmp_bot3temp_path)
 
 # dir-www
 C_ATT_PATH    = @_C_DEFINE_STR(ATT_PATH,    $_www_att_path_)
@@ -182,13 +195,14 @@ C_AWK_BOT2    = @_C_DEFINE_STR(AWK_BOT2,    $_bin_awk_bot2_path)
 C_AWK_INDEX   = @_C_DEFINE_STR(AWK_INDEX,   $_bin_awk_index_path)
 C_AWK_LATEST  = @_C_DEFINE_STR(AWK_LATEST,  $_bin_awk_latest_path)
 C_AWK_LIST    = @_C_DEFINE_STR(AWK_LIST,    $_bin_awk_list_path)
-C_AWK_MVIEW   = @_C_DEFINE_STR(AWK_MVIEw,   $_bin_awk_mview_path)
-C_AWK_PM      = @_C_DEFINE_STR(AWK_INDEX,   $_bin_awk_pm_path)
+C_AWK_MVIEW   = @_C_DEFINE_STR(AWK_MVIEW,   $_bin_awk_mview_path)
+C_AWK_PM      = @_C_DEFINE_STR(AWK_PM,      $_bin_awk_pm_path)
 C_AWK_POST    = @_C_DEFINE_STR(AWK_POST,    $_bin_awk_post_path)
 C_AWK_POSTED  = @_C_DEFINE_STR(AWK_POSTED,  $_bin_awk_posted_path)
 C_AWK_PREVIEW = @_C_DEFINE_STR(AWK_PREVIEW, $_bin_awk_preview_path)
 C_AWK_UPLOAD  = @_C_DEFINE_STR(AWK_UPLOAD,  $_bin_awk_upload_path)
 C_AWK_VERIFY  = @_C_DEFINE_STR(AWK_VERIFY,  $_bin_awk_verify_path)
 C_AWK_VIEW    = @_C_DEFINE_STR(AWK_VIEW,    $_bin_awk_view_path)
+C_BOT_PATH_2  = @_C_DEFINE_STR(BOT_PATH,    $_bin_bot2_path)
 
 C_ = @_C_DEFINE_STR(uvw, $xyz)
index 2b5e1f952499fa134b46d8a790eeaeb501a5e5ae..375e23d114ce55011036f6e4d1d39b857fa8edc2 100644 (file)
@@ -1,8 +1,8 @@
 // OTT mirror
-// Copyright (C) 2014 Balthasar Szczepański
-// update.cpp
+// Copyright (C) 2014, 2022 Balthasar Szczepański
+// update.cpp automatically generated from update.1.cpp
 // update a page.
-// 12.09.2014
+// 25.09.2022
 //
 // This file is part of OTT mirror.
 //
@@ -25,7 +25,7 @@
 #include <unistd.h>
 #include <sys/wait.h>
 
-###BOT_PATH
+// ###C_BOT_PATH_2: #define BOT_PATH "/eizm/pro/ottmirror/bot2"
 #define UPDATE_PATH "/ott/update.htm"
 
 int main()
index 93903822cea04aea8438985d3a75bd8e3488dc2e..12a4f7d70f6931e11b1a276c4ddc8d790a65efe4 100644 (file)
@@ -1,8 +1,8 @@
 // OTT mirror
-// Copyright (C) 2014 Balthasar Szczepański
-// view.cpp
+// Copyright (C) 2014, 2022 Balthasar Szczepański
+// view.cpp automatically generated from view.1.cpp
 // view a page.
-// 12.09.2014
+// 25.09.2022
 //
 // This file is part of OTT mirror.
 //
 #define CAT_PATH "/bin/cat"
 #define MAWK_PATH "/usr/bin/mawk"
 
-###NP_TOP_PATH
-###NP_END_PATH
-###UP_PATH
-###POSTLIST_PATH
-###SIG_PATHe
-###INF_PATHe
-###NP_LAST_PATH
-###MSTD_LAST_PATH
+// ###C_NP_TOP_PATH: #define NP_TOP_PATH "/eizm/www/time/ott/np/top"
+// ###C_NP_END_PATH: #define NP_END_PATH "/eizm/www/time/ott/np/end"
+// ###C_UP_PATH:     #define UP_PATH "/eizm/www/time/ott/np/"
+// ###C_LIST_PATH:   #define LIST_PATH "/eizm/www/time/ott/postlist/"
+// ###C_SIG_PATH:    #define SIG_PATH "sig=/eizm/www/time/ott/sig/"
+// ###C_INF_PATH:    #define INF_PATH "otterinf=/eizm/www/time/ott/otterinf/"
+// ###C_LAST_PAGE:   #define LAST_PAGE "/eizm/www/time/ott/np/last"
+// ###C_MLAST_PATH:  #define MLAST_PATH "/eizm/mem/ottmirror/mlist/last"
 
-###AWK_VIEW
-###TEMP_PATHv
+// ###C_AWK_VIEW:       #define AWK_VIEW "/eizm/pro/ottmirror/view.awk"
+// ###C_TEMP_PATH_VIEW: #define TEMP_PATH "/eizm/tmp/ottmirror/view."
 
 unsigned long p2np(unsigned long p)
 {
@@ -53,7 +53,7 @@ unsigned long p2np(unsigned long p)
        for(short i=31;i>=0;--i)
        {
                np2 = np + (1L << i);
-               sprintf(path,"%s%lu",POSTLIST_PATH,np2);
+               sprintf(path,"%s%lu",LIST_PATH,np2);
                file=fopen(path,"rt");
                if(file==NULL)
                        continue;
@@ -67,7 +67,7 @@ unsigned long p2np(unsigned long p)
        }
        if(np==0)
                return 1L;
-       sprintf(path,"%s%lu",POSTLIST_PATH,np);
+       sprintf(path,"%s%lu",LIST_PATH,np);
        file=fopen(path,"rt");
        if(file==NULL)
                return 1L;
@@ -79,7 +79,7 @@ unsigned long p2np(unsigned long p)
        }
        fclose(file);
        --np;
-       sprintf(path,"%s%lu",POSTLIST_PATH,np);
+       sprintf(path,"%s%lu",LIST_PATH,np);
        file=fopen(path,"rt");
        if(file==NULL)
                return 1L;
@@ -113,14 +113,14 @@ int main()
        
        cgi=cgiInit();
        
-       file = fopen(MSTD_LAST_PATH,"rt");
+       file = fopen(MLAST_PATH,"rt");
        if(file!=NULL)
        {
                mustard=true;
                fclose(file);
        }
        
-       file = fopen(NP_LAST_PATH,"rt");
+       file = fopen(LAST_PAGE,"rt");
        if(file!=NULL)
        {
                fscanf(file,"%lu",&last);