]> bicyclesonthemoon.info Git - ott/t1i/commitdiff
Update from src as of 15.11.2015 main
authorb <rowerynaksiezycu@gmail.com>
Sun, 15 Nov 2015 12:06:19 +0000 (12:06 +0000)
committerb <rowerynaksiezycu@gmail.com>
Sun, 15 Nov 2015 12:06:19 +0000 (12:06 +0000)
posted.awk
posted.c

index d66d381f661bfbe05c5160e421e8060d0e657977..d16478783c9c69a47b812159d84033a5ec961f7c 100644 (file)
@@ -1,6 +1,6 @@
 #// posted.awk\r
 #// Display one entry in the post list\r
 #// posted.awk\r
 #// Display one entry in the post list\r
-#// 25.04.2015\r
+#// 15.11.2015\r
 #// \r
 #// Copyright (C) 2015  Balthasar Szczepański\r
 #// \r
 #// \r
 #// Copyright (C) 2015  Balthasar Szczepański\r
 #// \r
@@ -24,7 +24,10 @@ BEGIN{
        {\r
                ch=sprintf("%c",i)\r
                hex=sprintf("%02X",i);\r
        {\r
                ch=sprintf("%c",i)\r
                hex=sprintf("%02X",i);\r
+               hexl=sprintf("%02x",i);\r
                ch2hex[ch]=hex\r
                ch2hex[ch]=hex\r
+               hex2ch[hex]=ch\r
+               hex2ch[hexl]=ch\r
        }\r
 };\r
 {\r
        }\r
 };\r
 {\r
@@ -33,7 +36,7 @@ BEGIN{
        argtab[substr($0,1,eq-1)]=substr($0,eq+1)\r
 };\r
 END{\r
        argtab[substr($0,1,eq-1)]=substr($0,eq+1)\r
 };\r
 END{\r
-       if(((pass,!=urldecode(argtab["password"]))||(name!=urldecode(argtab["username"])))&&cat!="st")\r
+       if(((pass!=urldecode(argtab["password"]))||(name!=urldecode(argtab["username"])))&&cat!="st")\r
                exit 1;\r
        if (r2==0)\r
                class="plw"\r
                exit 1;\r
        if (r2==0)\r
                class="plw"\r
index 08cf4fba8b7576b9f7a4e72fe9aebf4262577bbc..8ead0e0b707a81b7138b4de6a6cdc4cc8102cc63 100644 (file)
--- a/posted.c
+++ b/posted.c
@@ -106,12 +106,15 @@ int main(int argc, char **argv)
                        for(i=0; fgets(line,511,tempfile)!=NULL; ++i)\r
                        {\r
                                sscanf(line,"%s",filename);\r
                        for(i=0; fgets(line,511,tempfile)!=NULL; ++i)\r
                        {\r
                                sscanf(line,"%s",filename);\r
+                               //printf("+$%s\n",line);\r
                                sprintf(postpath,"%s%s",WAIT_PATH,filename);\r
                                \r
                                fflush(stdout);\r
                                sub=fork();\r
                                if(!sub)\r
                                {\r
                                sprintf(postpath,"%s%s",WAIT_PATH,filename);\r
                                \r
                                fflush(stdout);\r
                                sub=fork();\r
                                if(!sub)\r
                                {\r
+                                               //dup2(fileno(stdout),fileno(stderr));\r
+\r
                                        r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_POSTED,"-v",i&0x1?"r2=1":"r2=0","-v","cat=wt","-v",argp1,"-v",argp2,postpath,(char *)0);\r
                                        exit(r);\r
                                }\r
                                        r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_POSTED,"-v",i&0x1?"r2=1":"r2=0","-v","cat=wt","-v",argp1,"-v",argp2,postpath,(char *)0);\r
                                        exit(r);\r
                                }\r