Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
env.c
Go to the documentation of this file.
1 /*
2 Copyright 2021 Arizona Board of Regents on behalf of the University of Arizona.
3 
4 For commercial uses, to obtain a license to sell and or sublicense copies of
5 the Software please contact the University of Arizona at Tech Launch Arizona:
6 lewish@tla.arizona.edu.
7 
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction for non-commercial use educational and
11 research purposes, including without limitation the rights to use, copy,
12 modify, merge, publish, distribute, and to permit persons to whom the Software
13 is furnished to do so, subject to the following conditions:
14 
15 The entire above copyright notice and this permission notice shall be included
16 in all copies or substantial portions of the Software.
17 
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 SOFTWARE.
25 
26 1. Additional Required Provisions
27 
28 1.1. Arbitration. The parties agree that if a dispute arises between them
29 concerning this Agreement, the parties may be required to submit the matter to
30 arbitration pursuant to Arizona law.
31 
32 1.2. Applicable Law and Venue. This Agreement shall be interpreted pursuant
33 to the laws of the State of Arizona. Any arbitration or litigation between the
34 Parties shall be conducted in Pima County, ARIZONA, and LICENSEE hereby
35 submits to venue and jurisdiction in Pima County, ARIZONA.
36 
37 1.3. Non-Discrimination. The Parties agree to be bound by state and federal
38 laws and regulations governing equal opportunity and non-discrimination and
39 immigration.
40 
41 1.4. Appropriation of Funds. The Parties recognize that performance by
42 ARIZONA may depend upon appropriation of funds by the State Legislature of
43 ARIZONA. If the Legislature fails to appropriate the necessary funds, or if
44 ARIZONA’S appropriation is reduced during the fiscal year, ARIZONA may cancel
45 this Agreement without further duty or obligation. ARIZONA will notify
46 LICENSEE as soon as reasonably possible after it knows of the loss of funds.
47 
48 1.5. Conflict of Interest. This Agreement is subject to the provisions of
49 A.R.S. 38-511 and other conflict of interest regulations. Within three years
50 of the EFFECTIVE DATE, ARIZONA may cancel this Agreement if any person
51 significantly involved in initiating, negotiating, drafting, securing, or
52 creating this Agreement for or on behalf of ARIZONA becomes an employee or
53 consultant in any capacity of LICENSEE with respect to the subject matter of
54 this Agreement.
55 
56  */
57 
58 
59 #include "extern.h"
60 
61 extern struct GSKEY getset[];
62 
63 #define ZRO ((struct ENVIRONMENT *)0)
64 
65 #define ENV_NOT_SAVED 0
66 #define ENV_SAVED 1
67 
70 
71 int envNumber = 0;
72 
73 /* These number should be protected */
74 double pi = M_PI;
75 double plancK = 6.62606957e-34;
76 double boltzmann = 1.3806488e-23;
77 double ctr = M_PI / 180.0; /* 0.017453293 */
78 double ctd = 180.0 / M_PI; /* 57.295779513 */
79 double sol = 299792458.0; /* Meters per sec */
80 
81 
82 double last_mouse_x = 0.0;
83 double last_mouse_x2 = 0.0;
84 double last_mouse_y = 0.0;
85 double last_mouse_y2 = 0.0;
86 double manual_tcal = 0.0;
87 double gnuplotLevel = 0.0;
88 
90 int stquiet = 0;
92 
94 
95 
96 struct ENV_VARIABLES {
97  char *label;
98  char *env_name;
99  char *variable;
100  char *alternitive;
101 };
102 
103 
105  { "Package Dir", "LINUXPOPS_HOME", pkg_home, "/home/staff/tfolkers/cactus/linuxpops/linuxpops"},
106  { "Data Dir", "OBSDAT", data_home, "./linuxpops" },
107  { "Obs Dir", "HOME", obs_home, "./" },
108  { "Obs Inits", "OBSINIT", obs_inits, "sys" },
109  { "Printer", "PRINTER", printer, "lp" },
110  { "Help Dir", "LINUXPOPS_HELP_DIR", help_home, "../help" },
111  { "Demo Dir", "DEMO_DIR", demo_dir, "../demo" },
112  { "Hostname", "HOST", hostname, "Unknown_Host" },
113  { "Session", "LPSESSION", session, "12345" },
114  { "Mailbox Defs", "MAILBOXDEFS", mailboxdefs, "../mailboxdefs" },
115  { "Site", "SITE", site_name, "SITE_NONE" },
116  { "Gnuplot Dir", "LINUXPOPS_GNUPLOT", gnuplot_ver, "/usr/bin/gnuplot" },
117 
118  { NULL, NULL, NULL, NULL }
119 };
120 
121 
122 struct DVARS_INIT {
123  char *name;
124  int type;
125  int *iaddr;
126  double *daddr;
127  void *offset;
128  int (*fctn)();
129 };
130 
131 
132 struct DVARS_INIT dvars_init[] = {
133  { "pi", DYN_TYPE_DOUBLE, NULL, &pi, 0, NULL },
134  { "planck", DYN_TYPE_DOUBLE, NULL, &plancK, 0, NULL },
135  { "boltzmann", DYN_TYPE_DOUBLE, NULL, &boltzmann, 0, NULL },
136  { "ctr", DYN_TYPE_DOUBLE, NULL, &ctr, 0, NULL },
137  { "ctd", DYN_TYPE_DOUBLE, NULL, &ctd, 0, NULL },
138  { "sol", DYN_TYPE_DOUBLE, NULL, &sol, 0, NULL },
139 
140 /* set DYN_VARIBLE_PROTECTED to be the number of these that user can't touch; currently 6 */
141 
142  { "last_mouse_x", DYN_TYPE_DOUBLE, NULL, &last_mouse_x, 0, NULL },
143  { "last_mouse_x2", DYN_TYPE_DOUBLE, NULL, &last_mouse_x2, 0, NULL },
144  { "last_mouse_y", DYN_TYPE_DOUBLE, NULL, &last_mouse_y, 0, NULL },
145  { "last_mouse_y2", DYN_TYPE_DOUBLE, NULL, &last_mouse_y2, 0, NULL },
146  { "manual_tcal", DYN_TYPE_DOUBLE, NULL, &manual_tcal, 0, NULL },
147 
148  { "interpl8_debug", DYN_TYPE_INT, &interpl8_debug, NULL, 0, NULL },
149  { "stquiet", DYN_TYPE_INT, &stquiet, NULL, 0, NULL },
150  { "use_multi_hist", DYN_TYPE_INT, &use_multi_hist, NULL, 0, NULL },
151 
152  { NULL, 0, NULL, NULL, 0, NULL }
153 };
154 
155 #define MAX_DVARS_INIT ((sizeof(dvars_init) / sizeof(struct DVARS_INIT))-1)
156 
157 
158 
159 int clearEnv()
160 {
161  int nenv;
162 
163  if(strlen(args->secondArg))
164  {
165  nenv = atoi(args->secondArg);
166 
167  if(nenv < 0 || nenv >= MAX_ENV)
168  {
169  st_fail("Env Number %d, out of range: 0 - %d", nenv, MAX_ENV);
170  return(1);
171  }
172 
173  st_report("Clearing Environment %d", nenv);
174 
175  bzero((char *)&CGM->envrs[nenv], sizeof(struct ENVIRONMENT));
176  }
177 
178  return(0);
179 }
180 
181 
182 
183 int setDVars()
184 {
185  int j;
186 
187 /* These are constant address variables */
188  for(j=0;j< MAX_DVARS_INIT;j++)
189  {
190  strcpy(dvars[j].name, dvars_init[j].name);
191  dvars[j].type = dvars_init[j].type;
192  dvars[j].fctn = dvars_init[j].fctn;
193 
194  if(dvars_init[j].type == DYN_TYPE_DOUBLE)
195  {
196  dvars[j].dval = dvars_init[j].daddr;
197  }
198  else
199  {
200  dvars[j].ival = dvars_init[j].iaddr;
201  }
202  }
203 
204  CGM->ndvars_used = j;
205 
206  return(0);
207 }
208 
209 
211 {
212  int i, ngs;
213  extern int getSizeOfGS();
214  struct GSKEY *p;
215 
216  ngs = getSizeOfGS();
217 
218  p = &getset[0];
219  for(i=0;i<ngs;i++,p++)
220  {
221  switch(p->type)
222  {
223  case INTEGER:
224  p->iaddr = (int *)((long)env + (long)p->offset);
225 
226 // st_report("Setting %s %d", p->name, *p->iaddr);
227  break;
228 
229  case DOUBLE:
230  p->daddr = (double *)((long)env + (long)p->offset);
231 // st_report("Setting %s %f", p->name, *p->daddr);
232  break;
233 
234  case CHARSTAR:
235  p->caddr = (char *)((long)env + (long)p->offset);
236 // st_report("Setting %s %s", p->name, p->caddr);
237  break;
238 
239  }
240  }
241 
242  return(0);
243 }
244 
245 int setEnv()
246 {
247  int tmp;
248 
249  if(strlen(args->secondArg))
250  {
251  tmp = atoi(args->secondArg);
252 
253  if(tmp >= 0 && tmp < MAX_ENV)
254  {
255  if(use_multi_hist) /* Save this env history first */
256  {
258  }
259 
260  envNumber = tmp;
261  env = &CGM->envrs[envNumber];
262 
264 
265  if(use_multi_hist) /* Open previous history for this env */
266  {
268  }
269 
270  if(strlen(env->title))
271  {
272  st_report("Switching to Environment %s", env->title);
273  }
274  else
275  {
276  st_report("Switching to Environment Index %d", envNumber);
277  st_report("Reseting this environment to the defaults");
278  resetParams();
279  st_report("Be Sure to set a data filename and 'name' this environment");
280  }
281 
282  if(strlen(env->filename))
283  {
284  subArgs(2, env->filename);
285  args->ntokens = 2;
286  loadFile();
287  }
288 
290  {
291  switch(env->currentImage)
292  {
293  case 0: _h0(); break;
294  case 1: _h1(); break;
295  case 2: _h2(); break;
296  case 3: _h3(); break;
297  case 4: _h4(); break;
298  case 5: _h5(); break;
299  case 6: _h6(); break;
300  case 7: _h7(); break;
301  case 8: _h8(); break;
302  case 9: _h9(); break;
303  }
304  }
305 
306  setDVars();
307 
308  mapGS2Env();
309 
310  env->accumreset = 1;
311 
312  freeY();
313  freeX();
314 
315  setPrompt();
316 
317  initLetterHelp();
318 
319  if(env->hwdc < 0.5) /* Check for Un-Initialized hardware duty-cycle */
320  {
321  env->hwdc = 0.9;
322  }
323 
324  initGnuplotBackground(); /* Check and Set Gnuplot background color */
325  }
326  else
327  {
328  st_fail("Environment Index %d out of range; Valid Range: 0 to %d", tmp, MAX_ENV-1);
329  }
330 
331  stackEmpty();
332  }
333  else
334  {
335  st_warn("Missing Arg for setEnv()");
336  }
337 
338  return(0);
339 }
340 
341 
342 int nameEnv()
343 {
344  if(strlen(args->secondArg))
345  {
346  sprintf( env->title, "%s %s %s %s", args->secondArg, args->thirdArg, args->fourthArg, args->fifthArg);
347  strcmprs(env->title);
348 
349  st_report("Named Environment %d to %s", envNumber, env->title);
350  }
351  else
352  {
353  st_warn("Missing Arg for nameEnv()");
354  }
355 
356  return(0);
357 }
358 
359 
360 int tellEnv()
361 {
362  int i;
363  char *active;
364 
365  printTimeStamp();
366 
367  reportEnv();
368 
369  st_report("Previously Defined Environments:");
370  st_report("Env Title Mode SMT Source Freq Data File");
371  st_report("");
372 
373  for(i=0;i<MAX_ENV;i++)
374  {
375  if(i == envNumber)
376  {
377  active = "*";
378  }
379  else
380  {
381  active = " ";
382  }
383 
384  if(strlen(CGM->envrs[i].title))
385  {
386  st_report("%2d%s %16.16s %9.9s %d %12.12s %6.2f %16.16s", i, active,
387  CGM->envrs[i].title,
388  modeStrs[CGM->envrs[i].mode],
389  CGM->envrs[i].issmt,
390  CGM->envrs[i].source,
391  CGM->envrs[i].freq,
392  basename(CGM->envrs[i].filename)
393  );
394  }
395  else
396  {
397  st_report("%2d%s %16.16s", i, active, "Unused");
398  }
399  }
400 
401  return(0);
402 }
403 
404 
405 int copyEnv()
406 {
407  int src = 0, dest = 0, len;
408 
409  len = strlen(args->secondArg);
410  if(len)
411  {
412  src = atoi(args->secondArg);
413  }
414 
415  len = strlen(args->thirdArg);
416  if(len)
417  {
418  dest = atoi(args->thirdArg);
419  }
420 
421  if(src < 0 || src > (MAX_ENV-1))
422  {
423  st_fail("Source Environment Index: %d, out of range", src);
424 
425  return(1);
426  }
427 
428  if(dest < 0 || dest > (MAX_ENV-1))
429  {
430  st_fail("Destination Environment Index: %d, out of range", dest);
431 
432  return(1);
433  }
434 
435  if(src == dest)
436  {
437  st_fail("Source & Destination are the same: %d %d", src, dest);
438  return(1);
439  }
440 
441  st_report("Coping Environment %d to %d", src, dest);
442 
443  bcopy((char *)&CGM->envrs[src], (char *)&CGM->envrs[dest], sizeof(struct ENVIRONMENT));
444 
445  if(dest == envNumber)
446  {
447  st_report("Force Reloading Current Env");
448 
449  subArgs(2, "%d", envNumber);
450 
451  setEnv();
452  }
453 
454  return(0);
455 }
456 
457 
459 {
460  struct ENV_VARIABLES *p;
461 
462  p = &env_vars[0];
463 
464  st_report("");
465 
466  for(;p->env_name;p++)
467  {
468  st_report("%-18s %-14.14s: %s", p->env_name, p->label, p->variable);
469  }
470 
471  st_report("");
472 
473  return(0);
474 }
475 
476 
478 {
479  char *cp, tbuf[256], cmdBuf[256];
480  struct ENV_VARIABLES *p;
481  FILE *fp;
482 
483  p = &env_vars[0];
484 
485  for(;p->env_name;p++)
486  {
487  cp = getenv(p->env_name);
488 
489  if(cp)
490  {
491  strcpy(p->variable, cp);
492  }
493  else
494  {
495  strcpy(p->variable, p->alternitive);
496  }
497 
498  if(strstr(p->env_name, "GNUPLOT")) /* Go get version */
499  {
500  sprintf(cmdBuf, "gnuplot -V");
501 
502  if( (fp = popen(cmdBuf, "r") ) <= (FILE *)0 )
503  {
504  st_fail("getEnvironment(): Unable to open %s", cmdBuf);
505 
506  continue;
507  }
508 
509  bzero(tbuf, sizeof(tbuf));
510 
511  /* Expected results: "gnuplot 4.4 patchlevel 0" */
512  while((cp = fgets(tbuf, sizeof(tbuf), fp)) != NULL)
513  {
514  deNewLineIt(tbuf);
515  strcat(p->variable, " -V ");
516  strcat(p->variable, tbuf+8); /* Skip the name */
517 
518  gnuplotLevel = atof(tbuf+8);
519 
520  break;
521  }
522 
523  pclose(fp);
524  }
525  }
526 
527  if(!strcmp(site_name, "KITT_PEAK"))
528  {
530  }
531  else
532  if(!strcmp(site_name, "MT_GRAHAM"))
533  {
535  }
536  else
537  if(!strcmp(site_name, "TUCSON"))
538  {
539  site = SITE_TUCSON;
540  }
541  else
542  {
543  site = SITE_NONE;
544  }
545 
546  return(0);
547 }
548 
549 
550 char *replace_str(char *str, char *orig, char *rep)
551 {
552  static char buffer[4096];
553  char *p;
554 
555  if(!(p = strstr(str, orig))) // Is 'orig' even in 'str'?
556  {
557  return str;
558  }
559 
560  strncpy(buffer, str, p-str); // Copy characters from 'str' start to 'orig' st$
561  buffer[p-str] = '\0';
562 
563  sprintf(buffer+(p-str), "%s%s", rep, p+strlen(orig));
564 
565  return(buffer);
566 }
567 
568 
570 {
571  int i;
572  char *cp, tbuf[256];
573  struct ENV_VARIABLES *p;
574 
576  {
577  st_report("substituteEnv(): Entering with %d tokens", args->ntokens);
578  }
579 
580  for(i=0;i<args->ntokens;i++)
581  {
582  p = &env_vars[0];
583 
584  for(;p->env_name;p++)
585  {
586  sprintf(tbuf, "$%s", p->env_name);
587 
588  if(verboseLevel & VERBOSE_PARSE)
589  {
590  st_report("substituteEnv(): Comparing if: %s is in: %s", tbuf, args->tok[i]);
591  }
592 
593  if(strstr(args->tok[i], tbuf))
594  {
595  if(verboseLevel & VERBOSE_PARSE)
596  {
597  st_report("substituteEnv(): Found %s in %s", tbuf, args->tok[i]);
598  }
599 
600  cp = replace_str(args->tok[i], tbuf, p->variable);
601 
602  if(verboseLevel & VERBOSE_PARSE)
603  {
604  st_report("substituteEnv(): New value: %s ", cp);
605  }
606 
607  strcpy(args->tok[i], cp);
608  }
609  }
610  }
611 
612  if(verboseLevel & VERBOSE_PARSE)
613  {
614  st_report("substituteEnv(): Leaving");
615  }
616 
617  return(0);
618 }
619 
620 
622 {
623  int i;
624  char tmp[256];
625 
626  st_report("Initializing Environments for site: %s", siteNames[site]);
627 
629  sprintf(onlineDataFile, "%s/sdd.%3.3s_%03d", data_home, obs_inits, onlineversion);
630 
631  env = &CGM->envrs[0]; /* Point to online env */
632  strcpy(env->filename, onlineDataFile); /* Set the online filename */
633  strcpy(env->title, "Online DBE");
634  env->mode = MODE_CONT;
635 
636  switch(site)
637  {
638  case SITE_KITT_PEAK:
639  env = &CGM->envrs[1]; /* Point to online env */
640  sprintf(tmp, "%s/sdd.%3.3s_%03d", data_home, obs_inits, onlineversion);
641  strcpy(env->filename, tmp); /* Set the online filename */
642  strcpy(env->title, "Online Filters");
643  env->mode = MODE_SPEC;
644 
645  env = &CGM->envrs[2]; /* Point to online env */
646  sprintf(tmp, "%s/sdd_hc.%3.3s_%03d", data_home, obs_inits, onlineversion);
647  strcpy(env->filename, tmp); /* Set the online filename */
648  strcpy(env->title, "Online MAC");
649  env->mode = MODE_SPEC;
650 
651  env = &CGM->envrs[3]; /* Point to online env */
652  sprintf(tmp, "%s/sdd_aro.%3.3s_%03d", data_home, obs_inits, onlineversion);
653  strcpy(env->filename, tmp); /* Set the online filename */
654  strcpy(env->title, "Online AROWS");
655  env->mode = MODE_SPEC;
656  break;
657 
658  case SITE_MT_GRAHAM:
659  env = &CGM->envrs[1]; /* Point to online env */
660  sprintf(tmp, "%s/sdd_ffb.%3.3s_%03d", data_home, obs_inits, onlineversion);
661  strcpy(env->filename, tmp); /* Set the online filename */
662  strcpy(env->title, "Online Filters");
663  env->mode = MODE_SPEC;
664 
665  env = &CGM->envrs[2]; /* Point to online env */
666  sprintf(tmp, "%s/sdd_aos.%3.3s_%03d", data_home, obs_inits, onlineversion);
667  strcpy(env->filename, tmp); /* Set the online filename */
668  strcpy(env->title, "Online AOS");
669  env->mode = MODE_SPEC;
670  break;
671 
672  case SITE_TUCSON:
673  break;
674  }
675 
676  for(i=0;i<MAX_ENV;i++)
677  {
678  if(CGM->envrs[i].tsyslimit == 0.0)
679  {
681  }
682 
683  if(CGM->envrs[i].tcallimit == 0.0)
684  {
686  }
687 
688  if(CGM->envrs[i].loopdelay1 == 0)
689  {
690  CGM->envrs[i].loopdelay1 = 100000; /* 100 mSecs */
691  }
692 
693  if(CGM->envrs[i].loopdelay2 == 0)
694  {
695  CGM->envrs[i].loopdelay2 = 2000000; /* 2 Secs */
696  }
697  }
698 
699  subArgs(2, "0");
700  setEnv();
701 
702  return(0);
703 }
704 
705 
709 int saveEnv()
710 {
711  bcopy((char *)env, (char *)&savedEnv, sizeof(savedEnv));
712 
714 
715  return(0);
716 }
717 
718 
723 {
724  if(envSaved == ENV_NOT_SAVED)
725  {
726  st_fail("No Environment Saved");
727 
728  return(1);
729  }
730 
731  bcopy((char *)&savedEnv, (char *)env, sizeof(savedEnv));
732 
734 
735  return(0);
736 }
int loadFile()
Definition: io.c:440
#define DOUBLE
Definition: defines.h:56
double boltzmann
Definition: env.c:76
int getSizeOfGS()
int * iaddr
Definition: gminit.h:9
char pkg_home[256]
Definition: makemem.c:97
char * strcmprs(char *str)
char gnuplot_ver[256]
Definition: strings.c:67
int _h0()
Definition: image.c:93
int resetParams()
Definition: params.c:61
struct PARSE_STACK * args
Definition: parse.h:196
int loopdelay2
Definition: env.h:68
char * caddr
Definition: gminit.h:10
int deNewLineIt(char *buf)
char site_name[256]
Definition: strings.c:67
int _h4()
Definition: image.c:137
double sol
Definition: env.c:79
int loopdelay1
Definition: env.h:67
int type
Definition: env.c:124
double last_mouse_x
Definition: env.c:82
double gnuplotLevel
Definition: env.c:87
int copyEnv()
Definition: env.c:405
int substituteEnv()
Definition: env.c:569
int mapGS2Env()
Definition: env.c:210
char * name
Definition: env.c:123
int rwHistory(int rw)
Definition: history.c:114
int getEnvironment()
Definition: env.c:477
int initGnuplotBackground()
Definition: display.c:100
int(* fctn)()
Definition: env.c:128
struct ENVIRONMENT envrs[MAX_ENV]
Definition: global.h:62
struct DYNAMIC_VARIABLES dvars[MAX_DYN_VARS]
Definition: parse.c:89
double tcallimit
Definition: env.h:270
#define MODE_CONT
Definition: defines.h:86
#define SITE_TUCSON
Definition: defines.h:132
int findDataVersion(char *ini, char *dir)
FILE * fp
Definition: linuxpops.c:70
char * fifthArg
Definition: parse.h:184
int nameEnv()
Definition: env.c:342
int currentImage
Definition: env.h:45
int initOnlineEnv()
Definition: env.c:621
#define BOGUS_TCAL_VALUE
Definition: defines.h:171
char title[80]
Definition: env.h:8
int envNumber
Definition: env.c:71
int _h9()
Definition: image.c:192
double ctr
Definition: env.c:77
int _h5()
Definition: image.c:148
double plancK
Definition: env.c:75
int stquiet
Definition: env.c:90
double * daddr
Definition: env.c:126
#define WRITE_HISTORY
Definition: makemem.c:85
#define BOGUS_TSYS_VALUE
Definition: defines.h:170
int setPrompt()
Definition: linuxpops.c:1532
int issmt
Definition: env.h:63
int _h3()
Definition: image.c:126
char * siteNames[]
Definition: strings.c:108
int tellEnv()
Definition: env.c:360
char mailboxdefs[256]
Definition: strings.c:67
int _h8()
Definition: image.c:181
char tok[MAX_TOKENS][MAX_TOKENS]
Definition: parse.h:176
#define INTEGER
Definition: defines.h:54
int _h2()
Definition: image.c:115
double * dval
Definition: commands.h:38
#define DYN_TYPE_INT
Definition: commands.h:30
char hostname[256]
Definition: strings.c:67
int clearEnv()
Definition: env.c:159
int use_multi_hist
Definition: env.c:91
struct ENVIRONMENT * env
Definition: linuxpops.c:71
#define SITE_MT_GRAHAM
Definition: defines.h:131
int ndvars_used
Definition: global.h:61
int initLetterHelp()
Definition: help.c:66
char * thirdArg
Definition: parse.h:182
char source[64]
Definition: env.h:11
int which_env
Definition: global.h:60
char * modeStrs[]
Definition: strings.c:90
double hwdc
Definition: env.h:205
struct ENVIRONMENT savedEnv
Definition: env.c:68
char printer[256]
Definition: makemem.c:97
double last_mouse_y
Definition: env.c:84
int currentImage
Definition: image.c:75
int envSaved
Definition: env.c:69
double last_mouse_x2
Definition: env.c:83
struct ENV_VARIABLES env_vars[]
Definition: env.c:104
void st_warn()
int * iaddr
Definition: env.c:125
int saveEnv()
Definition: env.c:709
void st_fail()
int freeX()
Definition: paxis.c:476
int restoreEnv()
Definition: env.c:722
void * offset
Definition: gminit.h:5
int strcmp()
#define DYN_TYPE_DOUBLE
Definition: commands.h:31
double * daddr
Definition: gminit.h:11
char * label
Definition: env.c:97
int onlineversion
Definition: linuxpops.c:79
struct GLOBAL_MEMORY * CGM
Definition: global.h:66
int stackEmpty(void)
Definition: stack.c:232
char onlineDataFile[256]
Definition: makemem.c:97
int(* fctn)()
Definition: commands.h:41
#define READ_HISTORY
Definition: makemem.c:84
char obs_home[256]
Definition: makemem.c:97
struct DVARS_INIT dvars_init[]
Definition: env.c:132
char session[80]
Definition: strings.c:67
#define SITE_NONE
Definition: defines.h:129
int reportEnv()
Definition: env.c:458
int mode
Definition: env.h:75
#define MODE_SPEC
Definition: defines.h:87
int accumreset
Definition: env.h:18
#define CHARSTAR
Definition: defines.h:57
void st_report()
#define SITE_KITT_PEAK
Definition: defines.h:130
int last_plot
Definition: env.c:93
int site
Definition: linuxpops.c:87
struct GSKEY getset[]
int setEnv()
Definition: env.c:245
int interpl8_debug
Definition: env.c:89
char obs_inits[256]
Definition: makemem.c:97
char * alternitive
Definition: env.c:100
char help_home[256]
Definition: makemem.c:97
char * fourthArg
Definition: parse.h:183
char * replace_str(char *str, char *orig, char *rep)
Definition: env.c:550
char * env_name
Definition: env.c:98
#define ENV_NOT_SAVED
Definition: env.c:65
char * variable
Definition: env.c:99
int setDVars()
Definition: env.c:183
int _h6()
Definition: image.c:159
double freq
Definition: env.h:197
void subArgs(int wt, const char *fmt,...)
Definition: parse.c:430
double manual_tcal
Definition: env.c:86
#define LAST_PLOT_SPEC_ACCUM
Definition: defines.h:156
Definition: gminit.h:4
char data_home[256]
Definition: makemem.c:97
char * secondArg
Definition: parse.h:181
int ntokens
Definition: parse.h:173
#define MAX_ENV
Definition: defines.h:35
double pi
Definition: env.c:74
#define ENV_SAVED
Definition: env.c:66
int _h7()
Definition: image.c:170
char demo_dir[256]
Definition: strings.c:67
#define MAX_DVARS_INIT
Definition: env.c:155
int _h1()
Definition: image.c:104
double last_mouse_y2
Definition: env.c:85
int printTimeStamp()
Definition: linuxpops.c:1498
char filename[256]
Definition: env.h:9
#define VERBOSE_PARSE
Definition: makemem.c:90
int type
Definition: gminit.h:7
double tsyslimit
Definition: env.h:275
void * offset
Definition: env.c:127
double ctd
Definition: env.c:78
int freeY()
Definition: paxis.c:488
Definition: env.h:7
int verboseLevel
Definition: linuxpops.c:80