]> bicyclesonthemoon.info Git - ott/aftertime/commitdiff
Update from "pro" as of 26.03.2023 main
authorb <rowerynaksiezycu@gmail.com>
Sun, 26 Mar 2023 11:26:53 +0000 (13:26 +0200)
committerb <rowerynaksiezycu@gmail.com>
Sun, 26 Mar 2023 11:26:53 +0000 (13:26 +0200)
post.cpp
upload.awk
viewer.awk

index 4ccac67119e29cd107aa10e95dd182fd2821d24d..a5ebe16e02656abcb397dc3e71ac98d086354e2b 100644 (file)
--- a/post.cpp
+++ b/post.cpp
@@ -1,8 +1,7 @@
 // post.cpp (1190.bicyclesonthemoon.info/aftertime/post)\r
 // The post edit interface\r
 // post.cpp (1190.bicyclesonthemoon.info/aftertime/post)\r
 // The post edit interface\r
-// 15.04.2019\r
 // \r
 // \r
-// Copyright (C) 2015, 2019  Balthasar Szczepański\r
+// Copyright (C) 2015, 2019, 2023  Balthasar Szczepański\r
 // \r
 // This program is free software: you can redistribute it and/or modify\r
 // it under the terms of the GNU Affero General Public License as\r
 // \r
 // This program is free software: you can redistribute it and/or modify\r
 // it under the terms of the GNU Affero General Public License as\r
@@ -596,7 +595,7 @@ int main()
        {\r
                story=arg;\r
                if(!strcmp(story,"time")); //really shouldn't be hardcoded!\r
        {\r
                story=arg;\r
                if(!strcmp(story,"time")); //really shouldn't be hardcoded!\r
-               else if(!strcmp(story,"prickly"));
+               else if(!strcmp(story,"prickly"));\r
                else if(!strcmp(story,"potm"));\r
                else if(!strcmp(story,"lucky"));\r
                else if(!strcmp(story,"beany"));\r
                else if(!strcmp(story,"potm"));\r
                else if(!strcmp(story,"lucky"));\r
                else if(!strcmp(story,"beany"));\r
@@ -608,6 +607,7 @@ int main()
                else if(!strcmp(story,"bsta"));\r
                else if(!strcmp(story,"advent"));\r
                else if(!strcmp(story,"phys"));\r
                else if(!strcmp(story,"bsta"));\r
                else if(!strcmp(story,"advent"));\r
                else if(!strcmp(story,"phys"));\r
+               else if(!strcmp(story,"10y"));\r
                else\r
                {\r
                        missing=true;\r
                else\r
                {\r
                        missing=true;\r
index 728701dcb90d5ed1d2758b3d3fd420c62216d63b..bbeef829793049e5b3384b49508d06253247188f 100644 (file)
@@ -1,8 +1,7 @@
 #// upload.awk\r
 #// The post upload interface\r
 #// upload.awk\r
 #// The post upload interface\r
-#// 25.05.2021\r
 #// \r
 #// \r
-#// Copyright (C) 2015, 2019, 2021  Balthasar Szczepański\r
+#// Copyright (C) 2015, 2019, 2021, 2023  Balthasar Szczepański\r
 #// \r
 #// This program is free software: you can redistribute it and/or modify\r
 #// it under the terms of the GNU Affero General Public License as\r
 #// \r
 #// This program is free software: you can redistribute it and/or modify\r
 #// it under the terms of the GNU Affero General Public License as\r
@@ -374,7 +373,7 @@ function post(   postid,replaceid,postfile,passfile,replacefile,temp,i,eq,tn,tv,
                print "Story name missing."\r
                return\r
        }\r
                print "Story name missing."\r
                return\r
        }\r
-       if(story !~ /^(time|prickly|potm|lucky|beany|bean2|t1i|zodiac|bftf|t-1|bsta|advent|phys)$/) #this really shouldn't be hardcoded!\r
+       if(story !~ /^(time|prickly|potm|lucky|beany|bean2|t1i|zodiac|bftf|t-1|bsta|advent|phys|10y)$/) #this really shouldn't be hardcoded!\r
        {\r
                print "Unknown story."\r
                return\r
        {\r
                print "Unknown story."\r
                return\r
index 50e2713cbd8ba97fe652f2b92f9453069a02a202..4857297f1d6de7c718edc51aa8a11276982bee70 100644 (file)
@@ -1,8 +1,7 @@
 #// viewer.awk
 #// The viewer
 #// viewer.awk
 #// The viewer
-#// 25.05.2021
 #// 
 #// 
-#// Copyright (C) 2015-2021  Balthasar Szczepański
+#// Copyright (C) 2015-2021, 2023  Balthasar Szczepański
 #// 
 #// This program is free software: you can redistribute it and/or modify
 #// it under the terms of the GNU Affero General Public License as
 #// 
 #// This program is free software: you can redistribute it and/or modify
 #// it under the terms of the GNU Affero General Public License as
@@ -549,13 +548,13 @@ END{
                        print "<tr width=\""width"\"><td colspan=\"4\" width=\"100%\">"argtab["HTML"]"</td></tr>"
                }
                
                        print "<tr width=\""width"\"><td colspan=\"4\" width=\"100%\">"argtab["HTML"]"</td></tr>"
                }
                
-               for(i=-1; i<=n; ++i)
+               for(i=-1; i<=n+1; ++i)
                {
                {
+                       # print "<!-- ######## "i"######## -->" 
                        if(i<0)
                                noticepost=noticepath argtab["story"]"-i"
                        else
                        if(i<0)
                                noticepost=noticepath argtab["story"]"-i"
                        else
-                               noticepost=noticepath argtab["story"]"-"sprintf("%04u%s",f,s)"-"sprintf("%02u",i+1)
-                       # print "<!-- ######## "noticepost"######## -->" 
+                               noticepost=noticepath argtab["story"]"-"sprintf("%04u%s",f,s)"-"sprintf("%02u",i)
                        split("", noticetab, ":")
                        for(j=0;(getline line < noticepost)>0;++j)
                        {
                        split("", noticetab, ":")
                        for(j=0;(getline line < noticepost)>0;++j)
                        {
@@ -566,7 +565,7 @@ END{
                        close(noticepost)
                        if(j==0)
                        {
                        close(noticepost)
                        if(j==0)
                        {
-                               if(i<0)
+                               if(i<=0)
                                        continue;
                                else
                                        break;
                                        continue;
                                else
                                        break;
@@ -574,10 +573,10 @@ END{
                        if(i>=0)
                        {
                                nposttime=noticetab["y"]noticetab["m"]noticetab["d"]noticetab["h"]
                        if(i>=0)
                        {
                                nposttime=noticetab["y"]noticetab["m"]noticetab["d"]noticetab["h"]
-                               if (thistime<nposttime)
+                               if ((thistime<nposttime) && (i>0))
                                        break;
                        }
                                        break;
                        }
-                       if(i<n)
+                       if(i<=n)
                        {
                                if(i>=0)
                                        print "<tr width=\""width"\"><td colspan=\"4\" width=\"100%\"><i>"noticetab["subject_h"]"</i> "(noticetab["ID"]!=""?"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<a href=\"/ott/view?p="noticetab["ID"]"#p"noticetab["ID"]"\">OTT time travel</a>)":"")"</td></tr>"
                        {
                                if(i>=0)
                                        print "<tr width=\""width"\"><td colspan=\"4\" width=\"100%\"><i>"noticetab["subject_h"]"</i> "(noticetab["ID"]!=""?"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<a href=\"/ott/view?p="noticetab["ID"]"#p"noticetab["ID"]"\">OTT time travel</a>)":"")"</td></tr>"
@@ -585,7 +584,7 @@ END{
                        }
                        else
                        {
                        }
                        else
                        {
-                               print "<tr width=\""width"\" align=\"center\"><td colspan=\"4\" width=\"100%\"><a href=\"/aftertime/viewer?story="argtab["story"](max_enhance>0?"&amp;e="e:"")"&amp;f="f s"&amp;n="i+1"\">"noticetab["subject_h"]"</a></td></tr>"
+                               print "<tr width=\""width"\" align=\"center\"><td colspan=\"4\" width=\"100%\"><a href=\"/aftertime/viewer?story="argtab["story"](max_enhance>0?"&amp;e="e:"")"&amp;f="f s"&amp;n="i"\">"noticetab["subject_h"]"</a></td></tr>"
                        }
                }
                
                        }
                }