diff options
Diffstat (limited to 'pico')
-rw-r--r-- | pico/attach.c | 3 | ||||
-rw-r--r-- | pico/browse.c | 8 | ||||
-rw-r--r-- | pico/display.c | 11 | ||||
-rw-r--r-- | pico/file.c | 6 | ||||
-rw-r--r-- | pico/osdep/mswin.rc | 4 | ||||
-rw-r--r-- | pico/pico.h | 2 | ||||
-rw-r--r-- | pico/search.c | 15 |
7 files changed, 35 insertions, 14 deletions
diff --git a/pico/attach.c b/pico/attach.c index ff29efa7..be4a9fbf 100644 --- a/pico/attach.c +++ b/pico/attach.c @@ -62,9 +62,10 @@ AskAttach(char *cmnt, size_t cmntlen, LMLIST **lm) while(i){ if(i == 2){ - EXTRAKEYS menu_attach[4]; + EXTRAKEYS menu_attach[10]; int n; + memset(&menu_attach, 0, 10*sizeof(EXTRAKEYS)); menu_attach[n = 0].name = "^T"; menu_attach[n].label = N_("To Files"); menu_attach[n].key = (CTRL|'T'); diff --git a/pico/browse.c b/pico/browse.c index 87f1ecec..79940109 100644 --- a/pico/browse.c +++ b/pico/browse.c @@ -803,6 +803,14 @@ FileBrowse(char *dir, size_t dirlen, char *fn, size_t fnlen, static EXTRAKEYS opts[] = { {"^X", N_("Add Name"), CTRL|'X', KS_NONE}, {NULL, NULL, 0, KS_NONE}, + {NULL, NULL, 0, KS_NONE}, + {NULL, NULL, 0, KS_NONE}, + {NULL, NULL, 0, KS_NONE}, + {NULL, NULL, 0, KS_NONE}, + {NULL, NULL, 0, KS_NONE}, + {NULL, NULL, 0, KS_NONE}, + {NULL, NULL, 0, KS_NONE}, + {NULL, NULL, 0, KS_NONE} }; status = mlreply_utf8(_("Command to execute: "), diff --git a/pico/display.c b/pico/display.c index 84edf18e..96e3adb8 100644 --- a/pico/display.c +++ b/pico/display.c @@ -1558,6 +1558,8 @@ writeachar(UCS ucs) * answer already typed in. Carriage return accepts the * default. answer returned in buf which also holds the initial * default, nbuf is its length, def set means use default value. + * In order to be able to eliminate keys from a menu, EXTRAKEYS + * always has size 10. */ int mlreplyd(UCS *prompt, UCS *buf, int nbuf, int flg, EXTRAKEYS *extras) @@ -1619,6 +1621,7 @@ mlreplyd(UCS *prompt, UCS *buf, int nbuf, int flg, EXTRAKEYS *extras) } #endif + memset(&menu_mlreply, 0, 12*sizeof(KEYMENU)); menu_mlreply[0].name = "^G"; menu_mlreply[0].label = N_("Get Help"); KS_OSDATASET(&menu_mlreply[0], KS_SCREENHELP); @@ -1627,9 +1630,7 @@ mlreplyd(UCS *prompt, UCS *buf, int nbuf, int flg, EXTRAKEYS *extras) KS_OSDATASET(&menu_mlreply[i], KS_NONE); rfkm[2*i][1] = 0; if(extras){ - for(; extras[j].name && j != 2*(i-1); j++) - ; - + j = 2*(i-1); if(extras[j].name){ rfkm[2*i][1] = extras[j].key; menu_mlreply[i].name = extras[j].name; @@ -1646,9 +1647,7 @@ mlreplyd(UCS *prompt, UCS *buf, int nbuf, int flg, EXTRAKEYS *extras) menu_mlreply[i].name = NULL; rfkm[2*(i-6)+1][1] = 0; if(extras){ - for(; extras[j].name && j != (2*(i-6)) - 1; j++) - ; - + j = 2*(i-6) - 1; if(extras[j].name){ rfkm[2*(i-6)+1][1] = extras[j].key; menu_mlreply[i].name = extras[j].name; diff --git a/pico/file.c b/pico/file.c index 47c55968..405d2c6f 100644 --- a/pico/file.c +++ b/pico/file.c @@ -115,12 +115,13 @@ insfile(int f, int n) char fname[NLINE], dir[NLINE]; int retval, bye = 0, msg = 0; char prompt[64], *infile; - EXTRAKEYS menu_ins[5]; + EXTRAKEYS menu_ins[10]; EML eml; if (curbp->b_mode&MDVIEW) /* don't allow this command if */ return(rdonly()); /* we are in read only mode */ + memset(&menu_ins, 0, 10*sizeof(EXTRAKEYS)); fname[0] = dir[0] = '\0'; while(!bye){ /* set up keymenu stuff */ @@ -566,9 +567,10 @@ filewrite(int f, int n) register int s; char fname[NFILEN]; char shows[NLINE], origshows[NLINE], *bufp; - EXTRAKEYS menu_write[3]; + EXTRAKEYS menu_write[10]; EML eml; + memset(&menu_write, 0, 10*sizeof(EXTRAKEYS)); if(curbp->b_fname[0] != 0){ strncpy(fname, curbp->b_fname, sizeof(curbp->b_fname)); curbp->b_fname[sizeof(curbp->b_fname)-1] = '\0'; diff --git a/pico/osdep/mswin.rc b/pico/osdep/mswin.rc index b3d233a4..62e76a50 100644 --- a/pico/osdep/mswin.rc +++ b/pico/osdep/mswin.rc @@ -208,12 +208,12 @@ BEGIN VALUE "Comments", "see http://www.washington.edu/pine\0" VALUE "CompanyName", "University of Washington\0" VALUE "FileDescription", "Pico\0" - VALUE "FileVersion", "5.07\0" + VALUE "FileVersion", "5.08\0" VALUE "InternalName", "pico\0" VALUE "LegalCopyright", "Copyright 2006-2009\0" VALUE "OriginalFilename", "pico.exe\0" VALUE "ProductName", " pico\0" - VALUE "ProductVersion", "5.07\0" + VALUE "ProductVersion", "5.08\0" END END BLOCK "VarFileInfo" diff --git a/pico/pico.h b/pico/pico.h index 0b7b2b14..0605f992 100644 --- a/pico/pico.h +++ b/pico/pico.h @@ -379,7 +379,7 @@ typedef struct KBSTREE { */ #ifdef maindef PICO *Pmaster = NULL; /* composer specific stuff */ -char *version = "5.07"; /* PICO version number */ +char *version = "5.08"; /* PICO version number */ #else extern PICO *Pmaster; /* composer specific stuff */ diff --git a/pico/search.c b/pico/search.c index 69979702..1aae21cf 100644 --- a/pico/search.c +++ b/pico/search.c @@ -172,7 +172,17 @@ forwsearch(int f, int n) defpat[0] = '\0'; /* defaults: usual menu, search forward, not case sensitive */ - flags = SR_ORIGMEN | SR_FORWARD | SR_NOEXACT; + + flags = SR_ORIGMEN | SR_FORWARD; + + /* exact search is sticky -- that is, once one is done, so will be + * the next ones. This is consistent with all all searches being + * case insensitive by default. + */ + if((curwp->w_bufp->b_mode & MDEXACT) == 0) + flags |= SR_NOEXACT; + else + flags |= SR_EXACTSR; /* ask the user for the text of a pattern */ while(1){ @@ -934,8 +944,9 @@ readnumpat(char *utf8prompt) { int i, n; char numpat[NPMT]; - EXTRAKEYS menu_pat[2]; + EXTRAKEYS menu_pat[10]; + memset(&menu_pat, 0, 10*sizeof(EXTRAKEYS)); menu_pat[i = 0].name = "^T"; menu_pat[i].label = N_("No Line Number"); menu_pat[i].key = (CTRL|'T'); |