Skip to content
Snippets Groups Projects
Commit a6dafeaf authored by rswindell's avatar rswindell
Browse files

Added Help as menu item (F1 doesn't appear to be working from dialog_menu).

parent 91fcf9f4
No related branches found
No related tags found
No related merge requests found
...@@ -133,14 +133,14 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar ...@@ -133,14 +133,14 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar
if(option[cnt][0]==0) if(option[cnt][0]==0)
break; break;
options=cnt; options=cnt;
freecnt=cnt+4; freecnt=cnt+5; /* Help, Add, Delete, Copy, Paste */
// Allocate and fill **it // Allocate and fill **it
it=(char **)MALLOC(sizeof(char *)*2*(freecnt)); it=(char **)MALLOC(sizeof(char *)*2*(freecnt));
if(it==NULL) if(it==NULL)
return(-1); return(-1);
for(i=0;i<(cnt+4)*2;i++) { for(i=0;i<freecnt*2;i++) {
it[i]=(char *)MALLOC(MAX_OPLN+1); it[i]=(char *)MALLOC(MAX_OPLN+1);
if(it[i]==NULL) if(it[i]==NULL)
return(-1); return(-1);
...@@ -165,6 +165,10 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar ...@@ -165,6 +165,10 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar
width+=1; width+=1;
} }
strcpy(it[cnt2++],"H");
strcpy(it[cnt2++],"Help");
cnt++;
if(mode&WIN_INS) { if(mode&WIN_INS) {
strcpy(it[cnt2++],"A"); /* Changed from "I" */ strcpy(it[cnt2++],"A"); /* Changed from "I" */
strcpy(it[cnt2++],"Add New"); strcpy(it[cnt2++],"Add New");
...@@ -224,7 +228,7 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar ...@@ -224,7 +228,7 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar
} }
if(ret==-1) /* ESC */ if(ret==-1) /* ESC */
break; break;
if(ret==-2) { /* Help */ if(ret==-2 || str[0]=='H') { /* Help */
help(); help();
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment