_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)
_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)
_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)
_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)
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_)
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)
// 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)
{
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;
}
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;
}
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;
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);