NEURON
fmenu.cpp
Go to the documentation of this file.
1 #include <../../nrnconf.h>
2 /* /local/src/master/nrn/src/oc/fmenu.c,v 1.4 1996/02/16 16:19:25 hines Exp */
3 /*
4 fmenu.c,v
5  * Revision 1.4 1996/02/16 16:19:25 hines
6  * OCSMALL used to throw out things not needed by teaching programs
7  *
8  * Revision 1.3 1995/07/22 13:01:47 hines
9  * avoid unhandled exceptions in mswindows due to some function stubs
10  *
11  * Revision 1.2 1994/11/23 19:52:57 hines
12  * all nrnoc works in dos with go32
13  *
14  * Revision 1.1.1.1 1994/10/12 17:22:08 hines
15  * NEURON 3.0 distribution
16  *
17  * Revision 2.19 93/02/02 10:34:25 hines
18  * static functions declared before used
19  *
20  * Revision 1.3 92/08/18 07:31:36 hines
21  * arrays in different objects can have different sizes.
22  * Now one uses araypt(symbol, SYMBOL) or araypt(symbol, OBJECTVAR) to
23  * return index of an array variable.
24  *
25  * Revision 1.2 91/10/14 17:36:08 hines
26  * scaffolding for oop in place. Syntax about right. No action yet.
27  *
28  * Revision 1.1 91/10/11 11:12:01 hines
29  * Initial revision
30  *
31  * Revision 4.20 91/04/03 16:01:33 hines
32  * mistyped ||
33  *
34  * Revision 4.9 91/01/04 09:51:08 hines
35  * turboc++ sometimes fails with __TURBOC__ but succeeds with
36  * #if defined(__TURBOC__)
37  *
38  * Revision 3.77 90/07/20 09:45:49 hines
39  * case 3 allows actions to be executed when variable is changed
40  *
41  * Revision 3.50 90/02/17 10:12:25 mlh
42  * lint free on sparc and makfile good for sparc
43  *
44  * Revision 3.44 90/01/05 14:57:24 mlh
45  * min and max along with Jamie's changes that allow person to match
46  * upper char by typing lower char (works only with turboc)
47  *
48  * Revision 3.41 89/12/08 15:34:47 mlh
49  * infinite loop when searching for non-existent character starting
50  * at first menu item.
51  * Corrected with do{}while control structure.
52  *
53  * Revision 3.20 89/08/15 08:29:42 mlh
54  * compiles under turbo-c 1.5 -- some significant bugs found
55  *
56  * Revision 3.7 89/07/13 08:21:26 mlh
57  * stack functions involve specific types instead of Datum
58  *
59  * Revision 3.4 89/07/12 10:26:55 mlh
60  * Lint free
61  *
62  * Revision 3.3 89/07/10 15:45:56 mlh
63  * Lint pass1 is silent. Inst structure changed to union.
64  *
65  * Revision 2.0 89/07/07 11:36:43 mlh
66  * *** empty log message ***
67  *
68  * Revision 1.1 89/07/07 11:15:57 mlh
69  * Initial revision
70  *
71 */
72 
73 /* Copyright 1989,88,87- M.L. Hines, Neurobiology Dept.,DUMC, Durham, NC
74 *
75 * REVISION HISTORY:
76 *
77 * 5-19-89 let return start entry of number
78 * 5-04-89 Get it going on the SUN.
79 * 4-17-89 Added if HOC if FOCEXT statements to distinguish between FOCAL
80 * and HOC versions.
81 *
82 * Synopsis fmenu is a FOCAL menu management function
83 *
84 * x fmenu(args) where the following options are available:
85 *
86 * fmenu(nmenu,-1) allocates space for nmenu number of menus
87 * Menu identifier numbers start at 0,1,...nmenu-1
88 * fmenu(imenu,0) erase previous menu identified by imenu.
89 *
90 * fmenu(imenu,1,var list) add variables specified in list
91 * to imenu. The variable names will
92 * be added sequentially in the order
93 * specified.
94 *
95 * fmenu(imenu,2,"prompt","command") add the executable command
96 * specified by a prompt,command pair
97 * to imenu.
98 *
99 * fmenu(imenu) executes menu imenu, displays,
100 * navigates through imenu.
101 *
102 *
103 * Version 1.0 written by M.V. Evans and M.L. Hines 4-12-89
104 */
105 
106 #include <stdlib.h>
107 
108 #if defined(__GO32__)
109 #define G32 1
110 #include <dos.h>
111 #include <gppconio.h>
112 extern int egagrph; /* detect if in graphics mode */
113 #endif
114 
115 #if DOS
116 #include <dos.h>
117 #include <io.h>
118 union REGS regs;
119 extern int egagrph; /* detect if in graphics mode */
120 #else
121 #if !G32
122 static int egagrph = 0;
123 #endif
124 #endif
125 #include "hoc.h"
126 #include <ctype.h>
127 #if HOC | OOP
128 #define Ret(a) hoc_ret(); hoc_pushx(a)
129 #endif
130 #define NUL 0
131 #define SPACE '\040'
132 #define BEEP Printf("\007")
133 /* structure and functions from getsym.c */
134 #include "hocgetsym.h"
135 
136 /* Structure for single menu list */
137 typedef struct Menuitem{
138  struct Menuitem *pprevious; /* Pointer to a previous item */
139  short row, col; /* Coordinates of each menu item */
140  short type;
141  char *prompt; /* prompt, command used for actions */
142  char *command;
144  double symmin; /* min and max value for sym */
145  double symmax;
146  struct Menuitem *nextitem; /* Pointer to next menu item */
147 } Menuitem;
148 
149 /* menu types */
150 #define MENU_VAR 1
151 #define MENU_ACTION 2
152 
153 /* Summary of menu functions :
154  insert_menu(int r, int c, sym *sp ) - Stores row and col coordinates, and the symbol pointer specified in fcursor() as an item
155 in a structure list. Successive items are appended at the end of the list. This function returns the pointer for the beginning of the list.
156  display_menu(Menuitem *menu) - Displays the whole menu as specified by successive calls to fcursor. Recovers information stored for each menu item and prints the corresponding item variable name and value at its specified position.
157  destroy_menu(Menuitem *menu) - Frees the space allocated for the whole menu list.
158  navigate_menu(Menuitem *menu) - Allows user to move around the displayed menu by making use of the arrow keys.
159  erase_item(Menuitem *pnow) - Erases second line contents in menu
160 */
161 
162 
163 static int cexecute(const char*);
164 static char *navigate(int);
165 static Menuitem *append(); /*common code for appendsym,appendaction*/
166 static void appendvar(int, const char*, const char*);
167 static void appendaction(int, const char*, const char*);
168 static void destroy(int);
169 static double enter(int, int, double, int, Menuitem*);
170 static void prval(int, int, int, double);
171 static void prs(int, int, int, const char*);
172 static void undisplay(int);
173 
174 /* Structure pointer summary:
175  *pprev - pointer to previous item structure
176  *pnow - pointer to current item structure
177  *nextitem - pointer to next item - forward link
178  *pprevious - pointer to previous item - reverse link
179 */
180 
181 static int current_menu = -1; /* current menu number */
182 static int maxmenus;
183 static Menuitem **menusfirst; /* pointers to first menuitem in list*/
184 static Menuitem **menuslast; /* pointers to last menuitem in list*/
185 static Menuitem **menuscurrent; /* pointers to where navigate starts*/
186 static int first = 1; /* emacs_term has not been opened */
187 
188 #define diag(s) hoc_execerror(s, (char*)0);
189 #define chk(i) {if (i < 0 || i >= maxmenus) diag("menu number out of range");}
190 static void menu_manager(int nmenu) {
191  int previous;
192  char *command;
193  previous = current_menu;
194  current_menu = nmenu;
195  if (previous >= 0) {
196  undisplay(previous);
197  }else{
199  }
200  while((command = navigate(current_menu)) != (char *)0) {
201  if (cexecute(command) == 4) { /* 4 means stop was executed */
202  break;
203  }
204  }
205  if (previous >= 0) {
207  }
208  current_menu = previous;
209 }
210 
211 void hoc_fmenu(void) {
212  int imenu, flag, i, narg;
213 #ifdef WIN32
214  hoc_execerror("fmenu not available under mswindows.", "Use xpanel series");
215 #endif
216  imenu = *getarg(1);
217  if (!ifarg(2)) { /* navigate the menu */
218  chk(imenu);
219  menu_manager(imenu);
220  Ret(0.);
221  return;
222  }
223  flag = *getarg(2);
224  narg = 2;
225  switch (flag) {
226  case -1:
227  if (current_menu != -1) {
228  diag("can't destroy current menu");
229  }
230  if (maxmenus) {
231  for (i = 0; i < maxmenus; i++) {
232  destroy(i);
233  }
234  free((char *) menusfirst);
235  free((char *) menuslast);
236  }
237  maxmenus = 0;
238  menusfirst = (Menuitem **) emalloc((unsigned) (imenu * sizeof(Menuitem *)));
239  menuslast = (Menuitem **) emalloc((unsigned) (imenu * sizeof(Menuitem *)));
240  menuscurrent = (Menuitem **) emalloc((unsigned) (imenu * sizeof(Menuitem *)));
241 
242  maxmenus = imenu;
243  for (i = 0; i < maxmenus; i++) {
244  menusfirst[i] = menuslast[i] = menuscurrent[i]
245  = (Menuitem *) 0;
246  }
247  break;
248  case 0: chk(imenu);
249  if (current_menu == imenu) {
250  diag(" can't destroy current menu");
251  }
252  destroy(imenu);
253  appendaction(imenu, "Exit", "stop");
254  break;
255  case 1:
256  while (ifarg(narg = narg + 1)) {
257  appendvar(imenu, gargstr(narg), (char *) 0);
258  menuslast[imenu]->symmin = *getarg(narg = narg + 1);
259  menuslast[imenu]->symmax = *getarg(narg = narg + 1);
260  }
261  break;
262  case 2:
263  while (ifarg(narg = narg + 1)) {
264  char *prompt, *command;
265  prompt = gargstr(narg);
266  command = gargstr(narg = narg + 1);
267  appendaction(imenu, prompt, command);
268  }
269  break;
270  case 3:
271  while (ifarg(narg = narg + 1)) {
272  appendvar(imenu, gargstr(narg), gargstr(narg + 1));
273  menuslast[imenu]->symmin = *getarg(narg = narg + 2);
274  menuslast[imenu]->symmax = *getarg(narg = narg + 1);
275  }
276  break;
277  default:
278  diag("illegal argument flag");
279  break;
280  }
281  Ret (0.);
282 }
283 
284 static void xcursor(int r, int c){
285 #if DOS
286  _BH = 0;
287  _DH = r;
288  _DL = c;
289  _AH = 2;
290  geninterrupt(0x10);
291 #elif G32
292  union REGS regs;
293  regs.h.ah = 0x02;
294  regs.h.bh = 0;
295  regs.h.dh = r;
296  regs.h.dl = c;
297  if (egagrph) {
298  grx_move(r, c);
299  }else{
300  int86(0x10, &regs, &regs);
301  }
302 #endif
303 }
304 
305 static int ibmgetc(void){ /* Copied from ibm.c file in memacs */
306 #if DOS
307  regs.h.ah = 7;
308  intdos(&regs,&regs);
309  return (int)regs.h.al;
310 #elif G32
311  union REGS regs;
312  regs.h.ah = 7;
313  intdos(&regs,&regs);
314  return (int)regs.h.al;
315 #else
316  return 0;
317 #endif
318 }
319 
320 static Menuitem *append(int imenu){
321  Menuitem *last, *pnow;
322 
323  if (imenu < 0 || imenu >= maxmenus) {
324  diag("menu number out of range");
325  }
326  last = menuslast[imenu];
327  pnow = (Menuitem *)emalloc(sizeof(Menuitem));
328 
329  pnow->pprevious = last;
330  pnow->nextitem = (Menuitem *)0;
331  menuslast[imenu] = pnow;
332 
333  if (last) {
334  int col = last->col, row = last->row;
335  last->nextitem = pnow;
336  col += 13;
337  if (col > 77) {
338  row += 2;
339  col = 0;
340  }
341  pnow->row = row;
342  pnow->col = col;
343  }else{
344  menusfirst[imenu] = pnow;
345  pnow->row = 0;
346  pnow->col = 0;
347  menuscurrent[imenu] = pnow;
348  }
349 
350  pnow->type = 0;
351  pnow->prompt = (char *)0;
352  pnow->command = (char *)0;
353  pnow->psym = (Psym *)0;
354  return (pnow);
355 }
356 
357 static void appendvar(int imenu, const char* variable, const char* command)
358 {
359  Menuitem *item;
360  int i, len;
361  char buf[256];
362  Psym *p;
363 
364  item = append(imenu);
365  item->type = MENU_VAR;
366  item->psym = p = hoc_getsym(variable);
367  if (command) {
368  item->command = (char *)emalloc((unsigned)(strlen(command) + 1));
369  Strcpy(item->command, command);
370  }else{
371  item->command = (char *)0;
372  }
373  Sprintf(buf, "%s", p->sym->name);
374  len = strlen(buf);
375  for (i = 0; i < p->nsub; i++) {
376  Sprintf(buf+len, "[%d]", p->sub[i]);
377  len = strlen(buf);
378  }
379  item->prompt = (char *)emalloc((unsigned)(len+1));
380  Strcpy(item->prompt, buf);
381 }
382 
383 static void appendaction(int imenu, const char* prompt, const char* command)
384 {
385  Menuitem *item;
386  item = append(imenu);
387  item->type = MENU_ACTION;
388  item->prompt = (char *)emalloc((unsigned)(strlen(prompt) + 1));
389  Strcpy(item->prompt, prompt);
390  item->command = (char *)emalloc((unsigned)(strlen(command) + 1));
391  Strcpy(item->command, command);
392 }
393 
394 static void display(int imenu) {
395 
396  Menuitem *menu, *pnow;
397  int row, col;
398 
399  chk(imenu);
400  menu = menusfirst[imenu];
401  for(pnow=menu;pnow;pnow=pnow->nextitem){
402  row = pnow->row;
403  col = pnow->col;
404  prs(0, row, col, pnow->prompt);
405  switch (pnow->type) {
406  case MENU_VAR:
407  prval(0, row+1, col, hoc_getsymval(pnow->psym));
408  break;
409  }
410  }
411  xcursor(menuslast[imenu]->row+2, 0);
412 }
413 
414 
415 static void destroy(int imenu) {
416  Menuitem *menu;
417  Menuitem *pnow, *nextitem;
418 
419  menu = menusfirst[imenu];
420  menusfirst[imenu] = (Menuitem *)0;
421  menuslast[imenu] = (Menuitem *)0;
422  menuscurrent[imenu] = (Menuitem *)0;
423  for(pnow = menu;pnow;pnow = nextitem){
424  nextitem = pnow->nextitem;
425  if (pnow->prompt) {
426  free(pnow->prompt);
427  }
428  if (pnow->command) {
429  free((char *)pnow->command);
430  }
431  if (pnow->psym) {
432  free_arrayinfo(pnow->psym->arayinfo);
433  free((char *)pnow->psym);
434  }
435  free((char *)pnow);
436  }
437 }
438 
439 static char *navigate(int imenu) {
440  Menuitem *menu;
441  Menuitem *pcur, *pnow;
442  int row, col, key, current_col;
443  double val;
444 
445  menu = menusfirst[imenu];
446  if (menu == (Menuitem *)0) {
447  return (char *)0;
448  }
449  display(imenu);
450  pcur = menuscurrent[imenu];
451  key = 0;
452  while (key != 27) {
453  pnow = pcur; /* pnow is fixed hereafter */
454  row = pnow->row + 1;
455  col = pnow->col;
456  switch (pnow->type) {
457  case MENU_VAR:
458  val = hoc_getsymval(pnow->psym);
459  prval(1, row, col, val);
460  break;
461  case MENU_ACTION:
462  prs(1, row, col, "execute");
463  break;
464  }
465 
466  key = ibmgetc();
467  if(key == 27 || key == 3)
468  goto label;
469  if (key == 5) {
470  return "plt(-5)";
471  }
472  if(key == 0) { /* arrow key pressed */
473  key = ibmgetc();
474  switch(key) {
475  case 77: /* Right arrow key */
476  pcur = pcur->nextitem;
477  if(pcur == NUL)
478  pcur = menu;
479  break;
480  case 75: /* Left arrow key */
481  pcur = pcur->pprevious;
482  if (pcur == (Menuitem *)0) {
483  pcur = menuslast[imenu];
484  }
485  break;
486  case 80: /* Down key */
487  current_col = pnow->col;
488  do{
489  pcur=pcur->nextitem;
490  if(pcur == (Menuitem *)0) {
491  pcur = menu;
492  }
493  }while(pcur->col != current_col);
494  break;
495  case 72: /* Up key*/
496  current_col = pnow->col;
497  do{
498  pcur=pcur->pprevious;
499  if (pcur == (Menuitem *)0) {
500  pcur = menuslast[imenu];
501  }
502  }while(pcur->col != current_col);
503  break;
504  default:
505  BEEP;
506  break;
507  }
508  } else if( pnow->type == MENU_VAR && (
509  (isdigit(key) || key == '-' || key == '+'
510  || key == 015 || key =='.')) ){
511  prs(0, row, col, "");
512  val = enter(row, col,val,key, pnow);
513  hoc_assignsym(pnow->psym, val);
514  if (pnow->command) {
515  prs(0, pnow->row+1, pnow->col, "executing");
516  xcursor(menuslast[imenu]->row+2, 0);
517 
518  return pnow->command;
519  }
520  prval(1, row, col, val);
521  } else if (key == 015 && pnow->type == MENU_ACTION) {
522  prs(0, pnow->row+1, pnow->col, "executing");
523  xcursor(menuslast[imenu]->row+2, 0);
524 
525  return pnow->command;
526  } else if (isalpha(key)) {
527  pcur = pnow;
528  do {
529  pcur = pcur->nextitem;
530  if (pcur == (Menuitem *)0) {
531  pcur = menusfirst[imenu];
532  }
533  if ( toupper(pcur->prompt[0]) == toupper(key) )
534  break;
535  } while (pcur!=pnow);
536  } else {
537  BEEP;
538  }
539  menuscurrent[imenu] = pcur;
540 
541  switch (pnow->type) { /* the old one */
542  case MENU_VAR:
543  prval(0, row, col, val);
544  break;
545  case MENU_ACTION:
546  prs(0, row, col, "");
547  break;
548  }
549  }
550 label: xcursor(menuslast[imenu]->row+2, 0);
551  return (char *)0;
552 }
553 
554 static double enter(int row, int col, double defalt, int frstch, Menuitem* pnow)
555 {
556  char istr[80],*istrptr; int key;
557  double input;
558  char buf[10];
559 
560  istrptr = &istr[0];
561  xcursor(row,++col);
562  if(frstch !=13){
563  *istrptr++ = frstch;
564  sprintf(buf, "%c",istr[0]);
565  plprint(buf);
566  }
567  for(;;) {
568  key = ibmgetc();
569  if(isdigit(key)|| key =='.' || key == 'e'
570  || key == '-' || key == '+'){
571  sprintf(buf, "%c",key);
572  plprint(buf);
573  *istrptr++ = key;
574  continue;
575  } else if(key == 27){
576  return (defalt);
577  }else if (key == '\b') {
578  if (istrptr > istr) {
579 #if G32
580  if (egagrph) {
581  grx_backspace(1);
582  hoc_outtext(" ");
583  grx_backspace(1);
584  }else
585 #endif
586  Printf("\b \b");
587  *(--istrptr) = '\0';
588  }
589  }else if (key == 13){ /*return*/
590  *istrptr = '\0';
591  if(sscanf(istr, "%lf",&input) == 1)
592  if (input >= pnow->symmin && input <= pnow->symmax) {
593  return (input);
594  } else { /* input out of range */
595 BEEP;
596 Sprintf(istr, "Range %-5g", pnow->symmin);
597 prs(0, pnow->row, pnow->col, istr);
598 Sprintf(istr, "To %-5g ", pnow->symmax);
599 prs(0, pnow->row + 1, pnow->col, istr);
600 key = ibmgetc();
601 BEEP;
602 prs(0, pnow->row, pnow->col, pnow->prompt);
603 
604  return (defalt);
605  }
606  else{
607  return (defalt);
608  }
609  }else{
610  BEEP;
611  continue;
612  }
613  }
614 }/* end of function enter */
615 
616 static void prval(int oldnew, int row, int col, double val)
617 {
618  char string[100];
619  Sprintf(string,"%g",val);
620  prs(oldnew, row, col, string);
621 }
622 
623 static void prs(int oldnew, int row, int col, const char* string)
624 {
625  char buf[100];
626  xcursor(row, col);
627  if(oldnew == 0){
628  sprintf(buf, "%-13s",string);
629  plprint(buf);
630  }else{
631  sprintf(buf, "%13c", SPACE);
632  plprint(buf);
633  xcursor(row, col);
634  sprintf(buf,"<%s>",string);
635  plprint(buf);
636  }
637 }
638 
639 static int cexecute(const char* command) {
640  int i;
641  hoc_returning = 0;
642  hoc_execstr(command);
643  i = hoc_returning;
644  hoc_returning = 0;
645  return i;
646 }
647 
648 #if DOS || G32
649 #else
650 static void clrscr(void){
651 }
652 #endif
653 
654 static void undisplay(int imenu) {
655  int i;
656  if(egagrph !=0){
657 #if GRX
658  grx_txt_clear();
659 #else
660  xcursor(menusfirst[imenu]->row, 0);
661  for (i = menuslast[imenu]->row - menusfirst[imenu]->row + 2; i; i--) {
662  Printf("%80c\n", SPACE);
663  }
664 #endif
665  }else{
666  clrscr();
667  }
668 }
669 
670 void hoc_menu_cleanup(void) {
671  current_menu = -1;
672 }
673 
#define Printf
Definition: model.h:252
static void clrscr(void)
Definition: fmenu.cpp:650
int hoc_returning
Definition: code.cpp:141
Psym * hoc_getsym(const char *cp)
Definition: getsym.cpp:70
#define diag(s)
Definition: fmenu.cpp:188
char * prompt
Definition: fmenu.cpp:141
static int current_menu
Definition: fmenu.cpp:181
size_t p
static int maxmenus
Definition: fmenu.cpp:182
static int first
Definition: fmenu.cpp:186
static void destroy(int)
Definition: fmenu.cpp:415
Psym * psym
Definition: fmenu.cpp:143
Arrayinfo * arayinfo
Definition: hocgetsym.h:8
char * name
Definition: model.h:72
static int narg()
Definition: ivocvect.cpp:135
static int ibmgetc(void)
Definition: fmenu.cpp:305
#define chk(i)
Definition: fmenu.cpp:189
short col
Definition: fmenu.cpp:139
int sub[1]
Definition: hocgetsym.h:10
sprintf(buf," if (secondorder) {\ " int _i;\" " for(_i=0;_i< %d;++_i) {\" " _p[_slist%d[_i]]+=dt *_p[_dlist%d[_i]];\" " }}\", numeqn, listnum, listnum)
#define plprint
Definition: redef.h:110
#define gargstr
Definition: hocdec.h:14
void hoc_fmenu(void)
Definition: fmenu.cpp:211
double symmin
Definition: fmenu.cpp:144
static int cexecute(const char *)
Definition: fmenu.cpp:639
#define NUL
Definition: fmenu.cpp:130
static void undisplay(int)
Definition: fmenu.cpp:654
static double enter(int, int, double, int, Menuitem *)
Definition: fmenu.cpp:554
#define MENU_ACTION
Definition: fmenu.cpp:151
#define Ret(a)
Definition: fmenu.cpp:128
static void prval(int, int, int, double)
Definition: fmenu.cpp:616
static Menuitem ** menusfirst
Definition: fmenu.cpp:183
int val
Definition: dll.cpp:167
short type
Definition: fmenu.cpp:140
void hoc_execerror(const char *, const char *)
Definition: hoc.cpp:741
#define SPACE
Definition: fmenu.cpp:131
#define key
Definition: spt2queue.cpp:20
static Menuitem ** menuslast
Definition: fmenu.cpp:184
static void prs(int, int, int, const char *)
Definition: fmenu.cpp:623
void free_arrayinfo(Arrayinfo *a)
Definition: hoc.cpp:637
struct Menuitem * nextitem
Definition: fmenu.cpp:146
char * emalloc(unsigned n)
Definition: list.cpp:189
short row
Definition: fmenu.cpp:139
#define Strcpy
Definition: model.h:253
void hoc_menu_cleanup(void)
Definition: fmenu.cpp:670
struct Menuitem Menuitem
int ifarg(int)
Definition: code.cpp:1562
static void display(int imenu)
Definition: fmenu.cpp:394
Definition: hocgetsym.h:6
static char * navigate(int)
Definition: fmenu.cpp:439
static void menu_manager(int nmenu)
Definition: fmenu.cpp:190
#define getarg
Definition: hocdec.h:15
void hoc_execstr(const char *cp)
Definition: getsym.cpp:159
#define MENU_VAR
Definition: fmenu.cpp:150
#define i
Definition: md1redef.h:12
#define c
int nsub
Definition: hocgetsym.h:9
#define BEEP
Definition: fmenu.cpp:132
static int egagrph
Definition: fmenu.cpp:122
char buf[512]
Definition: init.cpp:13
static void appendaction(int, const char *, const char *)
Definition: fmenu.cpp:383
#define input(prompt, fmt, var)
Definition: matrix.h:368
double symmax
Definition: fmenu.cpp:145
void hoc_assignsym(Psym *p, double val)
Definition: getsym.cpp:151
#define Sprintf
Definition: model.h:248
struct Menuitem * pprevious
Definition: fmenu.cpp:138
static Menuitem * append()
static void xcursor(int r, int c)
Definition: fmenu.cpp:284
Symbol * sym
Definition: hocgetsym.h:7
static Menuitem ** menuscurrent
Definition: fmenu.cpp:185
double hoc_getsymval(Psym *p)
Definition: getsym.cpp:144
static void appendvar(int, const char *, const char *)
Definition: fmenu.cpp:357
char * command
Definition: fmenu.cpp:142