s/pfolder/curfolder/g
authormarkus schnalke <meillo@marmaro.de>
Fri, 9 Dec 2011 17:11:10 +0000 (18:11 +0100)
committermarkus schnalke <meillo@marmaro.de>
Fri, 9 Dec 2011 17:11:10 +0000 (18:11 +0100)
26 files changed:
config/config.c
h/mh.h
sbr/path.c
uip/anno.c
uip/burst.c
uip/dist.c
uip/flist.c
uip/folder.c
uip/forw.c
uip/inc.c
uip/install-mh.c
uip/mark.c
uip/mhlist.c
uip/mhshow.c
uip/mhstore.c
uip/mhtest.c
uip/new.c
uip/packf.c
uip/pick.c
uip/refile.c
uip/repl.c
uip/rmf.c
uip/rmm.c
uip/scan.c
uip/show.c
uip/sortm.c

index 245ecde..7454666 100644 (file)
@@ -112,7 +112,7 @@ char *draftfolder = "+drafts";
 char *inbox = "Inbox";
 char *defaultfolder = "+inbox";
 
-char *pfolder = "Current-Folder";
+char *curfolder = "Current-Folder";
 char *usequence = "Unseen-Sequence";
 char *psequence = "Previous-Sequence";
 char *nsequence = "Sequence-Negation";
diff --git a/h/mh.h b/h/mh.h
index 4b846cf..8ca6c44 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -329,7 +329,7 @@ extern char *nmhprivcache;
 extern char *nsequence;
 extern char *packproc;
 extern char *postproc;
-extern char *pfolder;
+extern char *curfolder;
 extern char *psequence;
 extern char *rcvdistcomps;
 extern char *rcvstoreproc;
index 4132896..ca3595a 100644 (file)
@@ -122,7 +122,7 @@ getdeffol(void)
 char *
 getcurfol(void)
 {
-       char *folder = context_find(pfolder);
+       char *folder = context_find(curfolder);
 
        if (!folder || !*folder) {
                folder = getdeffol();
index ec3590c..1d27a9e 100644 (file)
@@ -242,7 +242,7 @@ main(int argc, char **argv)
                }
        }
 
-       context_replace(pfolder, folder);  /* update current folder  */
+       context_replace(curfolder, folder);  /* update current folder  */
        seq_setcur(mp, mp->lowsel);  /* update current message */
        seq_save(mp);  /* synchronize message sequences */
        folder_free(mp);  /* free folder/message structure */
index b5414ad..ec50708 100644 (file)
@@ -162,7 +162,7 @@ main(int argc, char **argv)
        }
 
        free((char *) smsgs);
-       context_replace(pfolder, folder);  /* update current folder */
+       context_replace(curfolder, folder);  /* update current folder */
 
        /*
        ** If -inplace is given, then the first message burst becomes
index 991f5cd..27be4a5 100644 (file)
@@ -192,7 +192,7 @@ main(int argc, char **argv)
                adios(msgnam, "unable to open message");
 
        if (!file) {
-               context_replace(pfolder, folder);  /* update current folder */
+               context_replace(curfolder, folder); /* update current folder */
                seq_setcur(mp, mp->lowsel);  /* update current message */
                seq_save(mp);  /* synchronize sequences  */
                context_save();  /* save the context file  */
index d85ad61..d2a0490 100644 (file)
@@ -91,9 +91,9 @@ static int alphaOrder = FALSE;  /* want alphabetical order only */
 static int recurse = FALSE;  /* show nested folders? */
 static int showzero   = TRUE;  /* show folders even if no messages in seq? */
 static int Total = TRUE;  /* display info on number of messages in
-       * sequence found, and total num messages   */
+               * sequence found, and total num messages */
 
-static char curfolder[BUFSIZ];  /* name of the current folder */
+static char curfol[BUFSIZ];  /* name of the current folder */
 static char *nmhdir;  /* base nmh mail directory */
 
 /*
@@ -236,7 +236,7 @@ main(int argc, char **argv)
        }
 
        /* get current folder */
-       strncpy(curfolder, getcurfol(), sizeof(curfolder));
+       strncpy(curfol, getcurfol(), sizeof(curfol));
 
        /* get nmh base directory */
        nmhdir = toabsdir("+");
@@ -267,7 +267,8 @@ main(int argc, char **argv)
 
        GetFolderOrder();
        ScanFolders();
-       qsort(folders, nFolders, sizeof(struct Folder), (qsort_comp) CompareFolders);
+       qsort(folders, nFolders, sizeof(struct Folder),
+                       (qsort_comp) CompareFolders);
        PrintFolders();
        done(0);
        return 1;
@@ -323,9 +324,8 @@ ScanFolders(void)
 
        if (numfolders > 0) {
                /* Update context */
-               strncpy(curfolder, foldersToDo[numfolders - 1],
-                               sizeof(curfolder));
-               context_replace(pfolder, curfolder);/* update current folder */
+               strncpy(curfol, foldersToDo[numfolders - 1], sizeof(curfol));
+               context_replace(curfolder, curfol); /* update current folder */
                context_save();  /* save the context file */
 
                /*
@@ -337,20 +337,14 @@ ScanFolders(void)
                        BuildFolderList(foldersToDo[i], all ? 1 : 0);
        } else {
                if (all) {
-                       /*
-                       ** Do the readonly folders
-                       */
+                       /* Do the readonly folders */
                        do_readonly_folders();
 
-                       /*
-                       ** Now scan the entire nmh directory for folders
-                       */
+                       /* Now scan the entire nmh directory for folders */
                        BuildFolderList(".", 0);
                } else {
-                       /*
-                       ** Else scan current folder
-                       */
-                       BuildFolderList(curfolder, 0);
+                       /* Else scan current folder */
+                       BuildFolderList(curfol, 0);
                }
        }
 }
@@ -448,7 +442,8 @@ BuildFolderListRecurse(char *dirName, struct stat *s, int searchdepth)
                        if (AddFolder(name, showzero) &&
                                        (recurse || searchdepth) &&
                                        st.st_nlink > 2)
-                               BuildFolderListRecurse(name, &st, searchdepth - 1);
+                               BuildFolderListRecurse(name, &st,
+                                               searchdepth - 1);
                }
        }
        closedir(dir);
@@ -572,7 +567,10 @@ PrintFolders(void)
                        if (folders[i].nSeq[j] > maxseq)
                                maxseq = folders[i].nSeq[j];
 
-                       /* check if this sequence is private in any of the folders */
+                       /*
+                       ** check if this sequence is private in any of
+                       ** the folders
+                       */
                        if (folders[i].private[j])
                                has_private = 1;
                }
@@ -583,7 +581,7 @@ PrintFolders(void)
                for (j = 0; j < numsequences; j++) {
                        if (folders[i].nSeq[j] > 0 || showzero) {
                                /* Add `+' to end of name of current folder */
-                               if (strcmp(curfolder, folders[i].name))
+                               if (strcmp(curfol, folders[i].name))
                                        snprintf(tmpname, sizeof(tmpname),
                                                        "%s", folders[i].name);
                                else
index 70f497d..e219109 100644 (file)
@@ -311,7 +311,7 @@ main(int argc, char **argv)
                if (access(cp, F_OK) == NOTOK)
                        adios(cp, "unable to find folder");
                /* update current folder   */
-               context_replace(pfolder, argfolder);
+               context_replace(curfolder, argfolder);
                context_save();  /* save the context file   */
                argfolder = NULL;
        }
@@ -352,14 +352,14 @@ main(int argc, char **argv)
                        if (msg)
                                admonish(NULL, "no folder given for message %s", msg);
                        readonly_folders(); /* do any readonly folders */
-                       strncpy(folder, (cp = context_find(pfolder)) ?
+                       strncpy(folder, (cp = context_find(curfolder)) ?
                                        cp : "", sizeof(folder));
                        crawl_folders(".", get_folder_info_callback, NULL);
                } else {
                        strncpy(folder, argfolder, sizeof(folder));
                        if (get_folder_info(argfolder, msg)) {
                                /* update current folder */
-                               context_replace(pfolder, argfolder);
+                               context_replace(curfolder, argfolder);
                                context_save();
                        }
                        /*
@@ -382,7 +382,7 @@ main(int argc, char **argv)
 
                if (get_folder_info(folder, msg) && argfolder) {
                        /* update current folder */
-                       context_replace(pfolder, argfolder);
+                       context_replace(curfolder, argfolder);
                        }
        }
 
index 3f940f7..3ce0b21 100644 (file)
@@ -349,7 +349,7 @@ main(int argc, char **argv)
                        context_replace(buf, getcpy(value));
                }
 
-               context_replace(pfolder, folder);  /* update current folder */
+               context_replace(curfolder, folder); /* update current folder */
                seq_setcur(mp, mp->lowsel);  /* update current message */
                seq_save(mp);  /* synchronize sequences */
                context_save();  /* save the context file */
index 2a866e9..54eb70e 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -506,7 +506,7 @@ main(int argc, char **argv)
        if (msgnum == hghnum) {
                admonish(NULL, "no messages incorporated");
        } else {
-               context_replace(pfolder, folder);  /* update current folder */
+               context_replace(curfolder, folder); /* update current folder */
                if (chgflag)
                        mp->curmsg = hghnum + 1;
                mp->hghmsg = msgnum;
index 1fb6834..30ac8f6 100644 (file)
@@ -201,7 +201,7 @@ query:
        ctxpath = getcpy(toabsdir(context = "context"));
 
        /* Initialize current folder to default */
-       context_replace(pfolder, defaultfolder);
+       context_replace(curfolder, defaultfolder);
        context_save();
 
        /*
index 5fd27f6..2914a44 100644 (file)
@@ -221,7 +221,7 @@ main(int argc, char **argv)
        }
 
        seq_save(mp);  /* synchronize message sequences */
-       context_replace(pfolder, folder);  /* update current folder */
+       context_replace(curfolder, folder);  /* update current folder */
        context_save();  /* save the context file */
        folder_free(mp);  /* free folder/message structure */
        done(0);
index b87e522..c12a6b9 100644 (file)
@@ -361,7 +361,7 @@ do_cache:
 
        /* If reading from a folder, do some updating */
        if (mp) {
-               context_replace(pfolder, folder);  /* update current folder */
+               context_replace(curfolder, folder); /* update current folder */
                seq_setcur(mp, mp->hghsel);  /* update current message */
                seq_save(mp);  /* synchronize sequences  */
                context_save();  /* save the context file  */
index 3510120..07a05a9 100644 (file)
@@ -446,8 +446,8 @@ do_cache:
 
        /* If reading from a folder, do some updating */
        if (mp) {
-               context_replace(pfolder, folder);  /* update current folder */
-               seq_setcur(mp, mp->hghsel);       /* update current message */
+               context_replace(curfolder, folder); /* update current folder */
+               seq_setcur(mp, mp->hghsel);        /* update current message */
                seq_save(mp);                      /* synchronize sequences */
                context_save();                    /* save the context file */
        }
index 1fbd50e..8ce7d62 100644 (file)
@@ -375,7 +375,7 @@ do_cache:
 
        /* If reading from a folder, do some updating */
        if (mp) {
-               context_replace(pfolder, folder);  /* update current folder */
+               context_replace(curfolder, folder); /* update current folder */
                seq_setcur(mp, mp->hghsel);  /* update current message */
                seq_save(mp);  /* synchronize sequences  */
                context_save();  /* save the context file  */
index df5985f..1f6846b 100644 (file)
@@ -353,7 +353,7 @@ do_cache:
 
        /* If reading from a folder, do some updating */
        if (mp) {
-               context_replace(pfolder, folder);  /* update current folder */
+               context_replace(curfolder, folder); /* update current folder */
                seq_setcur(mp, mp->hghsel);  /* update current message */
                seq_save(mp);  /* synchronize sequences  */
                context_save();  /* save the context file  */
index fc87b3a..c4026ba 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -513,7 +513,7 @@ main(int argc, char **argv)
        }
        sequences[i] = NULL;
 
-       folder = doit(context_find(pfolder), folders, sequences);
+       folder = doit(context_find(curfolder), folders, sequences);
        if (folder == NULL) {
                done(0);
                return 1;
@@ -527,11 +527,11 @@ main(int argc, char **argv)
                ** has in memory.  So, we'll be lame, too.  I'm not sure if i
                ** should just change context_replace...
                */
-               context_replace(pfolder, "defeat_context_replace_optimization");
+               context_replace(curfolder, "defeat_context_replace_optimization");
        }
 
        /* update current folder */
-       context_replace(pfolder, folder->n_name);
+       context_replace(curfolder, folder->n_name);
 
        if (run_mode == FNEXT || run_mode == FPREV) {
                printf("%s  %s\n", folder->n_name, folder->n_field);
index b48a92d..9bb61f5 100644 (file)
@@ -169,7 +169,7 @@ main(int argc, char **argv)
        /* close and unlock maildrop file */
        mbx_close(file, md);
 
-       context_replace(pfolder, folder);  /* update current folder */
+       context_replace(curfolder, folder);  /* update current folder */
        if (mp->hghsel != mp->curmsg)
                seq_setcur(mp, mp->lowsel);
        seq_save(mp);
index 2efac42..e8720df 100644 (file)
@@ -288,7 +288,7 @@ main(int argc, char **argv)
                printf("%d hit%s\n", mp->numsel, mp->numsel == 1 ? "" : "s");
        }
 
-       context_replace(pfolder, folder);  /* update current folder */
+       context_replace(curfolder, folder);  /* update current folder */
        seq_save(mp);  /* synchronize message sequences */
        context_save();  /* save the context file */
        folder_free(mp);  /* free folder/message structure */
index 32b7f15..b85186a 100644 (file)
@@ -231,7 +231,7 @@ main(int argc, char **argv)
        ** directory.  This should be moved to folder_delmsgs().
        */
        if (rmmproc) {
-               context_replace(pfolder, folder);
+               context_replace(curfolder, folder);
                context_save();
                fflush(stdout);
        }
@@ -253,7 +253,7 @@ main(int argc, char **argv)
                seq_setcur(mp, mp->hghsel);
        seq_save(mp);  /* synchronize message sequences */
 
-       context_replace(pfolder, folder);  /* update current folder   */
+       context_replace(curfolder, folder);  /* update current folder   */
        context_save();  /* save the context file   */
        folder_free(mp);  /* free folder structure   */
        done(0);
index 058b536..ff936bc 100644 (file)
@@ -329,7 +329,7 @@ main(int argc, char **argv)
                if (mp->numsel > 1)
                        adios(NULL, "only one message at a time!");
 
-               context_replace(pfolder, folder);  /* update current folder */
+               context_replace(curfolder, folder); /* update current folder */
                seq_setcur(mp, mp->lowsel);  /* update current message  */
                seq_save(mp);  /* synchronize sequences   */
                context_save();  /* save the context file   */
index 7d81a39..00104cf 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -111,11 +111,11 @@ main(int argc, char **argv)
        }
 
        if (rmf(folder) == OK) {
-               char *cfolder = context_find(pfolder);
+               char *cfolder = context_find(curfolder);
                if (cfolder && strcmp(cfolder, newfolder)) {
                        printf("[+%s now current]\n", newfolder);
                        /* update current folder */
-                       context_replace(pfolder, newfolder);
+                       context_replace(curfolder, newfolder);
                }
        }
        context_save();  /* save the context file */
index e599f6f..c1b1608 100644 (file)
--- a/uip/rmm.c
+++ b/uip/rmm.c
@@ -109,7 +109,7 @@ main(int argc, char **argv)
        ** folder_delmsgs().
        */
        if (rmmproc) {
-               context_replace(pfolder, folder);
+               context_replace(curfolder, folder);
                context_save();
                fflush(stdout);
        }
@@ -118,7 +118,7 @@ main(int argc, char **argv)
        folder_delmsgs(mp, unlink_msgs, 0);
 
        seq_save(mp);  /* synchronize message sequences  */
-       context_replace(pfolder, folder);  /* update current folder   */
+       context_replace(curfolder, folder);  /* update current folder   */
        context_save();  /* save the context file   */
        folder_free(mp);  /* free folder structure   */
        done(0);
index 1276d5b..5cac626 100644 (file)
@@ -223,7 +223,7 @@ main(int argc, char **argv)
                        done(1);
        seq_setprev(mp);  /* set the Previous-Sequence */
 
-       context_replace(pfolder, folder);  /* update current folder */
+       context_replace(curfolder, folder);  /* update current folder */
        seq_save(mp);  /* synchronize message sequences */
        context_save();  /* save the context file */
 
index 977b0e4..757b001 100644 (file)
@@ -244,7 +244,7 @@ usage:
 
        seq_setcur(mp, mp->hghsel);  /* update current message  */
        seq_save(mp);  /* synchronize sequences   */
-       context_replace(pfolder, folder);  /* update current folder   */
+       context_replace(curfolder, folder);  /* update current folder   */
        context_save();  /* save the context file   */
 
        if (headersw && vecp == 2)
index 5132c1f..0caab30 100644 (file)
@@ -277,7 +277,7 @@ main(int argc, char **argv)
 
        rename_msgs(mp, dlist);
 
-       context_replace(pfolder, folder);  /* update current folder */
+       context_replace(curfolder, folder);  /* update current folder */
        seq_save(mp);  /* synchronize message sequences */
        context_save();  /* save the context file */
        folder_free(mp);  /* free folder/message structure */