]> bicyclesonthemoon.info Git - ott/mirror/commitdiff
fixed compile problems,
authorb <rowerynaksiezycu@gmail.com>
Sun, 25 Sep 2022 21:54:52 +0000 (21:54 +0000)
committerb <rowerynaksiezycu@gmail.com>
Sun, 25 Sep 2022 21:54:52 +0000 (21:54 +0000)
expanded build process

16 files changed:
bot2.1.cpp
bot3.1.cpp
findpost.1.cpp
makefile
makefile.1.mak
mpview.1.cpp
mview.1.cpp
post.1.cpp
posted.1.cpp
settings-release.txt
settings.txt
view.1.cpp
www/ott/end
www/ott/np/end
www/ott/post.htm
www/ott/prosilver/theme/forms.css [new file with mode: 0644]

index 225179b14bccb8b45c4d808f2538390a08e0a18a..90dfc07388797731a61e28282260de9a0b262840 100644 (file)
 // ###C_AWK_UPLOAD: #define AWK_UPLOAD "/eizm/pro/ottmirror/upload.awk"
 // ###C_AWK_INDEX:  #define AWK_INDEX "/eizm/pro/ottmirror/index.awk"
 
+# define N_STRBUF 256
+
 FILE *cwfile;
 FILE *stopfile;
 bool logopen=false;
-char stoppath[256];
-char nppath [256];
-char nppath1[256];
-char nppath2[256];
-char nppath3[256];
+char stoppath[N_STRBUF];
+char nppath [N_STRBUF];
+char nppath1[N_STRBUF];
+char nppath2[N_STRBUF];
+char nppath3[N_STRBUF];
 pid_t sub;
 int r;
 
@@ -112,15 +114,15 @@ int main(int argc, char *argv[])
        
        unsigned long i,np,last,last2;
        
-       char argp1 [256];
-       char argp2[256];
-       char argp3[256];
-       char argp4[256];
-       char argp5[256];
-       char argp6[256];
-       char argp7[256];
-       char temp   [256];
-       char URL    [256];
+       char argp1 [N_STRBUF];
+       char argp2[N_STRBUF];
+       char argp3[N_STRBUF];
+       char argp4[N_STRBUF];
+       char argp5[N_STRBUF];
+       char argp6[N_STRBUF];
+       char argp7[N_STRBUF];
+       char temp   [N_STRBUF];
+       char URL    [N_STRBUF];
        
        time(&t);
        opterr=0;
@@ -193,10 +195,10 @@ int main(int argc, char *argv[])
                offset=1;
        if(!fs)
        {
-               sprintf(argp1,"%s%hu",LAST_PATH,botID);
+               snprintf(argp1,N_STRBUF,"%s%hu",LAST_PATH,botID);
                if((cwfile=fopen(argp1,"rt"))!=NULL)
                {
-                       fgets(temp,255,cwfile);
+                       fgets(temp,N_STRBUF-1,cwfile);
                        sscanf(temp,"%lu",&start);
                        fclose(cwfile);
                        start=((start>offset)?(start+1-offset):1);
@@ -214,7 +216,7 @@ int main(int argc, char *argv[])
                avoid=0;
        if(!text)
        {
-               sprintf(argp1,"%s%hu",LOG_PATH,botID);
+               snprintf(argp1,N_STRBUF,"%s%hu",LOG_PATH,botID);
                if(freopen(argp1,newlog?"wt":"at",stdout)!=NULL)
                        logopen=true;
        }
@@ -225,11 +227,11 @@ int main(int argc, char *argv[])
        printf("ID=%hu, offset=%lu, start=%lu, max=%lu, NP wait=%lus, A wait=%lus, present=%s -%lu, save_avatars=%s, save_attachments=%s, save_otherimg=%s",botID,offset,start,max,npwait,await,(recentbot?"YES":"NO"),avoid,(down?"YES":"NO"),(down2?"YES":"NO"),(down3?"YES":"NO"));
        
        
-       sprintf(nppath ,"%s%hu",NP_PATH  ,botID);
-       sprintf(nppath1,"%s%hu",NP_PATH_1,botID);
-       sprintf(nppath2,"%s%hu",NP_PATH_2,botID);
-       sprintf(nppath3,"%s%hu",NP_PATH_3,botID);
-       sprintf(stoppath,"%s%hu",STOP_PATH,botID);
+       snprintf(nppath ,N_STRBUF,"%s%hu",NP_PATH  ,botID);
+       snprintf(nppath1,N_STRBUF,"%s%hu",NP_PATH_1,botID);
+       snprintf(nppath2,N_STRBUF,"%s%hu",NP_PATH_2,botID);
+       snprintf(nppath3,N_STRBUF,"%s%hu",NP_PATH_3,botID);
+       snprintf(stoppath,N_STRBUF,"%s%hu",STOP_PATH,botID);
        
        stopfile=fopen(stoppath,"wt");
        if (stopfile==NULL)
@@ -244,7 +246,7 @@ int main(int argc, char *argv[])
                        sleep(npwait);
                
                printf("\n%lu: np%lu",i,np);
-               sprintf(URL,"%s%lu",OTT_ADDRESS,(np-1)*40);
+               snprintf(URL,N_STRBUF,"%s%lu",OTT_ADDRESS,(np-1)*40);
                
                // download the newpage
                printf(" download");
@@ -269,7 +271,7 @@ int main(int argc, char *argv[])
                printf(".");
                
                // what's the last page and how many posts are there?
-               sprintf(argp1,"outfile=%s",nppath3);
+               snprintf(argp1,N_STRBUF,"outfile=%s",nppath3);
                sub=fork();
                if(!sub)
                {
@@ -299,7 +301,7 @@ int main(int argc, char *argv[])
                
                // List of posts
                // Yes, this could be done in the next script (It ewen was) but it has to be done BEFORE it.
-               sprintf(argp1,"outfile=%s%lu",LIST_PATH,np);
+               snprintf(argp1,N_STRBUF,"outfile=%s%lu",LIST_PATH,np);
                sub=fork();
                if(!sub)
                {
@@ -312,13 +314,13 @@ int main(int argc, char *argv[])
                printf(".");
                
                // relink, convert, download things
-               sprintf(argp1,"outfile=%s",nppath1);
-               sprintf(argp2,"tempfile=%s",nppath2);
-               sprintf(argp5,"imagepath=%s",IMG_PATH);
-               sprintf(argp3,"avatarpath=%s",AV_PATH);
-               sprintf(argp4,"attachmentpath=%s",ATT_PATH);
-               sprintf(argp6,"wait=%lu",await);
-               sprintf(argp7,"tempfile2=%s",nppath3);
+               snprintf(argp1,N_STRBUF,"outfile=%s",nppath1);
+               snprintf(argp2,N_STRBUF,"tempfile=%s",nppath2);
+               snprintf(argp5,N_STRBUF,"imagepath=%s",IMG_PATH);
+               snprintf(argp3,N_STRBUF,"avatarpath=%s",AV_PATH);
+               snprintf(argp4,N_STRBUF,"attachmentpath=%s",ATT_PATH);
+               snprintf(argp6,N_STRBUF,"wait=%lu",await);
+               snprintf(argp7,N_STRBUF,"tempfile2=%s",nppath3);
                sub=fork();
                if(!sub)
                {
@@ -331,9 +333,9 @@ int main(int argc, char *argv[])
                printf(".OK, upload");
                
                // upload the newpage
-               sprintf(argp1 ,"outfile=%s%lu",UP_PATH,np);
-               sprintf(argp2,"sig=%s",SIG_PATH);
-               sprintf(argp3,"otterinf=%s",INF_PATH);
+               snprintf(argp1,N_STRBUF,"outfile=%s%lu",UP_PATH,np);
+               snprintf(argp2,N_STRBUF,"sig=%s",SIG_PATH);
+               snprintf(argp3,N_STRBUF,"otterinf=%s",INF_PATH);
                
                sub=fork();
                if(!sub)
@@ -349,7 +351,7 @@ int main(int argc, char *argv[])
                if((np==last2)&&(!recentbot))
                        np=0L;
                
-               sprintf(argp1,"%s%hu",LAST_PATH,botID);
+               snprintf(argp1,N_STRBUF,"%s%hu",LAST_PATH,botID);
                if((cwfile=fopen(argp1,"wt"))!=NULL)
                {
                        fprintf(cwfile,"%lu\n",np);
@@ -380,7 +382,7 @@ int main(int argc, char *argv[])
                
                printf(" OK, prepare");
                // cut out only what's needed
-               sprintf(argp1,"outfile=%s",nppath3);
+               snprintf(argp1,N_STRBUF,"outfile=%s",nppath3);
                sub=fork();
                if(!sub)
                {
@@ -393,13 +395,13 @@ int main(int argc, char *argv[])
                printf(".");
                
                // relink
-               sprintf(argp1,"outfile=%s",IND_PATH);
-               sprintf(argp2,"tempfile=%s",nppath2);
-               sprintf(argp3,"avatarpath=%s",AV_PATH);
-               sprintf(argp5,"imagepath=%s",IMG_PATH);
-               sprintf(argp4,"attachmentpath=%s",ATT_PATH);
-               sprintf(argp6,"wait=%lu",await);
-               sprintf(argp7,"tempfile2=%s",nppath1);
+               snprintf(argp1,N_STRBUF,"outfile=%s",IND_PATH);
+               snprintf(argp2,N_STRBUF,"tempfile=%s",nppath2);
+               snprintf(argp3,N_STRBUF,"avatarpath=%s",AV_PATH);
+               snprintf(argp5,N_STRBUF,"imagepath=%s",IMG_PATH);
+               snprintf(argp4,N_STRBUF,"attachmentpath=%s",ATT_PATH);
+               snprintf(argp6,N_STRBUF,"wait=%lu",await);
+               snprintf(argp7,N_STRBUF,"tempfile2=%s",nppath1);
                sub=fork();
                if(!sub)
                {
index f6f406d618e8d2e1f441ebfbafd0d783cfdf969c..d3f8527a8f7ceeef39b70cad08b8e71c4233a382 100644 (file)
@@ -55,6 +55,8 @@
 // ###C_AWK_POST:  #define AWK_POST "/eizm/pro/ottmirror/post.awk"
 // ###C_AWK_PM:    #define AWK_PM "/eizm/pro/ottmirror/pm.awk"
 
+#define N_STRBUF 256
+
 FILE *cwfile;
 FILE *stopfile;
 FILE *listfile;
@@ -85,16 +87,16 @@ int main(int argc, char *argv[])
        unsigned long np, lastnp, firstnp, i;
        unsigned short p, lastp, firstp;
        
-       char name[256];
-       char pass[256];
-       char listpath[256];
-       char postpath[256];
-       char postname[256];
-       char argp1  [256];
-       char argp2[256];
-       char argp3[256];
-       char argp4[256];
-       char argp5[256];
+       char name[N_STRBUF];
+       char pass[N_STRBUF];
+       char listpath[N_STRBUF];
+       char postpath[N_STRBUF];
+       char postname[N_STRBUF];
+       char argp1  [N_STRBUF];
+       char argp2[N_STRBUF];
+       char argp3[N_STRBUF];
+       char argp4[N_STRBUF];
+       char argp5[N_STRBUF];
        
        time(&t);
        opterr=0;
@@ -156,11 +158,11 @@ int main(int argc, char *argv[])
        cwfile=fopen(NAME_PATH,"rt");
        if(cwfile==NULL)
                end(NAME_MSTD);
-       if(fgets(argp1,255,cwfile)!=NULL)
+       if(fgets(argp1,N_STRBUF-1,cwfile)!=NULL)
                sscanf(argp1,"%s",name);
        else
                end(NAME_MSTD);
-       if(fgets(argp1,255,cwfile)!=NULL)
+       if(fgets(argp1,N_STRBUF-1,cwfile)!=NULL)
                sscanf(argp1,"%s",pass);
        else
                end(NAME_MSTD);
@@ -169,11 +171,11 @@ int main(int argc, char *argv[])
        cwfile=fopen(LAST_PATH,"rt");
        if(cwfile==NULL)
                end(NOPOSTS);
-       if(fgets(argp1,255,cwfile)!=NULL)
+       if(fgets(argp1,N_STRBUF-1,cwfile)!=NULL)
                sscanf(argp1,"%lu",&lastnp);
        else
                end(NOPOSTS);
-       if(fgets(argp1,255,cwfile)!=NULL)
+       if(fgets(argp1,N_STRBUF-1,cwfile)!=NULL)
                sscanf(argp1,"%hu",&lastp);
        else
                end(NOPOSTS);
@@ -189,10 +191,10 @@ int main(int argc, char *argv[])
        }
        else
        {
-               if(fgets(argp1,255,cwfile)!=NULL)
+               if(fgets(argp1,N_STRBUF-1,cwfile)!=NULL)
                {
                        sscanf(argp1,"%lu",&firstnp);
-                       if(fgets(argp1,255,cwfile)!=NULL)
+                       if(fgets(argp1,N_STRBUF-1,cwfile)!=NULL)
                                sscanf(argp1,"%hu",&firstp);
                        else
                                firstp=0;
@@ -211,7 +213,7 @@ int main(int argc, char *argv[])
                p=0;
                printf("\nnp%lu:",np);
                
-               sprintf(listpath,"%s%lu",LIST_PATH,np);
+               snprintf(listpath,N_STRBUF,"%s%lu",LIST_PATH,np);
                listfile=fopen(listpath,"rt");
                if(listfile==NULL)
                {
@@ -220,7 +222,7 @@ int main(int argc, char *argv[])
                }
                listopen=true;
                
-               for(p=1;fgets(argp1,255,listfile)!=NULL;++p)
+               for(p=1;fgets(argp1,N_STRBUF-1,listfile)!=NULL;++p)
                {
                        if((np==firstnp&&p<=firstp)||(np==lastnp&&p>lastp))
                                continue;
@@ -229,12 +231,12 @@ int main(int argc, char *argv[])
                        sscanf(argp1,"%s",postname);
                        printf("\n%hu: m%s: ",p,postname);
                        
-                       sprintf(postpath,"%s%s",POST_PATH,postname);
-                       sprintf(argp1 ,"postfile=%s",POSTDATA_PATH);
-                       sprintf(argp2,"cookiefile=%s",COOKIE_PATH);
-                       sprintf(argp3,"tempfile=%s",TEMPFILE_PATH);
-                       sprintf(argp4,"name=%s",name);
-                       sprintf(argp5,"pass=%s",pass);
+                       snprintf(postpath,N_STRBUF,"%s%s",POST_PATH,postname);
+                       snprintf(argp1,N_STRBUF,"postfile=%s",POSTDATA_PATH);
+                       snprintf(argp2,N_STRBUF,"cookiefile=%s",COOKIE_PATH);
+                       snprintf(argp3,N_STRBUF,"tempfile=%s",TEMPFILE_PATH);
+                       snprintf(argp4,N_STRBUF,"name=%s",name);
+                       snprintf(argp5,N_STRBUF,"pass=%s",pass);
                        
                        sub=fork();
                        if(!sub)
@@ -342,10 +344,10 @@ int main(int argc, char *argv[])
        cwfile=fopen(LAST_PATH,"rt");
        if(cwfile!=NULL)
        {
-               if(fgets(argp1,255,cwfile)!=NULL)
+               if(fgets(argp1,N_STRBUF-1,cwfile)!=NULL)
                {
                        sscanf(argp1,"%lu",&np);
-                       if(fgets(argp1,255,cwfile)!=NULL)
+                       if(fgets(argp1,N_STRBUF-1,cwfile)!=NULL)
                        {
                                sscanf(argp1,"%hu",&p);
                                fclose(cwfile);
index 8392549fce4f925e305204d80ba821ee312387a5..dacd5f44e1e5034e9b976af39fe7b5a9147027fb 100644 (file)
@@ -21,6 +21,8 @@
 
 // ###C_LIST_PATH: #define LIST_PATH "/eizm/www/time/ott/postlist/"
 
+#define N_STRBUF 256
+
 #include <stdio.h>
 
 int main(int argc, char *argv[])
@@ -29,8 +31,8 @@ int main(int argc, char *argv[])
        unsigned long postnumber;
        unsigned long pagenumber=0;
        unsigned long pagenumber2;
-       char path[256];
-       char text[256];
+       char path[N_STRBUF];
+       char text[N_STRBUF];
        FILE *file;
        
        if (argc<2)
@@ -43,11 +45,11 @@ int main(int argc, char *argv[])
        for(short i=31;i>=0;--i)
        {
                pagenumber2 = pagenumber + (1L << i);
-               sprintf(path,"%s%lu",LIST_PATH,pagenumber2);
+               snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,pagenumber2);
                file=fopen(path,"rt");
                if(file==NULL)
                        continue;
-               fgets(text,255,file);
+               fgets(text,N_STRBUF-1,file);
                fclose(file);
                sscanf(text,"%lu",&postnumber);
                if(postnumber==to_find)
@@ -63,14 +65,14 @@ int main(int argc, char *argv[])
                printf("0\n");
                return 0;
        }
-       sprintf(path,"%s%lu",LIST_PATH,pagenumber);
+       snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,pagenumber);
        file=fopen(path,"rt");
        if(file==NULL)
        {
                printf("0\n");
                return 0;
        }
-       while(fgets(text,255,file)!=NULL ) 
+       while(fgets(text,N_STRBUF-1,file)!=NULL ) 
        {
                sscanf(text,"%lu",&postnumber);
                if(postnumber==to_find)
@@ -81,14 +83,14 @@ int main(int argc, char *argv[])
                }
        }
        fclose(file);
-       sprintf(path,"%s%lu",LIST_PATH,pagenumber-1);
+       snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,pagenumber-1);
        file=fopen(path,"rt");
        if(file==NULL)
        {
                printf("0\n");
                return 0;
        }
-       while(fgets(text,255,file)!=NULL ) 
+       while(fgets(text,N_STRBUF-1,file)!=NULL ) 
        {
                sscanf(text,"%lu",&postnumber);
                if(postnumber==to_find)
index 3b9dd37897a36705ec110417352079d57c35af4f..b01766f2aac3d8903327b00f112ac28ce0b51dd7 100644 (file)
--- a/makefile
+++ b/makefile
@@ -21,7 +21,7 @@
 
 
 CC   =g++
-CF   =-g -Wall
+CF   =-g -Wall -Wno-format-truncation
 L_CGI=-lcgi
 # AI=mawk -f
 
@@ -33,8 +33,30 @@ endif
 
 CONFIGFILE = settings-$(TARGET).txt settings.txt
 
-PERL=/usr/bin/perl
-RM  =/usr/bin/rm
+PERL =/usr/bin/perl
+MKDIR=/usr/bin/mkdir
+CP   =/usr/bin/cp
+RM   =/usr/bin/rm
+CHMOD=/usr/bin/chmod
+
+BIN_PATH      = /botm/bin/ottmirror
+LOG_PATH      = /botm/log/ottmirror
+MEM_PATH      = /botm/data/ottmirror
+MEM_LIST_PATH = /botm/data/ottmirror/mlist
+MEM_POST_PATH = /botm/data/ottmirror/mpost
+MEM_OK_PATH   = /botm/data/ottmirror/mpost/ok
+MEM_PM_PATH   = /botm/data/ottmirror/mpost/pm
+MEM_FAIL_PATH = /botm/data/ottmirror/mpost/fail
+TMP_PATH      = /botm/tmp/ottmirror
+WWW_PATH      = /botm/www/1190/ott
+WWW_ATT_PATH  = /botm/www/1190/ott/attachment
+WWW_AV_PATH   = /botm/www/1190/ott/avatar
+WWW_IMG_PATH  = /botm/www/1190/ott/image
+WWW_INF_PATH  = /botm/www/1190/ott/otterinf
+WWW_LIST_PATH = /botm/www/1190/ott/postlist
+WWW_SIG_PATH  = /botm/www/1190/ott/sig
+WWW_UP_PATH   = /botm/www/1190/ott/np
+
 
 # The configuration tool
 # http://bicyclesonthemoon.info/git/botm-config 
@@ -91,6 +113,67 @@ redirect\
 update\
 view
 
+SETUID=\
+post\
+update\
+view\
+mview\
+posted\
+mpview
+
+BIN=\
+bb2html.awk\
+bot2\
+bot2.awk\
+bot3\
+bot3.cpp\
+findlatest.awk\
+findpost\
+image\
+index\
+index.awk\
+list.awk\
+mpview\
+mview\
+mview.awk\
+mview.cpp\
+pm.awk\
+post\
+post.awk\
+posted\
+posted.awk\
+preview.awk\
+redirect\
+update\
+upload.awk\
+verify.awk\
+view\
+view.awk
+
+DIR=\
+$(BIN_PATH)\
+$(LOG_PATH)\
+$(MEM_PATH)\
+$(MEM_LIST_PATH)\
+$(MEM_POST_PATH)\
+$(MEM_OK_PATH)\
+$(MEM_PM_PATH)\
+$(MEM_FAIL_PATH)\
+$(TMP_PATH)\
+$(WWW_PATH)\
+$(WWW_ATT_PATH)\
+$(WWW_AV_PATH)\
+$(WWW_IMG_PATH)\
+$(WWW_INF_PATH)\
+$(WWW_LIST_PATH)\
+$(WWW_SIG_PATH)\
+$(WWW_UP_PATH)\
+
+
+HIDDEN_DIR=\
+$(TMP_PATH)\
+$(MEM_POST_PATH)
+
 all: $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
        
 
@@ -106,95 +189,27 @@ $(PROGR_NORMAL): %: %.cpp
 $(PROGR_CGI): %: %.cpp
        $(CC) $(CF) -o $@ $< $(L_CGI)
 
-clean:
-       $(RM) -f $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
-
-PHONY: all clean
-
-# all: bot2 bot3 findpost image view mview mpview index update post posted redirect enable
-
-# bot2: bot2.cpp bot2.awk findlatest.awk list.awk upload.awk index.awk makefile
-       # $(CC) $(CF) -o bot2 bot2.cpp
-
-# bot3: bot3.cpp post.awk pm.awk makefile
-       # $(CC) $(CF) -o bot3 bot3.cpp
-
-# findpost: findpost.cpp makefile
-       # $(CC) $(CF) -o findpost findpost.cpp
-
-# image: image.cpp makefile
-       # $(CC) $(CF) -o image image.cpp
-
-# view: view.cpp view.awk makefile
-       # $(CC) $(CF) -o view view.cpp $(LF1)
-
-# mview: mview.cpp view.awk mview.awk makefile
-       # $(CC) $(CF) -o mview mview.cpp $(LF1)
-
-# mpview: mpview.cpp view.awk mview.awk makefile
-       # $(CC) $(CF) -o mpview mpview.cpp $(LF1)
-
-# update: update.cpp bot2 makefile
-       # $(CC) $(CF) -o update update.cpp $(LF1)
-
-# index: index.cpp makefile
-       # $(CC) $(CF) -o index index.cpp $(LF1)
-
-# post: post.cpp preview.awk view.awk bb2html.awk verify.awk makefile
-       # $(CC) $(CF) -o post post.cpp $(LF1)
+setuid: $(SETUID)
+       $(CHMOD) u+s $(SETUID)
 
-# posted: posted.cpp posted.awk makefile
-       # $(CC) $(CF) -o posted posted.cpp $(LF1)
+mktree:
+       $(MKDIR) -p $(DIR)
+       $(CHMOD) g-r,g-w,g-x,o-r,o-w,o-x $(HIDDEN_DIR)
 
-# redirect: redirect.cpp makefile
-       # $(CC) $(CF) -o redirect redirect.cpp $(LF1)
-
-# enable: post update view mview posted mpview
-       # chmod u+s post update view mview posted mpview
+cp_bin: $(BIN) setuid | mktree
+       $(CP) $(BIN) $(BIN_PATH)
 
+cp_www: | mktree
+       $(CP) -r www/ott/* $(WWW_PATH)
 
+install: cp_bin cp_www
        
-# bot2.cpp: bot2.1.cpp re.awk makefile
-       # $(AI) re.awk bot2.1.cpp > bot2.cpp
-
-# bot3.cpp: bot3.1.cpp re.awk makefile
-       # $(AI) re.awk bot3.1.cpp > bot3.cpp
-
-# findpost.cpp: findpost.1.cpp re.awk makefile
-       # $(AI) re.awk findpost.1.cpp > findpost.cpp
-
-# index.cpp: index.1.cpp re.awk makefile
-       # $(AI) re.awk index.1.cpp > index.cpp
-
-# mview.cpp: mview.1.cpp re.awk makefile
-       # $(AI) re.awk mview.1.cpp > mview.cpp
-
-# mpview.cpp: mpview.1.cpp re.awk makefile
-       # $(AI) re.awk mpview.1.cpp > mpview.cpp
-
-# post.cpp: post.1.cpp re.awk makefile
-       # $(AI) re.awk post.1.cpp > post.cpp
 
-# posted.cpp: posted.1.cpp re.awk makefile
-       # $(AI) re.awk posted.1.cpp > posted.cpp
-
-# update.cpp: update.1.cpp re.awk makefile
-       # $(AI) re.awk update.1.cpp > update.cpp
-
-# view.cpp: view.1.cpp re.awk makefile
-       # $(AI) re.awk view.1.cpp > view.cpp
-
-# bot2.awk: bot2.1.awk re.awk makefile
-       # $(AI) re.awk bot2.1.awk > bot2.awk
+clean:
+       $(RM) -f $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
 
-# index.awk: index.1.awk re.awk makefile
-       # $(AI) re.awk index.1.awk > index.awk
+PHONY: all clean setuid mktree cp_bin cp_www install
 
-# pm.awk: pm.1.awk re.awk makefile
-       # $(AI) re.awk pm.1.awk > pm.awk
+# all: bot2 bot3 findpost image view mview mpview index update post posted redirect enable
 
-# post.awk: post.1.awk re.awk makefile
-       # $(AI) re.awk post.1.awk > post.awk
 
-# preview.awk: preview.1.awk re.awk makefile
-       # $(AI) re.awk preview.1.awk > preview.awk
index cba95cd503bf9f39c149641828e7f8ea1bf37307..b789fd5f4ef1cc6576910ef9f9e9bb78bf63a5e5 100644 (file)
@@ -33,8 +33,30 @@ endif
 
 CONFIGFILE = settings-$(TARGET).txt settings.txt
 
-###MAKE_PERL: PERL = perl
-###MAKE_RM:   RM   = rm
+###MAKE_PERL:  PERL  = perl
+###MAKE_MKDIR: MKDIR = mkdir
+###MAKE_CP:    CP    = rm
+###MAKE_RM:    RM    = rm
+###MAKE_CHMOD: CHMOD = chmod
+
+###MAKE_BIN_PATH:      BIN_PATH      = /botm/bin/ottmirror
+###MAKE_LOG_PATH:      LOG_PATH      = /botm/log/ottmirror
+###MAKE_MEM_PATH:      MEM_PATH      = /botm/data/ottmirror
+###MAKE_MEM_LIST_PATH: MEM_LIST_PATH = /botm/data/ottmirror/mlist
+###MAKE_MEM_POST_PATH: MEM_POST_PATH = /botm/data/ottmirror/mpost
+###MAKE_MEM_OK_PATH:   MEM_OK_PATH   = /botm/data/ottmirror/mpost/ok
+###MAKE_MEM_PM_PATH:   MEM_PM_PATH   = /botm/data/ottmirror/mpost/pm
+###MAKE_MEM_FAIL_PATH: MEM_FAIL_PATH = /botm/data/ottmirror/mpost/fail
+###MAKE_TMP_PATH:      TMP_PATH      = /botm/tmp/ottmirror
+###MAKE_WWW_PATH:      WWW_PATH      = /botm/www/1190/ott
+###MAKE_WWW_ATT_PATH:  WWW_ATT_PATH  = /botm/www/1190/ott/attachment
+###MAKE_WWW_AV_PATH:   WWW_AV_PATH   = /botm/www/1190/ott/avatar
+###MAKE_WWW_IMG_PATH:  WWW_IMG_PATH  = /botm/www/1190/ott/image
+###MAKE_WWW_INF_PATH:  WWW_INF_PATH  = /botm/www/1190/ott/otterinf
+###MAKE_WWW_LIST_PATH: WWW_LIST_PATH = /botm/www/1190/ott/postlist
+###MAKE_WWW_SIG_PATH:  WWW_SIG_PATH  = /botm/www/1190/ott/sig
+###MAKE_WWW_UP_PATH:   WWW_UP_PATH   = /botm/www/1190/ott/np
+
 
 # The configuration tool
 # http://bicyclesonthemoon.info/git/botm-config 
@@ -91,6 +113,67 @@ redirect\
 update\
 view
 
+SETUID=\
+post\
+update\
+view\
+mview\
+posted\
+mpview
+
+BIN=\
+bb2html.awk\
+bot2\
+bot2.awk\
+bot3\
+bot3.cpp\
+findlatest.awk\
+findpost\
+image\
+index\
+index.awk\
+list.awk\
+mpview\
+mview\
+mview.awk\
+mview.cpp\
+pm.awk\
+post\
+post.awk\
+posted\
+posted.awk\
+preview.awk\
+redirect\
+update\
+upload.awk\
+verify.awk\
+view\
+view.awk
+
+DIR=\
+$(BIN_PATH)\
+$(LOG_PATH)\
+$(MEM_PATH)\
+$(MEM_LIST_PATH)\
+$(MEM_POST_PATH)\
+$(MEM_OK_PATH)\
+$(MEM_PM_PATH)\
+$(MEM_FAIL_PATH)\
+$(TMP_PATH)\
+$(WWW_PATH)\
+$(WWW_ATT_PATH)\
+$(WWW_AV_PATH)\
+$(WWW_IMG_PATH)\
+$(WWW_INF_PATH)\
+$(WWW_LIST_PATH)\
+$(WWW_SIG_PATH)\
+$(WWW_UP_PATH)\
+
+
+HIDDEN_DIR=\
+$(TMP_PATH)\
+$(MEM_POST_PATH)
+
 all: $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
        
 
@@ -106,95 +189,27 @@ $(PROGR_NORMAL): %: %.cpp
 $(PROGR_CGI): %: %.cpp
        $(CC) $(CF) -o $@ $< $(L_CGI)
 
-clean:
-       $(RM) -f $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
-
-PHONY: all clean
-
-# all: bot2 bot3 findpost image view mview mpview index update post posted redirect enable
-
-# bot2: bot2.cpp bot2.awk findlatest.awk list.awk upload.awk index.awk makefile
-       # $(CC) $(CF) -o bot2 bot2.cpp
-
-# bot3: bot3.cpp post.awk pm.awk makefile
-       # $(CC) $(CF) -o bot3 bot3.cpp
-
-# findpost: findpost.cpp makefile
-       # $(CC) $(CF) -o findpost findpost.cpp
-
-# image: image.cpp makefile
-       # $(CC) $(CF) -o image image.cpp
-
-# view: view.cpp view.awk makefile
-       # $(CC) $(CF) -o view view.cpp $(LF1)
-
-# mview: mview.cpp view.awk mview.awk makefile
-       # $(CC) $(CF) -o mview mview.cpp $(LF1)
-
-# mpview: mpview.cpp view.awk mview.awk makefile
-       # $(CC) $(CF) -o mpview mpview.cpp $(LF1)
-
-# update: update.cpp bot2 makefile
-       # $(CC) $(CF) -o update update.cpp $(LF1)
-
-# index: index.cpp makefile
-       # $(CC) $(CF) -o index index.cpp $(LF1)
-
-# post: post.cpp preview.awk view.awk bb2html.awk verify.awk makefile
-       # $(CC) $(CF) -o post post.cpp $(LF1)
+setuid: $(SETUID)
+       $(CHMOD) u+s $(SETUID)
 
-# posted: posted.cpp posted.awk makefile
-       # $(CC) $(CF) -o posted posted.cpp $(LF1)
+mktree:
+       $(MKDIR) -p $(DIR)
+       $(CHMOD) g-r,g-w,g-x,o-r,o-w,o-x $(HIDDEN_DIR)
 
-# redirect: redirect.cpp makefile
-       # $(CC) $(CF) -o redirect redirect.cpp $(LF1)
-
-# enable: post update view mview posted mpview
-       # chmod u+s post update view mview posted mpview
+cp_bin: $(BIN) setuid | mktree
+       $(CP) $(BIN) $(BIN_PATH)
 
+cp_www: | mktree
+       $(CP) -r www/ott/* $(WWW_PATH)
 
+install: cp_bin cp_www
        
-# bot2.cpp: bot2.1.cpp re.awk makefile
-       # $(AI) re.awk bot2.1.cpp > bot2.cpp
-
-# bot3.cpp: bot3.1.cpp re.awk makefile
-       # $(AI) re.awk bot3.1.cpp > bot3.cpp
-
-# findpost.cpp: findpost.1.cpp re.awk makefile
-       # $(AI) re.awk findpost.1.cpp > findpost.cpp
-
-# index.cpp: index.1.cpp re.awk makefile
-       # $(AI) re.awk index.1.cpp > index.cpp
-
-# mview.cpp: mview.1.cpp re.awk makefile
-       # $(AI) re.awk mview.1.cpp > mview.cpp
-
-# mpview.cpp: mpview.1.cpp re.awk makefile
-       # $(AI) re.awk mpview.1.cpp > mpview.cpp
-
-# post.cpp: post.1.cpp re.awk makefile
-       # $(AI) re.awk post.1.cpp > post.cpp
 
-# posted.cpp: posted.1.cpp re.awk makefile
-       # $(AI) re.awk posted.1.cpp > posted.cpp
-
-# update.cpp: update.1.cpp re.awk makefile
-       # $(AI) re.awk update.1.cpp > update.cpp
-
-# view.cpp: view.1.cpp re.awk makefile
-       # $(AI) re.awk view.1.cpp > view.cpp
-
-# bot2.awk: bot2.1.awk re.awk makefile
-       # $(AI) re.awk bot2.1.awk > bot2.awk
+clean:
+       $(RM) -f $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
 
-# index.awk: index.1.awk re.awk makefile
-       # $(AI) re.awk index.1.awk > index.awk
+PHONY: all clean setuid mktree cp_bin cp_www install
 
-# pm.awk: pm.1.awk re.awk makefile
-       # $(AI) re.awk pm.1.awk > pm.awk
+# all: bot2 bot3 findpost image view mview mpview index update post posted redirect enable
 
-# post.awk: post.1.awk re.awk makefile
-       # $(AI) re.awk post.1.awk > post.awk
 
-# preview.awk: preview.1.awk re.awk makefile
-       # $(AI) re.awk preview.1.awk > preview.awk
index ebc69a1a73dc159c1378d5791a06c1cbe443eb62..26378b11bfe7edf4578339188122107f84cab0e3 100644 (file)
 // ###POSTLIST_PATH3
 // ###LAST_PATH3
 
-// ###C_AWK_VIEW:  #define AWK_VIEW "/eizm/pro/ottmirror/view.awk"
-// ###C_AWK_MVIEW: #define AWK_MVIEW "/eizm/pro/ottmirror/mview.awk"
-// ###TEMP_PATHm
+// ###C_AWK_VIEW:         #define AWK_VIEW "/eizm/pro/ottmirror/view.awk"
+// ###C_AWK_MVIEW:        #define AWK_MVIEW "/eizm/pro/ottmirror/mview.awk"
+// ###C_TEMP_PATH_MPVIEW: #define TEMP_PATH "/eizm/tmp/ottmirror/mpview."
+
+#define N_STRBUF    256
+#define N_STRBUF_SH  32
 
 int main()
 {
@@ -49,62 +52,62 @@ int main()
        pid_t sub;
        int r;
        
-       char line[32];
-       char filename[32];
-       char postpath[256];
+       char line[N_STRBUF_SH];
+       char filename[N_STRBUF_SH];
+       char postpath[N_STRBUF];
        char cat[8];
        
        char *arg;
        
-       char path2[256];
-       char left[256];
-       char right[256];
-       char links[256];
+       char path2[N_STRBUF];
+       char left[N_STRBUF];
+       char right[N_STRBUF];
+       char links[N_STRBUF];
        
        cgi=cgiInit();
        
        printf("Content-type: text/html\n\n");
        
        arg=cgiGetValue(cgi,"v");
-       sprintf(line,"%s",arg?arg:"???");
+       snprintf(line,N_STRBUF_SH,"%s",arg?arg:"???");
        if(line[0]=='m')
        {
-               sprintf(filename,"%s",line+1);
-               sprintf(cat,"t=%s","m");
-               sprintf(postpath,"%s%s",POST_PATH,filename);
+               snprintf(filename,N_STRBUF_SH,"%s",line+1);
+               snprintf(cat,8,"t=%s","m");
+               snprintf(postpath,N_STRBUF,"%s%s",POST_PATH,filename);
        }
        else if(line[0]=='o' && line[1]=='k')
        {
-               sprintf(filename,"%s",line+2);
-               sprintf(cat,"cat=%s","ok");
-               sprintf(postpath,"%s%s",OK_PATH,filename);
+               snprintf(filename,N_STRBUF_SH,"%s",line+2);
+               snprintf(cat,8,"cat=%s","ok");
+               snprintf(postpath,N_STRBUF,"%s%s",OK_PATH,filename);
        }
        else if(line[0]=='p' && line[1]=='m')
        {
-               sprintf(filename,"%s",line+2);
-               sprintf(cat,"cat=%s","pm");
-               sprintf(postpath,"%s%s",PM_PATH,filename);
+               snprintf(filename,N_STRBUF_SH,"%s",line+2);
+               snprintf(cat,8,"cat=%s","pm");
+               snprintf(postpath,N_STRBUF,"%s%s",PM_PATH,filename);
        }
        else if(line[0]=='f' && line[1]=='l')
        {
-               sprintf(filename,"%s",line+2);
-               sprintf(cat,"cat=%s","fl");
-               sprintf(postpath,"%s%s",FAIL_PATH,filename);
+               snprintf(filename,N_STRBUF_SH,"%s",line+2);
+               snprintf(cat,8,"cat=%s","fl");
+               snprintf(postpath,N_STRBUF,"%s%s",FAIL_PATH,filename);
        }
        else 
        {
-               sprintf(filename,"%s","???");
-               sprintf(postpath,"%s","???");
-               sprintf(cat,"cat=%s","???");
+               snprintf(filename,N_STRBUF_SH,"%s","???");
+               snprintf(postpath,N_STRBUF_SH,"%s","???");
+               snprintf(cat,8,"cat=%s","???");
        }
        
        
-       sprintf(right,"%s","right=<!-- -->");
+       snprintf(right,N_STRBUF,"%s","right=<!-- -->");
        
-       sprintf(left,"%s","left=<!-- -->");
+       snprintf(left,N_STRBUF,"%s","left=<!-- -->");
        
-       sprintf(path2,"%s%lu",TEMP_PATH,(unsigned long)getpid());
-       sprintf(links,"%s","links=<!-- -->");
+       snprintf(path2,N_STRBUF,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+       snprintf(links,N_STRBUF,"%s","links=<!-- -->");
        
        fflush(stdout);
        sub=fork();
index 71c9270d288ec3fdb519cfeda867809cfb5e4aa6..66ddcbab149b0f03ba8747a4bed6c7661d95718f 100644 (file)
 // ###C_LIST_PATH_3: #define LIST_PATH "/eizm/mem/ottmirror/mlist/"
 // ###C_LAST_PATH_3: #define LAST_PATH "/eizm/mem/ottmirror/mlist/last"
 
-// ###C_AWK_VIEW:  AWK_VIEW "/eizm/pro/ottmirror/view.awk"
-// ###C_AWK_MVIEW: AWK_MVIEW "/eizm/pro/ottmirror/mview.awk"
-// ###TEMP_PATH3v
+// ###C_AWK_VIEW:        #define AWK_VIEW "/eizm/pro/ottmirror/view.awk"
+// ###C_AWK_MVIEW:       #define AWK_MVIEW "/eizm/pro/ottmirror/mview.awk"
+// ###C_TEMP_PATH_MVIEW: #define TEMP_PATH "/eizm/tmp/ottmirror/mview."
+
+#define N_STRBUF    256
+#define N_STRBUF_SHH 16
 
 unsigned long p2np(unsigned long p)
 {
        FILE *file;
-       char path[256];
-       char text[256];
+       char path[N_STRBUF];
+       char text[N_STRBUF];
        unsigned long np=0;
        unsigned long np2;
        unsigned long pp;
@@ -52,11 +55,11 @@ unsigned long p2np(unsigned long p)
        for(short i=31;i>=0;--i)
        {
                np2 = np + (1L << i);
-               sprintf(path,"%s%lu",LIST_PATH,np2);
+               snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,np2);
                file=fopen(path,"rt");
                if(file==NULL)
                        continue;
-               fgets(text,255,file);
+               fgets(text,N_STRBUF-1,file);
                fclose(file);
                sscanf(text,"%lu",&pp);
                if(pp==p)
@@ -66,11 +69,11 @@ unsigned long p2np(unsigned long p)
        }
        if(np==0)
                return 1L;
-       sprintf(path,"%s%lu",LIST_PATH,np);
+       snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,np);
        file=fopen(path,"rt");
        if(file==NULL)
                return 1L;
-       while(fgets(text,255,file)!=NULL)
+       while(fgets(text,N_STRBUF-1,file)!=NULL)
        {
                sscanf(text,"%lu",&pp);
                if(pp==p)
@@ -78,11 +81,11 @@ unsigned long p2np(unsigned long p)
        }
        fclose(file);
        --np;
-       sprintf(path,"%s%lu",LIST_PATH,np);
+       snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,np);
        file=fopen(path,"rt");
        if(file==NULL)
                return 1L;
-       while(fgets(text,255,file)!=NULL)
+       while(fgets(text,N_STRBUF-1,file)!=NULL)
        {
                sscanf(text,"%lu",&pp);
                if(pp==p)
@@ -97,13 +100,13 @@ int main()
        int r;
        
        char *arg;
-       char path[256];
-       char bg[16];
-       char page[16];
-       char path2[256];
-       char left[256];
-       char right[256];
-       char links[256];
+       char path[N_STRBUF];
+       char bg[N_STRBUF_SHH];
+       char page[N_STRBUF_SHH];
+       char path2[N_STRBUF];
+       char left[N_STRBUF];
+       char right[N_STRBUF];
+       char links[N_STRBUF];
        FILE *file;
        unsigned long np=1L;
        unsigned long start=0L;
@@ -124,7 +127,7 @@ int main()
        else
        {
                printf("Content-type: text/html\nStatus: 404 Not Found\n\n");
-               sprintf(path,"info=<p>There are no posts in this Otherthread.<br /><br /><a href=\"/ott/\">Return to the Ð¯OЯЯIM TTO</a></p>");
+               snprintf(path,N_STRBUF,"info=<p>There are no posts in this Otherthread.<br /><br /><a href=\"/ott/\">Return to the Ð¯OЯЯIM TTO</a></p>");
                
                fflush(stdout);
                sub=fork();
@@ -167,16 +170,16 @@ int main()
        if(np>last)
                np=last;
        if(np<last)
-               sprintf(right,"right=<a href=\\\"/ott/mview?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
+               snprintf(right,N_STRBUF,"right=<a href=\\\"/ott/mview?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
        else
-               sprintf(right,"%s","right=<!-- -->");
+               snprintf(right,N_STRBUF,"%s","right=<!-- -->");
        if(np>1)
-               sprintf(left,"left=<a href=\\\"/ott/mview?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
+               snprintf(left,N_STRBUF,"left=<a href=\\\"/ott/mview?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
        else
-               sprintf(left,"%s","left=<!-- -->");
+               snprintf(left,N_STRBUF,"%s","left=<!-- -->");
        
-       sprintf(path2,"%s%lu",TEMP_PATH,(unsigned long)getpid());
-       sprintf(links,"links=%s",path2);
+       snprintf(path2,N_STRBUF,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+       snprintf(links,N_STRBUF,"links=%s",path2);
        file=fopen(path2,"wt");
        if(file!=NULL)
        {
@@ -214,16 +217,16 @@ int main()
        if(r)
                printf("<p>Ch*rpin* M*stard</p>");
                
-       sprintf(path2,"%s%lu",LIST_PATH,np);
+       snprintf(path2,N_STRBUF,"%s%lu",LIST_PATH,np);
        file=fopen(path2,"rt");
        if(file!=NULL)
        {
-               for(unsigned short i=0;fgets(path,255,file)!=NULL;++i)
+               for(unsigned short i=0;fgets(path,N_STRBUF-1,file)!=NULL;++i)
                {
                        sscanf(path,"%s",path2);
-                       sprintf(path,"%s%s",POST_PATH,path2);
-                       sprintf(bg,"bg=%hu",2-(i&1));
-                       sprintf(page,"np=%lu",np);
+                       snprintf(path,N_STRBUF,"%s%s",POST_PATH,path2);
+                       snprintf(bg,N_STRBUF_SHH,"bg=%hu",2-(i&1));
+                       snprintf(page,N_STRBUF_SHH,"np=%lu",np);
                        
                        fflush(stdout);
                        sub=fork();
@@ -263,7 +266,7 @@ int main()
        if(r)
                printf("<p>Ch*rpin* M*stard</p>");
        
-       sprintf(path2,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+       snprintf(path2,N_STRBUF,"%s%lu",TEMP_PATH,(unsigned long)getpid());
        fflush(stdout);
        sub=fork();
        if(sub==0)
index fd6aa8fd45c9927e5a89c660c9cdac83c3071a7b..185e5473fbd4ccf22104a09e213522af8c3e1547 100644 (file)
 // ###C_MLAST_PATH:  #define MLAST_PATH "/eizm/mem/ottmirror/mlist/last"
 // ###C_MFRONT_PATH: #define MFRONT_PATH "/eizm/www/time/ott/mfront"
 
-// ###C_AWK_PREVIEW: AWK_PREVIEW "/eizm/pro/ottmirror/preview.awk"
-// ###C_AWK_VIEW:    AWK_VIEW "/eizm/pro/ottmirror/view.awk"
-// ###TEMP_PATHp
-// ###C_AWK_B2H:     AWK_B2H "/eizm/pro/ottmirror/bb2html.awk"
-// ###C_AWK_VERIFY:  AWK_VERIFY "/eizm/pro/ottmirror/verify.awk"
+// ###C_AWK_PREVIEW:       #define AWK_PREVIEW "/eizm/pro/ottmirror/preview.awk"
+// ###C_AWK_VIEW:          #define AWK_VIEW "/eizm/pro/ottmirror/view.awk"
+// ###C_TEMP_PATH_PREVIEW: #define TEMP_PATH "/eizm/tmp/ottmirror/preview."
+// ###C_AWK_B2H:           #define AWK_B2H "/eizm/pro/ottmirror/bb2html.awk"
+// ###C_AWK_VERIFY:        #define AWK_VERIFY "/eizm/pro/ottmirror/verify.awk"
 
 // ###C_BOT3NAME_ENCODED: #define BOT3NAME_ENCODED "bothasar_p"
 // ###C_BOT3_URL: #define BOT3_URL "http://1190.bicyclesonthemoon.info/bothasar_p/"
 
+#define N_STRBUF    256
+#define N_STRBUF_SH  32
+
 s_cgi *cgi;
 pid_t sub;
 int r;
@@ -55,8 +58,8 @@ FILE *tempfile;
 FILE *postfile;
 bool tf=false;
 bool pf=false;
-char temppath[256]="";
-char postpath[256]="";
+char temppath[N_STRBUF]="";
+char postpath[N_STRBUF]="";
 
 char zero='\0';
 char *username = &zero;
@@ -74,7 +77,7 @@ char *post =&zero;
 char *addquote =&zero;
 char *edit =&zero;
 char *forceID =&zero;
-char wrong[256];
+char wrong[N_STRBUF];
 
 void submit();
 void preview (const char *text);
@@ -218,27 +221,27 @@ void writeArgH(FILE *file,const char *value)
 void submit()
 {
        time_t posttime;
-       char timetext[32];
-       char timenumber[32];
-       char botinfo[256];
-       char arg1[256];
-       char arg2[256];
+       char timetext[N_STRBUF_SH];
+       char timenumber[N_STRBUF_SH];
+       char botinfo[N_STRBUF];
+       char arg1[N_STRBUF];
+       char arg2[N_STRBUF];
        
        unsigned long lastpage;
        unsigned short postslast;
-       char listpath[256];
+       char listpath[N_STRBUF];
        
        posttime=time(NULL);
        if(forceID[0]!='\0')
-               sprintf(timenumber,"%s",forceID);
+               snprintf(timenumber,N_STRBUF_SH,"%s",forceID);
        else
-               sprintf(timenumber,"%llu",(unsigned long long)posttime);
-       strftime(timetext,31,"%a %b %d, %Y %I:%M %p %Z",gmtime(&posttime));
+               snprintf(timenumber,N_STRBUF_SH,"%llu",(unsigned long long)posttime);
+       strftime(timetext,N_STRBUF-1,"%a %b %d, %Y %I:%M %p %Z",gmtime(&posttime));
        if(*disable_bbcode=='\0')
-               sprintf(botinfo,"[Posted from the Mirror at %s%s]\r\n",timetext,(forceID[0]!='\0')?", edited":"");
+               snprintf(botinfo,N_STRBUF,"[Posted from the Mirror at %s%s]\r\n",timetext,(forceID[0]!='\0')?", edited":"");
        else
-               sprintf(botinfo,"[size=80][Posted from the Mirror at %s%s][/size]\r\n",timetext,(forceID[0]!='\0')?", edited":"");
-       sprintf(postpath,"%s%s",MPOST_PATH,timenumber);
+               snprintf(botinfo,N_STRBUF,"[size=80][Posted from the Mirror at %s%s][/size]\r\n",timetext,(forceID[0]!='\0')?", edited":"");
+       snprintf(postpath,N_STRBUF,"%s%s",MPOST_PATH,timenumber);
        
        tempfile=fopen(temppath,"wt");
        if(tempfile==NULL)
@@ -268,7 +271,7 @@ void submit()
        fclose(tempfile);
        tf=false;
        
-       sprintf(arg1,"outfile=%s",temppath);
+       snprintf(arg1,N_STRBUF,"outfile=%s",temppath);
        fflush(stdout);
        sub=fork();
        if(sub==0)
@@ -280,8 +283,8 @@ void submit()
        }
        waitpid(sub,&r,0);
        
-       sprintf(arg1,"name=%s",username);
-       sprintf(arg2,"pass=%s",password);
+       snprintf(arg1,N_STRBUF,"name=%s",username);
+       snprintf(arg2,N_STRBUF,"pass=%s",password);
        sub=fork();
        if(sub==0)
        {
@@ -313,9 +316,9 @@ void submit()
                else
                {
                        tf=true;
-                       if(fgets(listpath,255,tempfile))
+                       if(fgets(listpath,N_STRBUF-1,tempfile))
                                sscanf(listpath,"%lu",&lastpage);
-                       if(fgets(listpath,255,tempfile))
+                       if(fgets(listpath,N_STRBUF-1,tempfile))
                                sscanf(listpath,"%hu",&postslast);
                        if(postslast>=40)
                        {
@@ -336,7 +339,7 @@ void submit()
                fprintf(tempfile,"%lu\n%hu\n%s\n",lastpage,postslast,timenumber);
                fclose(tempfile);
                
-               sprintf(listpath,"%s%lu",MLIST_PATH,lastpage);
+               snprintf(listpath,N_STRBUF,"%s%lu",MLIST_PATH,lastpage);
                tempfile=fopen(listpath,"at");
                if(tempfile==NULL)
                {
@@ -368,11 +371,11 @@ void submit()
                        fprintf(tempfile,"</dd>\n</dl>\n</li>\n");
                }
                fclose(tempfile);
-               sprintf(arg1,"info=<p>This message has been posted successfully.<br /><br /><a href=\"/ott/mview?np=%lu&amp;p=%s#m%s\">View your submitted message</a><br /><br /><a href=\"/ott/\">Return to the Ð¯OЯЯIM TTO</a></p>",lastpage,timenumber,timenumber);
+               snprintf(arg1,N_STRBUF,"info=<p>This message has been posted successfully.<br /><br /><a href=\"/ott/mview?np=%lu&amp;p=%s#m%s\">View your submitted message</a><br /><br /><a href=\"/ott/\">Return to the Ð¯OЯЯIM TTO</a></p>",lastpage,timenumber,timenumber);
 
        }
        else
-               sprintf(arg1,"info=<p>This message has been posted successfully.<br /><br /><a href=\"/ott/mview?p=%s#m%s\">View your submitted message</a><br /><br /><a href=\"/ott/\">Return to the Ð¯OЯЯIM TTO</a></p>",timenumber,timenumber);
+               snprintf(arg1,N_STRBUF,"info=<p>This message has been posted successfully.<br /><br /><a href=\"/ott/mview?p=%s#m%s\">View your submitted message</a><br /><br /><a href=\"/ott/\">Return to the Ð¯OЯЯIM TTO</a></p>",timenumber,timenumber);
        
        printf("Content-type: text/html\n\n");
        fflush(stdout);
@@ -389,7 +392,7 @@ void submit()
 }
 void preview (const char *text)
 {
-       char arg1[256];
+       char arg1[N_STRBUF];
        tempfile=fopen(temppath,"wt");
        if(tempfile==NULL)
                end(1);
@@ -418,7 +421,7 @@ void preview (const char *text)
        
        printf("Content-type: text/html\n\n");
        
-       sprintf(arg1,"outfile=%s",temppath);
+       snprintf(arg1,N_STRBUF,"outfile=%s",temppath);
        fflush(stdout);
        sub=fork();
        if(sub==0)
@@ -431,7 +434,7 @@ void preview (const char *text)
        waitpid(sub,&r,0);
        
        // printf("Content-type: text/html\n\n");
-       sprintf(arg1,"argfile=%s",temppath);
+       snprintf(arg1,N_STRBUF,"argfile=%s",temppath);
        fflush(stdout);
        sub=fork();
        if(sub==0)
@@ -454,7 +457,7 @@ int main()
        
        cgi=cgiInit();
        
-       sprintf(temppath,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+       snprintf(temppath,N_STRBUF,"%s%lu",TEMP_PATH,(unsigned long)getpid());
        
        arg=cgiGetValue(cgi,"password");
        if(arg!=NULL)
index d531b16977dd360ea3b3bc5088ef8f5d92ee61a3..384c21232bd3894e7d0c5d646c2918046c79810e 100644 (file)
 // #include <string.h>\r
 #include <sys/wait.h>\r
 \r
-// ###TEMP_PATHr\r
-// ###C_OK_PATH_3:   #define OK_PATH "/eizm/mem/ottmirror/mpost/ok/"\r
-// ###C_PM_PATH_3:   #define PM_PATH "/eizm/mem/ottmirror/mpost/pm/"\r
-// ###C_FAIL_PATH_3: #define FAIL_PATH "/eizm/mem/ottmirror/mpost/fail/"\r
-// ###C_LS_PATH:     #define LS_PATH "/bin/ls"\r
-// ###C_RM_PATH:     #define RM_PATH "/bin/rm"\r
-// ###C_MAWK_PATH:   #define MAWK_PATH  "/usr/bin/mawk"\r
-// ###C_AWK_POSTED:  #define AWK_POSTED "/eizm/pro/ottmirror/posted.awk"\r
+// ###C_TEMP_PATH_POSTED: #define TEMP_PATH "/eizm/tmp/ottmirror/posted."\r
+// ###C_OK_PATH_3:        #define OK_PATH "/eizm/mem/ottmirror/mpost/ok/"\r
+// ###C_PM_PATH_3:        #define PM_PATH "/eizm/mem/ottmirror/mpost/pm/"\r
+// ###C_FAIL_PATH_3:      #define FAIL_PATH "/eizm/mem/ottmirror/mpost/fail/"\r
+// ###C_LS_PATH:          #define LS_PATH "/bin/ls"\r
+// ###C_RM_PATH:          #define RM_PATH "/bin/rm"\r
+// ###C_MAWK_PATH:        #define MAWK_PATH  "/usr/bin/mawk"\r
+// ###C_AWK_POSTED:       #define AWK_POSTED "/eizm/pro/ottmirror/posted.awk"\r
 \r
-// ###C_OWN_DOMAIN_ENCODED: #define \13 "1190.bicyclesonthemoon.info"\r
+// ###C_OWN_DOMAIN_ENCODED: #define "1190.bicyclesonthemoon.info"\r
+\r
+#define N_STRBUF    256\r
+#define N_STRBUF_SH 256\r
 \r
 s_cgi *cgi;\r
 pid_t sub;\r
@@ -44,10 +47,10 @@ int r;
 \r
 int main(int argc, char **argv)\r
 {\r
-       char temppath[256]="";\r
-       char line[32];\r
-       char filename[32];\r
-       char postpath[256];\r
+       char temppath[N_STRBUF]="";\r
+       char line[N_STRBUF_SH];\r
+       char filename[N_STRBUF_SH];\r
+       char postpath[N_STRBUF];\r
        FILE *tempfile;\r
        FILE *postfile;\r
        \r
@@ -55,7 +58,7 @@ int main(int argc, char **argv)
        // dup2(fileno(stdout),fileno(stderr));\r
        cgi=cgiInit();\r
        \r
-       sprintf(temppath,"%s%lu",TEMP_PATH,(unsigned long)getpid());\r
+       snprintf(temppath,N_STRBUF,"%s%lu",TEMP_PATH,(unsigned long)getpid());\r
        \r
        printf("Content-type: text/html\n\n");\r
        printf("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"\">\n");\r
@@ -87,10 +90,10 @@ int main(int argc, char **argv)
                tempfile=fopen(temppath,"rt");\r
                if(tempfile!=NULL)\r
                {\r
-                       for(unsigned char i=0; fgets(line,31,tempfile)!=NULL; ++i)\r
+                       for(unsigned char i=0; fgets(line,N_STRBUF_SH-1,tempfile)!=NULL; ++i)\r
                        {\r
                                sscanf(line,"%s",filename);\r
-                               sprintf(postpath,"%s%s",FAIL_PATH,filename);\r
+                               snprintf(postpath,N_STRBUF,"%s%s",FAIL_PATH,filename);\r
                                \r
                                fflush(stdout);\r
                                sub=fork();\r
@@ -128,10 +131,10 @@ int main(int argc, char **argv)
                tempfile=fopen(temppath,"rt");\r
                if(tempfile!=NULL)\r
                {\r
-                       for(unsigned char i=0; fgets(line,31,tempfile)!=NULL; ++i)\r
+                       for(unsigned char i=0; fgets(line,N_STRBUF_SH-1,tempfile)!=NULL; ++i)\r
                        {\r
                                sscanf(line,"%s",filename);\r
-                               sprintf(postpath,"%s%s",PM_PATH,filename);\r
+                               snprintf(postpath,N_STRBUF,"%s%s",PM_PATH,filename);\r
                                \r
                                fflush(stdout);\r
                                sub=fork();\r
@@ -169,10 +172,10 @@ int main(int argc, char **argv)
                tempfile=fopen(temppath,"rt");\r
                if(tempfile!=NULL)\r
                {\r
-                       for(unsigned char i=0; fgets(line,31,tempfile)!=NULL; ++i)\r
+                       for(unsigned char i=0; fgets(line,N_STRBUF_SH-1,tempfile)!=NULL; ++i)\r
                        {\r
                                sscanf(line,"%s",filename);\r
-                               sprintf(postpath,"%s%s",OK_PATH,filename);\r
+                               snprintf(postpath,N_STRBUF,"%s%s",OK_PATH,filename);\r
                                \r
                                fflush(stdout);\r
                                sub=fork();\r
index f2dac32a16c1cdcefddd534fcaac4925e3499e54..01cb0ab7e2bd181eca84ee32b5487d3e25b20206 100644 (file)
@@ -38,7 +38,10 @@ rm: /usr/bin/rm
 ls: /usr/bin/ls
 wget: /usr/bin/wget
 awk: /usr/bin/mawk
+chmod: /usr/bin/chmod
+mkdir: /usr/bin/mkdir
+cp: /usr/bin/cp
 
 CC: g++
-CF: -g -Wall
+CF: -g -Wall -Wno-format-truncation
 L_CGI: -lcgi
index c6dea8212f7fd3fdf87ed5dbf8832f1874118eb7..0b95db5f1769b9749efb6553c50a82c38c146598 100644 (file)
@@ -48,10 +48,14 @@ _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_mpview_path   = @_PATH($tmp_path, mpview.)
+_tmp_mview_path    = @_PATH($tmp_path, mview.)
 _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_preview_path  = @_PATH($tmp_path, preview.)
+_tmp_posted_path   = @_PATH($tmp_path, posted.)
 _tmp_stop_path     = @_PATH($tmp_path, fullstop.)
 _tmp_view_path     = @_PATH($tmp_path, view.)
 
@@ -85,13 +89,34 @@ _www_up_path_     = @_PATH($_www_up_path,   )
 MAKE_CONFIGURE = CONFIGURE =$configure
 MAKE_TARGET    = TARGET    =$target
 
-MAKE_PERL   = PERL=$perl
-MAKE_RM     = RM  =$rm
+MAKE_CHMOD  = CHMOD=$chmod
+MAKE_CP     = CP   =$cp
+MAKE_MKDIR  = MKDIR=$mkdir
+MAKE_PERL   = PERL =$perl
+MAKE_RM     = RM   =$rm
 
 MAKE_CC    = CC   =$CC
 MAKE_CF    = CF   =$CF
 MAKE_L_CGI = L_CGI=$L_CGI
 
+MAKE_BIN_PATH      = BIN_PATH      = $bin_path
+MAKE_LOG_PATH      = LOG_PATH      = $log_path
+MAKE_MEM_PATH      = MEM_PATH      = $mem_path
+MAKE_MEM_FAIL_PATH = MEM_FAIL_PATH = $_mem_fail_path
+MAKE_MEM_LIST_PATH = MEM_LIST_PATH = $_mem_list_path
+MAKE_MEM_OK_PATH   = MEM_OK_PATH   = $_mem_ok_path
+MAKE_MEM_PM_PATH   = MEM_PM_PATH   = $_mem_pm_path
+MAKE_MEM_POST_PATH = MEM_POST_PATH = $_mem_post_path
+MAKE_TMP_PATH      = TMP_PATH      = $tmp_path
+MAKE_WWW_PATH      = WWW_PATH      = $www_path
+MAKE_WWW_ATT_PATH  = WWW_ATT_PATH  = $_www_att_path
+MAKE_WWW_AV_PATH   = WWW_AV_PATH   = $_www_av_path
+MAKE_WWW_IMG_PATH  = WWW_IMG_PATH  = $_www_img_path
+MAKE_WWW_INF_PATH  = WWW_INF_PATH  = $_www_inf_path
+MAKE_WWW_LIST_PATH = WWW_LIST_PATH = $_www_list_path
+MAKE_WWW_SIG_PATH  = WWW_SIG_PATH  = $_www_sig_path
+MAKE_WWW_UP_PATH   = WWW_UP_PATH   = $_www_up_path
+
 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)
@@ -150,16 +175,20 @@ 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_TEMP_PATH_VIEW  = @_C_DEFINE_STR(TEMP_PATH,    $_tmp_view_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_MPVIEW = @_C_DEFINE_STR(TEMP_PATH,    $_tmp_mpview_path)
+C_TEMP_PATH_MVIEW  = @_C_DEFINE_STR(TEMP_PATH,    $_tmp_mview_path)
+C_TEMP_PATH_POSTED = @_C_DEFINE_STR(TEMP_PATH,    $_tmp_posted_path)
+C_TEMP_PATH_PREVIEW= @_C_DEFINE_STR(TEMP_PATH,    $_tmp_preview_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_)
index 12a4f7d70f6931e11b1a276c4ddc8d790a65efe4..492d4bcaaa671476d0700ab2d88d48f5bd63beec 100644 (file)
 // ###C_AWK_VIEW:       #define AWK_VIEW "/eizm/pro/ottmirror/view.awk"
 // ###C_TEMP_PATH_VIEW: #define TEMP_PATH "/eizm/tmp/ottmirror/view."
 
+#define N_STRBUF 256
+
 unsigned long p2np(unsigned long p)
 {
        FILE *file;
-       char path[256];
-       char text[256];
+       char path[N_STRBUF];
+       char text[N_STRBUF];
        unsigned long np=0;
        unsigned long np2;
        unsigned long pp;
@@ -53,11 +55,11 @@ unsigned long p2np(unsigned long p)
        for(short i=31;i>=0;--i)
        {
                np2 = np + (1L << i);
-               sprintf(path,"%s%lu",LIST_PATH,np2);
+               snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,np2);
                file=fopen(path,"rt");
                if(file==NULL)
                        continue;
-               fgets(text,255,file);
+               fgets(text,N_STRBUF-1,file);
                fclose(file);
                sscanf(text,"%lu",&pp);
                if(pp==p)
@@ -67,11 +69,11 @@ unsigned long p2np(unsigned long p)
        }
        if(np==0)
                return 1L;
-       sprintf(path,"%s%lu",LIST_PATH,np);
+       snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,np);
        file=fopen(path,"rt");
        if(file==NULL)
                return 1L;
-       while(fgets(text,255,file)!=NULL)
+       while(fgets(text,N_STRBUF-1,file)!=NULL)
        {
                sscanf(text,"%lu",&pp);
                if(pp==p)
@@ -79,11 +81,11 @@ unsigned long p2np(unsigned long p)
        }
        fclose(file);
        --np;
-       sprintf(path,"%s%lu",LIST_PATH,np);
+       snprintf(path,N_STRBUF,"%s%lu",LIST_PATH,np);
        file=fopen(path,"rt");
        if(file==NULL)
                return 1L;
-       while(fgets(text,255,file)!=NULL)
+       while(fgets(text,N_STRBUF-1,file)!=NULL)
        {
                sscanf(text,"%lu",&pp);
                if(pp==p)
@@ -98,11 +100,11 @@ int main()
        int r;
        
        char *arg;
-       char path[256];
-       char path2[256];
-       char left[256];
-       char right[256];
-       char links[256];
+       char path[N_STRBUF];
+       char path2[N_STRBUF];
+       char left[N_STRBUF];
+       char right[N_STRBUF];
+       char links[N_STRBUF];
        FILE *file;
        unsigned long np=1L;
        unsigned long start=0L;
@@ -156,16 +158,16 @@ int main()
        if(np>last)
                np=last;
        if(np<last)
-               sprintf(right,"right=<a href=\\\"/ott/view?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
+               snprintf(right,N_STRBUF,"right=<a href=\\\"/ott/view?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
        else
-               sprintf(right,"%s",mustard?"right=<a href=\\\"/ott/mview\\\" class=\\\"right-box right\\\" >Mustardtime Otherthread</a>":"right=<!-- -->");
+               snprintf(right,N_STRBUF,"%s",mustard?"right=<a href=\\\"/ott/mview\\\" class=\\\"right-box right\\\" >Mustardtime Otherthread</a>":"right=<!-- -->");
        if(np>1)
-               sprintf(left,"left=<a href=\\\"/ott/view?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
+               snprintf(left,N_STRBUF,"left=<a href=\\\"/ott/view?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
        else
-               sprintf(left,"%s","left=<!-- -->");
+               snprintf(left,N_STRBUF,"%s","left=<!-- -->");
        
-       sprintf(path2,"%s%lu",TEMP_PATH,(unsigned long)getpid());
-       sprintf(links,"links=%s",path2);
+       snprintf(path2,N_STRBUF,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+       snprintf(links,N_STRBUF,"links=%s",path2);
        file=fopen(path2,"wt");
        if(file!=NULL)
        {
@@ -207,7 +209,7 @@ int main()
        if(r)
                printf("<p>Ch*rpin* M*stard</p>");
                
-       sprintf(path,"%s%lu",UP_PATH,np);
+       snprintf(path,N_STRBUF,"%s%lu",UP_PATH,np);
        fflush(stdout);
        sub=fork();
        if(sub==0)
index 72a4713b45808a677aa869afc98e9d86fc71cc8d..9ec7c326dea7f0cc40015cd8f8d7c41e44b75c1b 100644 (file)
@@ -73,7 +73,9 @@
 <option value="http://mrob.com/time/chirp.html" >&nbsp; &nbsp;Chirpy Raptor</option>
 <option value="http://automome.chirpingmustard.com/" >&nbsp; &nbsp;AUTOMOME (Link)</option>
 <option value="http://mrob.com/time/automome" >&nbsp; &nbsp;AUTOMOME (mrob27)</option>
-<option value="http://xkcd.modularthought.com/ottomeme/" >&nbsp; &nbsp;OTToMeme</option>
+<!-- <option value="http://xkcd.modularthought.com/ottomeme/" >&nbsp; &nbsp;OTToMeme</option> -->
+<option value="http://mrob.com/time/automome/azule/" >&nbsp; &nbsp;OTToMeme</option>
+<option value="http://mrob.com/time/ottle/" >&nbsp; &nbsp;OTTle</option>
 </select>
 <input type="submit" value="Go" class="button2" />
 </fieldset>
index 07d6c5dbe91502ec0ad5d1e0e3fd2550015a6a87..b31f683026088fb20c9e56a8cee2da577efc0d62 100644 (file)
@@ -69,7 +69,9 @@ go to newpage:
 <option value="http://mrob.com/time/chirp.html" >&nbsp; &nbsp;Chirpy Raptor</option>\r
 <option value="http://automome.chirpingmustard.com/" >&nbsp; &nbsp;AUTOMOME (Link)</option>\r
 <option value="http://mrob.com/time/automome" >&nbsp; &nbsp;AUTOMOME (mrob27)</option>\r
-<option value="http://xkcd.modularthought.com/ottomeme/" >&nbsp; &nbsp;OTToMeme</option>\r
+<!-- <option value="http://xkcd.modularthought.com/ottomeme/" >&nbsp; &nbsp;OTToMeme</option> -->\r
+<option value="http://mrob.com/time/automome/azule/" >&nbsp; &nbsp;OTToMeme</option>\r
+<option value="http://mrob.com/time/ottle/" >&nbsp; &nbsp;OTTle</option>\r
 </select>\r
 <input type="submit" value="Go" class="button2" />\r
 </fieldset>\r
index 061f33b0c795519c3b9c3a25857bdb4a3aaa1f01..913fc88642d4797a3848cf0f9b4873dad3152d5c 100644 (file)
        </dl>
        <dl>
                        <dt><label for="password">Password:</label></dt>
-                       <dd><input tabindex="3" id="password" name="password" size="45" class="inputbox autowidth" type="text" /></dd>
+                       <dd><input tabindex="3" id="password" name="password" size="45" class="inputbox autowidth" type="password" /></dd>
                        <!-- <dd><b>Warning</b>: The mirror can't verify your username or password.</dd>
                        <dd>Use your xkcd forum username and password.</dd> -->
                </dl>
        
        <dl>
                        <dt><label for="warning">Warning:</label></dt>
-                       <dd>The mirror can't verify your username or password.</dd>
                        <dd>Use your xkcd forum username and password.</dd>
+                       <dd>The mirror can't verify your username or password.</dd>
+                       <dd>So please make sure that you have typed them correctly.</dd>
                </dl>
        <script type="text/javascript">
 // <![CDATA[
diff --git a/www/ott/prosilver/theme/forms.css b/www/ott/prosilver/theme/forms.css
new file mode 100644 (file)
index 0000000..777f011
--- /dev/null
@@ -0,0 +1,438 @@
+/* Form Styles
+---------------------------------------- */
+
+/* General form styles
+----------------------------------------*/
+fieldset {
+       border-width: 0;
+       font-family: Verdana, Helvetica, Arial, sans-serif;
+       font-size: 1.1em;
+}
+
+input {
+       font-weight: normal;
+       vertical-align: middle;
+       padding: 0 3px;
+       font-size: 1em;
+       font-family: Verdana, Helvetica, Arial, sans-serif;
+}
+
+select {
+       font-family: Verdana, Helvetica, Arial, sans-serif;
+       font-weight: normal;
+       cursor: pointer;
+       vertical-align: middle;
+       border: 1px solid transparent;
+       padding: 1px;
+       font-size: 1em;
+}
+
+select:focus {
+       outline-style: none;
+}
+
+option {
+       padding-right: 1em;
+}
+
+select optgroup option {
+       padding-right: 1em;
+       font-family: Verdana, Helvetica, Arial, sans-serif;
+}
+
+textarea {
+       font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+       width: 60%;
+       padding: 2px;
+       font-size: 1em;
+       line-height: 1.4em;
+}
+
+label {
+       cursor: default;
+       padding-right: 5px;
+}
+
+label input {
+       vertical-align: middle;
+}
+
+label img {
+       vertical-align: middle;
+}
+
+/* Definition list layout for forms
+---------------------------------------- */
+fieldset dl {
+       padding: 4px 0;
+}
+
+fieldset dt {
+       float: left;
+       width: 40%;
+       text-align: left;
+       display: block;
+}
+
+fieldset dd {
+       margin-left: 41%;
+       vertical-align: top;
+       margin-bottom: 3px;
+}
+
+/* Specific layout 1 */
+fieldset.fields1 dt {
+       width: 15em;
+       border-right-width: 0;
+}
+
+fieldset.fields1 dd {
+       margin-left: 15em;
+       border-left-width: 0;
+}
+
+fieldset.fields1 div {
+       margin-bottom: 3px;
+}
+
+/* Set it back to 0px for the reCaptcha divs: PHPBB3-9587 */
+fieldset.fields1 #recaptcha_widget_div div, fieldset.fields1 .live-search div {
+       margin-bottom: 0;
+}
+
+/* Specific layout 2 */
+fieldset.fields2 dt {
+       width: 15em;
+       border-right-width: 0;
+}
+
+fieldset.fields2 dd {
+       margin-left: 16em;
+       border-left-width: 0;
+}
+
+/* Form elements */
+dt label {
+       font-weight: bold;
+       text-align: left;
+}
+
+dd label {
+       white-space: nowrap;
+}
+
+dd input, dd textarea {
+       margin-right: 3px;
+}
+
+dd select {
+       width: auto;
+}
+
+dd select[multiple] {
+       width: 100%;
+}
+
+dd textarea {
+       width: 85%;
+}
+
+/* Hover effects */
+#timezone {
+       width: 95%;
+}
+
+/* Quick-login on index page */
+fieldset.quick-login {
+       margin-top: 5px;
+}
+
+fieldset.quick-login input {
+       width: auto;
+}
+
+fieldset.quick-login input.inputbox {
+       width: 15%;
+       vertical-align: middle;
+       margin-right: 5px;
+}
+
+fieldset.quick-login label {
+       white-space: nowrap;
+       padding-right: 2px;
+}
+
+/* Display options on viewtopic/viewforum pages  */
+fieldset.display-options {
+       text-align: center;
+       margin: 3px 0 5px 0;
+}
+
+fieldset.display-options label {
+       white-space: nowrap;
+       padding-right: 2px;
+}
+
+fieldset.display-options a {
+       margin-top: 3px;
+}
+
+/* Display actions for ucp and mcp pages */
+fieldset.display-actions {
+       text-align: right;
+       line-height: 2em;
+       white-space: nowrap;
+       padding-right: 1em;
+}
+
+fieldset.display-actions label {
+       white-space: nowrap;
+       padding-right: 2px;
+}
+
+fieldset.sort-options {
+       line-height: 2em;
+}
+
+/* MCP forum selection*/
+fieldset.forum-selection {
+       margin: 5px 0 3px 0;
+       float: right;
+}
+
+fieldset.forum-selection2 {
+       margin: 13px 0 3px 0;
+       float: right;
+}
+
+/* Submit button fieldset */
+fieldset.submit-buttons {
+       text-align: center;
+       vertical-align: middle;
+       margin: 5px 0;
+}
+
+fieldset.submit-buttons input {
+       vertical-align: middle;
+       padding-top: 3px;
+       padding-bottom: 3px;
+}
+
+/* Posting page styles
+----------------------------------------*/
+
+/* Buttons used in the editor */
+#format-buttons {
+       margin: 15px 0 2px 0;
+}
+
+#format-buttons input, #format-buttons select {
+       vertical-align: middle;
+}
+
+/* Main message box */
+#message-box {
+       width: 80%;
+}
+
+#message-box textarea {
+       font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+       width: 450px;
+       height: 270px;
+       min-width: 100%;
+       max-width: 100%;
+       font-size: 1.2em;
+       resize: vertical;
+       outline: 3px dashed transparent;
+       outline-offset: -4px;
+       -webkit-transition: all .5s ease;
+       -moz-transition: all .5s ease;
+       -ms-transition: all .5s ease;
+       -o-transition: all .5s ease;
+       transition: all .5s ease;
+}
+
+/* Emoticons panel */
+#smiley-box {
+       width: 18%;
+       float: right;
+}
+
+#smiley-box img {
+       margin: 3px;
+}
+
+/* Input field styles
+---------------------------------------- */
+.inputbox {
+       border: 1px solid transparent;
+       padding: 2px;
+}
+
+.inputbox:hover, .inputbox:focus {
+       border: 1px solid transparent;
+       outline-style: none;
+}
+
+input.inputbox { width: 85%; }
+input.medium   { width: 50%; }
+input.narrow   { width: 25%; }
+input.tiny     { width: 150px; }
+
+textarea.inputbox {
+       width: 85%;
+}
+
+.autowidth {
+       width: auto !important;
+}
+
+input[type="number"] {
+       -moz-padding-end: inherit;
+}
+
+input[type="search"] {
+       -webkit-appearance: textfield;
+       -webkit-box-sizing: content-box;
+}
+
+input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration {
+       display: none;
+}
+
+input[type="search"]::-webkit-search-cancel-button {
+       cursor: pointer;
+}
+
+/* Form button styles
+---------------------------------------- */
+input.button1, input.button2 {
+       font-size: 1em;
+}
+
+a.button1, input.button1, input.button3, a.button2, input.button2 {
+       width: auto !important;
+       padding-top: 1px;
+       padding-bottom: 1px;
+       font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+       background: transparent none repeat-x top left;
+}
+
+a.button1, input.button1 {
+       font-weight: bold;
+       border: 1px solid transparent;
+}
+
+input.button3 {
+       padding: 0;
+       margin: 0;
+       line-height: 5px;
+       height: 12px;
+       background-image: none;
+       font-variant: small-caps;
+}
+
+input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"] {
+       cursor: pointer;
+}
+
+/* Alternative button */
+a.button2, input.button2, input.button3 {
+       border: 1px solid transparent;
+}
+
+/* <a> button in the style of the form buttons */
+a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active {
+       text-decoration: none;
+       padding: 2px 8px;
+       line-height: 250%;
+       vertical-align: text-bottom;
+       background-position: 0 1px;
+}
+
+/* Hover states */
+a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
+       border: 1px solid transparent;
+       background-position: 0 100%;
+}
+
+input.disabled {
+       font-weight: normal;
+}
+
+/* Focus states */
+input.button1:focus, input.button2:focus, input.button3:focus {
+       outline-style: none;
+}
+
+/* Topic and forum Search */
+.search-box {
+       float: left;
+}
+
+.search-box .inputbox {
+       background-image: none;
+       border-right-width: 0;
+       border-radius: 4px 0 0 4px;
+       float: left;
+       height: 24px;
+       padding: 3px;
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+}
+
+.search-box button {
+       float: left;
+}
+
+.search-box button.search-icon {
+       border-radius: 0;
+       font-size: 0;
+       height: 24px;
+       margin: 0;
+       padding: 3px 5px;
+}
+
+.search-box a.button {
+       border-left-width: 0;
+       border-radius: 0 4px 4px 0;
+       font-size: 0;
+       margin: 0;
+       padding: 2px 5px 2px 3px;
+}
+
+/* Search box (header)
+--------------------------------------------- */
+.search-header {
+       border-radius: 4px;
+       display: block;
+       float: right;
+       margin-right: 5px;
+       margin-top: 30px;
+}
+
+.search-header .inputbox { border: 0; }
+
+.search-header button {
+       border-top: 0;
+       border-bottom: 0;
+}
+
+.search-header a.button {
+       border: 0;
+       border-left: 1px;
+       padding: 3px 5px 3px 4px;
+}
+
+input.search {
+       background-image: none;
+       background-repeat: no-repeat;
+       background-position: left 1px;
+       padding-left: 17px;
+}
+
+.full { width: 95%; }
+.medium { width: 50%;}
+.narrow { width: 25%;}
+.tiny { width: 10%;}