Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mailparse.c
Go to the documentation of this file.
1 #include "ds_extern.h"
2 
3 #include "ds_proto.h"
4 
6 
7 #define TRUE 1
8 #define FALSE 0
9 
10 #define INT 1
11 #define FLOAT 2
12 #define DOUBLE 3
13 #define CHAR 4
14 
15 extern float otfIFNumber, ifNumber, scanNum;
16 
17 extern char prgName[], saveBuf[], oldBuf[], initials[],
19 
22 
25 
26 extern double which_two[2];
27 extern int which_two_i[2];
28 
29 int debug = 0;
30 int stopFlag = 0;
31 
32 int fbScanDone = 0,
36 
38 
39 static char *spaces = " ";
40 
41 
42 struct MAIL_PARSE {
43  char *msg;
44  int log;
46  int count;
47  int type;
48  char *format;
49  void *ptr;
50  int len;
51  int (*fctn)();
52  char *help;
53 };
54 
55 
56 struct MAIL_PARSE parse_table[] = {
57  /* Commands that change internal variables and are saved to dataserv.conf */
58 /* msg, log, save, cnt, type, fmt, *ptr, len, fctn(), *help */
59 
60  { "allowvelshift", 1, 1, 1, INT, "%d ", (void *)&otf.allowVelShift, 13, do_otfGridAllowVelShift, "0 | 1, toggle allowVelShift"},
61 
62  { "badchan", 1, 1, 1, INT, "%d ", (void *)&ignoreBadChans, 7, do_badChan, "0 | 1, toggle badchannel checking"},
63  { "baselines", 1, 1, 8, INT, "%d ", (void *)&otf.baselines[0], 9, do_baseLines, "8n, Set baseline regions to these 8 numbers"},
64 
65  { "clearignore", 1, 0, 0, 0, NULL, NULL, 11, do_clearIgnore, "Clear Ignore scan array."},
66 
67  { "debug", 1, 1, 1, INT, "%d ", (void *)&debug, 5, do_debug, "Turn on Debugging Output"},
68 
69  { "ephemobj", 1, 1, 1, INT, "%d ", (void *)&ephemObj, 8, do_ephemObj, "Lock Grid For Ephem's"},
70 
71  { "etimeclear", 1, 1, 1, 0, NULL, NULL, 10, do_etimeClear, "REset Function Call Time Listing"},
72  { "etimedump", 1, 1, 1, 0, NULL, NULL, 9, do_etimeDump, "Dump .h format of Function Calls"},
73  { "etimeshow", 1, 1, 1, 0, NULL, NULL, 9, do_etimeShow, "Show Function Call Time Listing"},
74 
75  { "fixedzero", 1, 1, 1, INT, "%d ", (void *)&fixedZero, 9, do_fixedzero, "Set zero point to center"},
76 
77  { "filename", 1, 0, 0, 0, NULL, NULL, 8, do_filename, "Set the Data File Name"},
78  { "gfilename", 1, 0, 0, 0, NULL, NULL, 9, do_gfilename, "Set the Gains File Name"},
79 
80  { "hard_copy", 1, 0, 0, 0, NULL, NULL, 9, do_hardCopy, "Print PS file of selected window"},
81  { "help", 0, 0, 0, 0, NULL, NULL, 4, do_help, "Displays this list"},
82 
83  { "ignore", 1, 1, 0, 0, NULL, NULL, 6, do_ignoreScan, "v n, ignore scan n in version v."},
84  { "ig_gains", 1, 1, 1, INT, "%d ", (void *)&ignore_gains, 8, do_ignoreGains, "0 | 1, Toggle gains ignoring"},
85  { "ig_pos", 1, 1, 1, INT, "%d ", (void *)&ignorePos, 6, do_ignorePos, "Ignore Source Position"},
86  { "ig_repaints", 1, 1, 1, INT, "%d ",(void *)&otf.ignoreAllRepaints,11, do_ignoreRepaints, "Ignore All Repaints Until NOT Set"},
87 
88  { "load", 0, 0, 0, 0, NULL, NULL, 4, do_load, "Load a Script of Commands"},
89 
90  { "mallocmap", 1, 0, 0, 0, NULL, NULL, 9, do_mallocmap, "Print out malloc map."},
91 
92  { "otf3dcube", 1, 0, 0, 0, NULL, NULL, 9, do_otf3dcube, "bc, ec: plot 3d of Grid"},
93  { "otf3dplot", 1, 0, 0, 0, NULL, NULL, 9, do_otf3dplot, "bc, ec: plot 3d of Grid"},
94  { "otfbadchan", 1, 0, 0, 0, NULL, NULL, 10, do_otfBadChan, "Array of bad channels"},
95  { "otfbaseline", 1, 1, 1, INT, "%d ", (void *)&otf.gridBaseLine, 11, do_otfBaseLine, "0 | 1, toggle baseline removal"},
96  { "otfbeamarm", 1, 1, 1, INT, "%d ",(void *)&otf.armBeamLocation,10, do_otfBeamArm, "0 | 1 Arm the flag to set Beam Location"},
97  { "otfbeamsize", 1, 1, 1, 0, NULL, NULL, 11, do_otfBeamSize, "0 | 1 [ra dec], toggle Beam Size Marker"},
98  { "otfchannelmap", 1, 0, 0, 0, NULL, NULL, 13, do_otfChannelMap, "c,x,y,s: Draw a Channel Map x by y, start @ c, space s"},
99  { "otfchans", 1, 1, 2, INT, "%d ", (void *)&otf.int_chans, 8, do_otfChans, "bc ec, set int. range bc to ec"},
100  { "otfcolorchoice", 1, 0, 0, 0, NULL, NULL, 14, do_otfColorChoice, "gray | pseudo | flame[1-6], Set otf-plot Color Choice"},
101  { "otfcutoff", 1, 0, 0, 0, NULL, NULL, 9, do_otfCutOff, "Lower level of an OTF Image"},
102  { "otfdisplayarray", 1, 1, 1, INT, "%d ", (void *)&otf.arrayNum, 15, do_otfDisplayArray, "0 | 1 | 2 | 3 | 4 | 5, Time ra dec az el"},
103  { "otfdebug", 1, 0, 0, 0, NULL, NULL, 8, do_otfSpectraDebug, "n, set OTF Spectral plot to n"},
104  { "otffixbadcells", 1, 0, 0, 0, NULL, NULL, 14, do_otfFixBadCells, "Fill in miss'n OTF cells"},
105  { "otfgamma", 1, 0, 0, 0, NULL, NULL, 8, do_otfGamma, "v, Set otf-plot Gamma factor to v"},
106  { "otfgridcellsizedec", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.manNyquistDec, 18, do_otfGridCellSizeDec, "x, Set Grid Dec size to x"},
107  { "otfgridcellsizera", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.manNyquistRa, 17, do_otfGridCellSizeRa, "x, Set Grid Ra size to x"},
108  { "otfgridchancompress", 1, 1, 1, INT, "%d ", (void *)&otf.chanCompress, 19, do_otfGridChanCompress, "i, Set Chan Smooth factor i"},
109  { "otfgridcols", 1, 1, 1, INT, "%d ", (void *)&otf.cols, 11, do_otfGridCols, "c, Set Map X Size in Cols"},
110  { "otfgriddec", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.manMapDec, 10, do_otfGridDec, "x, Set Grid Center Dec to x"},
111  { "otfgriddump", 1, 0, 0, 0, NULL, NULL, 11, do_otfGridDump, "filename, dump OTF values to file"},
112  { "otfgridfreqres", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.freqres, 14, do_otfGridFreqres, "freq, Set Grid Freq Resolution to 'freq'"},
113  { "otfgridinit", 1, 0, 0, 0, NULL, NULL, 11, do_otfGridInit, "Reinitializes OTF grid array"},
114  { "otfgridload", 1, 0, 0, 0, NULL, NULL, 11, do_otfGridLoad, "bs es [delay], loads scans bs to es"},
115  { "otfgridnoint", 1, 1, 1, INT, "%d ", (void *)&otf.noint, 12, do_otfGridNoint, "noint, Set Grid number of Channels to 'noint'"},
116  { "otfgridra", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.manMapRa, 9, do_otfGridRa, "x, Set Grid Center Ra to x"},
117  { "otfgridrestfreq", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.restfreq, 15, do_otfGridRestfreq, "freq, Set Grid Rest Freq to freq"},
118  { "otfgridrows", 1, 1, 1, INT, "%d ", (void *)&otf.rows, 11, do_otfGridRows, "c, Set Map Y Size in Rows"},
119  { "otfgridscale", 1, 0, 0, 0, NULL, NULL, 12, do_otfGridScale, "v, Set otf-plot Scaling factor to v"},
120  { "otfgridsizedec", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.manMapHeight, 14, do_otfGridSizeDec, "x, Set Grid Dec H to x"},
121  { "otfgridsizera", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.manMapWidth, 13, do_otfGridSizeRa, "x, Set Grid Ra W to x"},
122  { "otfgridsum", 1, 1, 1, 0, NULL, NULL, 10, do_otfSpectralSum, "Show Sum of all Scans in Grid"},
123  { "otfgridvelocity", 1, 1, 1, DOUBLE, "%f ", (void *)&otf.velocity, 15, do_otfGridVelocity, "vel, Set Grid Velocity to vel"},
124  { "otfifchoice", 1, 1, 1, INT, "0x%x ", (void *)&otf.chanSelOTF, 11, do_otfIFchoice, "n, Load IF Number n"},
125  { "otfinterp", 1, 0, 0, 0, NULL, NULL, 9, do_otfInterp, "Do a XY interpolation of OTF grid"},
126  { "otflistcells", 1, 0, 0, 0, NULL, NULL, 12, do_otfListCells, "List info on each map cell"},
127  { "otfloadchoice", 1, 0, 0, 0, NULL, NULL, 13, do_otfLoadChoice, "Preview|Step|Fast, Load"},
128  { "otflockscale", 1, 0, 0, 0, NULL, (void *)&otf.lockScale, 12, do_otfLockScale, "Lock Grid Scale"},
129  { "otfnumcolors", 1, 0, 0, 0, NULL, NULL, 12, do_otfNumColors, "n, Set otf-plot Color Range to n"},
130  { "otfregular", 1, 0, 0, 0, NULL, NULL, 10, do_otfRegular, "Return to raw OTF grid data"},
131  { "otfregiondelete", 1, 0, 0, 0, NULL, NULL, 15, do_remRegions, "Delete all Regions"},
132  { "otfregionlist", 1, 0, 0, 0, NULL, NULL, 13, do_listRegions, "List Loaded Regions"},
133  { "otfregionload", 1, 0, 0, 0, NULL, NULL, 13, do_loadRegion, "Load a Region file"},
134  { "otfregionon", 1, 0, 0, INT, "%d ", (void *)&otf.regionshow, 11, do_showRegion, "Show Region Outlines"},
135  { "otfrmbadchan", 1, 0, 0, 0, NULL, NULL, 12, do_otfRmBadChan, "Remove Bad Channels From Grid"},
136  { "otfrms", 1, 0, 0, 0, NULL, NULL, 6, do_otfRms, "Plot rms distribution on Map"},
137  { "otfrmrms", 1, 0, 0, INT, "%d ", NULL, 8, do_otfRmRMS, "rmslimit, Remove Cells with rms > rmslimit"},
138  { "otftsys", 1, 0, 0, 0, NULL, NULL, 7, do_otfTsys, "Plot Tsys distribution on Map"},
139  { "otftime", 1, 0, 0, 0, NULL, NULL, 7, do_otfTime, "Plot Total Integrated Time on Map"},
140  { "otfsendplot", 1, 0, 0, 0, NULL, NULL, 11, do_otfSendPlot, "Send the Current Spectral Plot to Linuxpops"},
141  { "otfsinglebin", 1, 1, 1, INT, "%d ", (void *)&otf.singleOtfBin, 12, do_otfSingleBin, "n, num of channels to bin in singleplot"},
142  { "otfsinglechan", 1, 1, 1, INT, "%d ", (void *)&otf.singleChan, 13, do_otfSingleChan, "n, set the OTF singleplot to chan #n"},
143  { "otfslice", 1, 0, 0, 0, NULL, NULL, 8, do_otfSlice, "Write out a single slice through map"},
144  { "otfspike", 1, 0, 0, 0, NULL, NULL, 8, spikeCheck, "max, Zero any fabs(data) > max"},
145  { "otfstatus", 1, 0, 0, 0, NULL, NULL, 9, do_otfStatus, "Print a brief summary of the current OTF map"},
146  { "otfvelrun", 1, 0, 0, 0, NULL, NULL, 9, do_otfVelRun, "b e # dir [delay], vel movie"},
147  { "otfzap", 1, 0, 0, 0, NULL, NULL, 6, do_zapCell, "col row, zap the data in cell: col x row"},
148  { "wotfinterp", 1, 0, 0, 0, NULL, NULL, 9, interpAndWrite, "Write out a XY interpolation of OTF grid"},
149 
150  { "printdata", 1, 0, 0, 0, NULL, NULL, 9, do_printData, "n, Print out N Lines of Data"},
151  { "printignorescans", 1, 0, 0, 0, NULL, NULL, 16, do_printIgnoreScans, "Print out scans ignored"},
152  { "printmapscans", 1, 0, 0, 0, NULL, NULL, 13, do_printMapScans, "Print out scans in OTF grid"},
153 
154  { "q", 0, 0, 0, 0, NULL, NULL, 1, do_quit, "Exit program"},
155  { "quit", 0, 0, 0, 0, NULL, NULL, 4, do_quit, "Exit program"},
156 
157  { "scan_done", 1, 0, 0, 0, NULL, NULL, 9, do_scanDone, "n, display scan #n"},
158  { "set_clip", 1, 1, 0, 0, NULL, NULL, 8, do_setClip, "n, Set beginning and ending clip length"},
159  { "status", 1, 0, 0, 0, NULL, NULL, 6, do_status, "Shows brief status msg"},
160  { "stop", 1, 0, 0, 0, NULL, NULL, 4, do_stop, "Stop any loops,load,velr"},
161 
162  { "xsync", 1, 0, 0, 0, NULL, NULL, 5, do_xsync, "0 | 1, toggle Xlib synchronize"},
163 
164  { NULL, 0, 0, 0, 0, NULL, NULL, 0, (void *)0, NULL }
165 };
166 
167 
168 char *vxstrtok();
169 
170 
171 int do_tiltmeter(buf)
172 char *buf;
173 {
174 
175  return(0);
176 }
177 
178 int do_load(buf)
179 char *buf;
180 {
181  char inBuf[256];
182  FILE *fp;
183 
184  if(buf)
185  {
186  stopFlag = 0;
187 
188  strcmprs(buf);
189 
190  fp = fopen(buf, "r");
191 
192  if(fp == NULL)
193  {
194  log_msg("DATASERV: Unable to open %s", buf);
195  return(1);
196  }
197 
198  while(fgets(inBuf, 256, fp) != NULL)
199  {
200  if(!strncmp(inBuf, "#", 1))
201  {
202  continue;
203  }
204 
205  parseMail(inBuf);
206 
207  if(stopFlag)
208  {
209  fclose(fp);
210  stopFlag = 0;
211 
212  return(0);
213  }
214  }
215 
216  fclose(fp);
217  }
218 
219  return(0);
220 }
221 
222 
223 int readMail(buf, len)
224 char *buf;
225 int len;
226 {
227  char *cp;
228  static char cmdbuf[4096];
229 
230  if(buf)
231  {
232  cp = vxstrtok(buf, NULL, "\n");
233  while(cp)
234  {
235  strcpy(cmdbuf, cp);
236  parseMail(cmdbuf);
237  cp = vxstrtok(NULL, cp, "\n");
238  }
239  }
240 
241  return(0);
242 }
243 
244 
245 int parseMail(buf)
246 char *buf;
247 {
248  char *s;
249  struct MAIL_PARSE *p;
250 
251  deNewLineIt(buf);
252 
253  ifNumber = 0.01;
254  strlwr(buf);
255 
256  if(strstr(buf, "fb_scan"))
257  {
258  fbScanDone = 1;
259  }
260  else
261  if(strstr(buf, "aos_scan"))
262  {
263  aosScanDone++;
264  }
265  else
266  if(strstr(buf, "dbe_scan"))
267  {
268  dbeScanDone = 1;
269  }
270  else
271  if(!strncmp(buf, "scan_done", 9))
272  {
273  fbScanDone = dbeScanDone = 1;
274  aosScanDone = 3;
275  }
276 
277  for(p=parse_table;p->msg;p++)
278  {
279  if(!strncmp(p->msg, buf, p->len))
280  {
281  if(p->log && strlen(buf) < 2048)
282  {
283  s = (char *)sock_name(last_msg());
284  if(s)
285  log_msg("%s: (%s) %s", prgName, sock_name(last_msg()), buf);
286  else
287  log_msg("%s: %s", prgName, buf);
288  }
289 
290  p->fctn(buf+p->len);
291  thisIsaRefresh = 0;
292  setInValid(0);
293 
294  return(0);
295  }
296  }
297  log_msg("Command %s NOT found", buf);
298  thisIsaRefresh = 0;
299  setInValid(0);
300 
301  return(0);
302 }
303 
304 
305 
306 int do_scanDone(buf)
307 char *buf;
308 {
309  restoreMsg = 0;
310  strcpy(saveBuf, oldBuf);
311 
312  if(buf)
313  {
314  scanNum = atof(buf);
315  }
316  else
317  {
318  return(1);
319  }
320 
321  if( fbScanDone || aosScanDone >= 3 || dbeScanDone )
322  {
323  dbeScanDone = 0;
324 
325  if(!thisIsaRefresh)
326  setInValid(1);
327 
328  verifyScanDone((int)scanNum);
329 
330  show_display();
331 
332  if(restoreMsg)
333  strcpy(oldBuf, saveBuf);
334  else
335  sprintf(oldBuf, "scan_done %d", (int)scanNum);
336 
337  return(0);
338  }
339 
340  return(1);
341 }
342 
343 
344 
346 {
348 
349  return(0);
350 }
351 
352 
353 
355 {
356  log_msg("Dataserv O.K.");
357 
358  return(0);
359 }
360 
361 
362 
363 int do_badChan(buf)
364 char *buf;
365 {
366  if(buf)
367  ignoreBadChans = atoi(buf);
368 
369  if(!thisIsaRefresh)
370  setInValid(1);
371 
372  verifyScanDone((int)scanNum);
373  fbScanDone = dbeScanDone = 1;
374  aosScanDone = 3;
375 
376  show_display();
377 
378  return(0);
379 }
380 
381 
382 
383 
384 int do_quit()
385 {
386  signalHandler();
387 
388  return(0);
389 }
390 
391 
392 
393 int do_stop()
394 {
395  stopFlag = 1;
396 
397  return(0);
398 }
399 
400 
401 int do_xsync(buf)
402 char *buf;
403 {
404  int v;
405 
406  if(buf)
407  {
408  v = atoi(buf);
409 
410  if(v == 0 || v == 1)
411  synchronize(v);
412  }
413 
414  return(0);
415 }
416 
417 
418 
419 int do_help(buf)
420 char *buf;
421 {
422  struct MAIL_PARSE *p;
423  char tbuf[128];
424  char *cp;
425 
426  cp = strtok(buf, " \n\t");
427 
428  sprintf(tbuf, "Command Arguments\n");
429  printf("\n%s\n", tbuf);
430 
431  if(sockmode)
432  {
433  log_msg(tbuf);
434  }
435 
436  for(p=parse_table;p->msg;p++)
437  {
438  if(cp)
439  {
440  if(!strncmp(p->msg, cp, strlen(cp)))
441  {
442  sprintf(tbuf, "%s: %s", p->msg, spaces);
443  strcpy(tbuf+18, p->help);
444  printf("%s\n", tbuf);
445 
446  if(sockmode)
447  {
448  log_msg(tbuf);
449  }
450  }
451  }
452  else
453  {
454  sprintf(tbuf, "%s: %s", p->msg, spaces);
455  strcpy(tbuf+18, p->help);
456  printf("%s\n", tbuf);
457 
458  if(sockmode)
459  {
460  log_msg(tbuf);
461  }
462 
463  }
464  }
465 
466  printKeySymHelp();
467 
468  return(0);
469 }
470 
471 
472 
473 int do_setClip(buf)
474 char *buf;
475 {
476  int which, val;
477  char *cp;
478 
479  if(buf)
480  {
481  cp = strtok(buf, " \n\t");
482  if(cp)
483  {
484  which = atoi(cp);
485  cp = strtok(NULL, " \n\t");
486  if(cp)
487  {
488  val = atoi(cp);
489  }
490  else
491  {
492  log_msg("Dataserv: clipdata command missing n designator");
493  return(1);
494  }
495  }
496  else
497  {
498  log_msg("Dataserv: clipdata command missing 'be' designator");
499  return(1);
500  }
501  }
502  else
503  return(1);
504 
505  if(which >= 0 && which < MAX_IF_NUMS)
506  sdp[which].clip = val;
507 
508  if(!thisIsaRefresh)
509  setInValid(1);
510 
511  verifyScanDone((int)scanNum);
512  fbScanDone = dbeScanDone = 1;
513  aosScanDone = 3;
514 
515  show_display();
516 
517  return(0);
518 }
519 
520 
522 char *buf;
523 {
524  extern int ignore_gains;
525 
526  if(buf)
527  ignore_gains = atoi(buf);
528 
529  if(!thisIsaRefresh)
530  setInValid(1);
531 
532  verifyScanDone((int)scanNum);
533  fbScanDone = dbeScanDone = 1;
534  aosScanDone = 3;
535 
536  show_display();
537 
538  return(0);
539 }
540 
541 
543 char *buf;
544 {
545  if(buf)
546  {
547  otf.ignoreAllRepaints = atoi(buf);
548  }
549 
550  log_msg("Setting ignoreAllRepaints to %d", otf.ignoreAllRepaints);
551 
552  return(0);
553 }
554 
555 int do_hardCopy(buf)
556 char *buf;
557 {
558  char *cp, win[80], file[128], tmp[256];
559  int land, rev;
560 
561  if(buf)
562  {
563  strcpy(tmp, buf);
564  cp = strtok(tmp, " \n\r");
565  if(cp)
566  strcpy(win, cp);
567  else
568  {
569  log_msg("Dataserv: Hardcopy command incomplete, window");
570  return(1);
571  }
572  cp = strtok(NULL, " \n\r");
573  if(cp)
574  strcpy(file, cp);
575  else
576  {
577  log_msg("Dataserv: Hardcopy command incomplete, filename");
578  return(1);
579  }
580  cp = strtok(NULL, " \n\r");
581  if(cp)
582  land = atoi(cp);
583  else
584  {
585  log_msg("Dataserv: Hardcopy command incomplete, land");
586  return(1);
587  }
588  cp = strtok(NULL, " \n\r");
589  if(cp)
590  rev = atoi(cp);
591  else
592  {
593  log_msg("Dataserv: Hardcopy command incomplete, rev");
594  return(1);
595  }
596  xgr_hardCopy(win, land, rev, file);
597  }
598 
599  return(0);
600 }
601 
602 
603 
605 {
606  do_hardCopy("dataserv /tmp/dataserv.pdf 1 1");
607  system("lpr /tmp/dataserv.pdf");
608  system("chmod 666 /tmp/dataserv.pdf");
609 
610  return(0);
611 }
612 
613 
615 {
616  do_hardCopy("otf /tmp/dataserv.pdf 1 1");
617  system("lpr /tmp/dataserv.pdf");
618  system("chmod 666 /tmp/dataserv.pdf");
619 
620  return(0);
621 }
622 
623 int do_makeGif(buf)
624 char *buf;
625 {
626  char *cp, win[80], file[128], tmp[256];
627 
628  if(buf)
629  {
630  strcpy(tmp, buf);
631  cp = strtok(tmp, " \n\r");
632  if(cp)
633  strcpy(win, cp);
634  else
635  {
636  log_msg("Dataserv: make_gif command incomplete");
637  return(1);
638  }
639  cp = strtok(NULL, " \n\r");
640  if(cp)
641  strcpy(file, cp);
642  else
643  {
644  log_msg("Dataserv: make_gif command incomplete");
645  return(1);
646  }
647  xgr_makeGif(win, file);
648  }
649 
650  return(0);
651 }
652 
653 
654 
655 char *vxstrtok(string, last_token, delim)
656 char *string, *last_token, *delim;
657 
658 /* char *vxstrtok(char *string, char *last_token, char *delim) --
659  * Like strtok, but can be used in VxWorks. The first call passes a non-NULL
660  * "string". A pointer to the first character in "string" not in "delim" is
661  * returned (or NULL if none). The next occurance of a character in "delim"
662  * past this first character is set to NUL and a second NUL is appended to
663  * "string". Subsequent calls must pass a NULL pointer "string" and the
664  * previous return value ("last_token"). In these calls, the NUL following
665  * last_token is replaced by the first character in "delim" and the scan
666  * continues until the next non-"delim" past this point is found or the
667  * end of the string is found (NULL returned). Again, if a non-"delim"
668  * character is found, the next "delim" character following it is replaced by
669  * a NUL.
670  */
671 
672 {
673  int n, i;
674  char *ptr, *ret;
675 
676  if(string) {
677  /* First call on a new string */
678  string[strlen(string)+1] = '\0'; /* Add a second NUL to the end */
679  ptr = string;
680  } else if(!last_token || !*last_token || !delim || !*delim)
681  return NULL;
682  else {
683  /* A subsequent call on the same string */
684  ptr = last_token + strlen(last_token); /* End of previous token */
685  *ptr++ = delim[0]; /* Put a delimiter back */
686  }
687  /* Scan for the next non-"delim" character */
688  for(n=strlen(delim); *ptr; ptr++) {
689  for(i=0; i < n && *ptr != delim[i]; i++)
690  continue;
691  if(i == n)
692  break; /* Found one */
693  }
694  if(!*ptr)
695  return NULL; /* End of string */
696 
697  ret = ptr++; /* Save beginning of token */
698 
699  /* Scan for next "delim" character */
700  for( ; *ptr; ptr++) {
701  for(i=0; i < n && *ptr != delim[i]; i++)
702  continue;
703  if(i != n)
704  break; /* Found one */
705  }
706  *ptr = '\0'; /* Mark the end */
707  return ret; /* Return the beginning */
708 }
709 
710 
712 {
713 /*
714  mallocmap();
715  */
716 
717  return(0);
718 }
719 
720 
721 
722 int do_fixedzero(buf)
723 char *buf;
724 {
725 
726  if(buf)
727  fixedZero = atoi(buf);
728 
729  if(!thisIsaRefresh)
730  setInValid(1);
731 
732  verifyScanDone((int)scanNum);
733  fbScanDone = dbeScanDone = 1;
734  aosScanDone = 3;
735 
736  show_display();
737 
738  return(0);
739 }
740 
741 
742 
743 int do_markers(buf)
744 char *buf;
745 {
746  extern int domarker;
747 
748  if(buf)
749  domarker = atoi(buf);
750 
751  if(!thisIsaRefresh)
752  setInValid(1);
753 
754  verifyScanDone((int)scanNum);
755  fbScanDone = dbeScanDone = 1;
756  aosScanDone = 3;
757 
758  show_display();
759 
760  return(0);
761 }
762 
763 
764 
765 int do_debug(buf)
766 char *buf;
767 {
768  if(buf)
769  {
770  debug = atoi(buf);
771  }
772 
773  return(0);
774 }
775 
776 
777 
778 /* OTF routines */
779 
781 char *buf;
782 {
783  if(buf)
784  {
785  otf.lockScale = atoi(buf);
786  }
787  else
788  {
789  otf.lockScale = 0;
790  }
791 
792  return(0);
793 }
794 
795 
796 int do_ephemObj(buf)
797 char *buf;
798 {
799  if(buf)
800  {
801  ephemObj = atoi(buf);
802  }
803  else
804  {
805  ephemObj = 0;
806  }
807 
808  return(0);
809 }
810 
811 
813 char *buf;
814 {
815  int i;
816 
817  if(buf)
818  {
819  i = atoi(buf);
820  }
821 
822  if(i == 0 || i == 2 || i == 4 || i == 8)
823  {
824  otf.chanCompress = i;
825  }
826 
827  return(0);
828 }
829 
830 
832 char *buf;
833 {
834  double f, atof();
835 
836  if(buf)
837  {
838  f = atof(buf);
839  }
840 
841  if(f > 0.0 )
842  {
843  otf.manNyquistRa = f;
844  }
845 
846  return(0);
847 }
848 
849 
850 
852 char *buf;
853 {
854  double f, atof();
855 
856  if(buf)
857  {
858  f = atof(buf);
859  }
860 
861  if(f > 0.0 )
862  {
863  otf.manNyquistDec = f;
864  }
865 
866  return(0);
867 }
868 
869 
871 char *buf;
872 {
873  double f, atof();
874 
875  if(buf)
876  {
877  f = atof(buf);
878  }
879 
880  if(f > 0.0 )
881  {
882  otf.manMapWidth = f;
883  }
884 
885  return(0);
886 }
887 
888 
889 
891 char *buf;
892 {
893  double f, atof();
894 
895  if(buf)
896  {
897  f = atof(buf);
898  }
899 
900  if(f > 0.0 )
901  {
902  otf.manMapHeight = f;
903  }
904 
905  return(0);
906 }
907 
908 
910 char *buf;
911 {
912  double f, atof();
913 
914  if(buf)
915  {
916  f = atof(buf);
917  }
918 
919  otf.restfreq = f;
920 
921  return(0);
922 }
923 
924 
926 char *buf;
927 {
928  double f, atof();
929 
930  if(buf)
931  {
932  f = atof(buf);
933  }
934 
935  otf.freqres = f;
936 
937  return(0);
938 }
939 
940 
942 char *buf;
943 {
944  int cols, atoi();
945 
946  if(buf)
947  {
948  cols = atoi(buf);
949  }
950 
951  otf.cols = cols;
952 
953  return(0);
954 }
955 
956 
958 char *buf;
959 {
960  int rows, atoi();
961 
962  if(buf)
963  {
964  rows = atoi(buf);
965  }
966 
967  otf.rows = rows;
968 
969  return(0);
970 }
971 
972 
974 char *buf;
975 {
976  int noint, atoi();
977 
978  if(buf)
979  {
980  noint = atoi(buf);
981  }
982 
983  otf.noint = noint;
984 
985  return(0);
986 }
987 
988 
990 char *buf;
991 {
992  int allow, atoi();
993 
994  if(buf)
995  {
996  allow = atoi(buf);
997  }
998 
999  otf.allowVelShift = allow;
1000 
1001  return(0);
1002 }
1003 
1004 
1006 char *buf;
1007 {
1008  double f, atof();
1009 
1010  if(buf)
1011  {
1012  f = atof(buf);
1013  }
1014 
1015  if(f >= 0.0 )
1016  {
1017  otf.manMapRa = f;
1018  }
1019 
1020  return(0);
1021 }
1022 
1023 
1024 
1026 char *buf;
1027 {
1028  double f, atof();
1029 
1030  if(buf)
1031  {
1032  f = atof(buf);
1033  }
1034 
1035  if(f >= -90.0 || f <= 90.0)
1036  {
1037  otf.manMapDec = f;
1038  }
1039 
1040  return(0);
1041 }
1042 
1043 
1045 char *buf;
1046 {
1047  double f, atof();
1048 
1049  if(buf)
1050  {
1051  f = atof(buf);
1052  }
1053 
1054  otf.velocity = f;
1055 
1056  return(0);
1057 }
1058 
1059 
1061 char *buf;
1062 {
1063  int i;
1064 
1065  if(buf)
1066  {
1067  i = atoi(buf);
1068  }
1069 
1070  if(i >=0 && i < 100)
1071  {
1072  otf.cutoff = i;
1073  }
1074 
1075  doOtfGridRePaint();
1076 
1077  return(0);
1078 }
1079 
1080 
1082 char *buf;
1083 {
1084  int i;
1085  char *cp, tmp[256];
1086  extern int ignoreBadChans;
1087 
1088  for(i=0;i<MAX_BAD_CHAN;i++)
1089  {
1090  badChanArray[i] = 0;
1091  }
1092 
1093  ignoreBadChans = 0;
1094 
1095  i = 0;
1096  if(buf)
1097  {
1098  strcpy(tmp, buf);
1099  cp = strtok(tmp, "\t\n ");
1100 
1101  while(cp)
1102  {
1103  badChanArray[i] = atoi(cp);
1104  cp = strtok(NULL, "\t\n ");
1105  ignoreBadChans++;
1106 
1107  i++;
1108  }
1109  }
1110 
1111  return(0);
1112 }
1113 
1114 
1115 
1117 char *buf;
1118 {
1119  int v;
1120 
1121  if(buf)
1122  {
1123  v = atoi(buf);
1124 
1125  if(v > otf.numSpectra)
1126  {
1127  log_msg("Requested spectra %d > numOfSpectra %d", v, otf.numSpectra);
1128  return(1);
1129  }
1130 
1131  otf.debugSpectra = v;
1132 
1133  if(!thisIsaRefresh)
1134  {
1135  setInValid(1);
1136  }
1137 
1138  verifyScanDone((int)scanNum);
1139  show_display();
1140  }
1141 
1142  return(0);
1143 }
1144 
1145 
1147 char *buf;
1148 {
1149  if(buf)
1150  {
1151  if(strstr(buf,"step"))
1152  {
1154  }
1155  else
1156  if(strstr(buf,"fast"))
1157  {
1159  }
1160  else
1161  {
1163  }
1164  }
1165 
1166  otf.noPlot = 0;
1167 
1168  return(0);
1169 }
1170 
1171 
1173 char *buf;
1174 {
1175  if(buf)
1176  {
1177  otf.chanSelOTF = atoi(buf);
1178  }
1179 
1180  if(otf.chanSelOTF < 0)
1181  {
1182  otf.chanSelOTF = 0;
1183  }
1184 
1186 
1187  return(0);
1188 }
1189 
1191 char *buf;
1192 {
1193  char *cp;
1194  int n;
1195 
1196  if(buf)
1197  {
1198  cp = strtok(buf, " \n\t");
1199  if(cp)
1200  {
1201  n = atoi(cp);
1202 
1203  if(n == 16 || n == 32 || n == 64 || n == 128 || n == 256)
1204  {
1205  xgr_setNumColors(n);
1206  }
1207  }
1208 
1209  if(otf.head == NULL)
1210  {
1211  return(1);
1212  }
1213 
1214  if(otf.lastAction == INTERP)
1215  {
1216  otfInterp();
1217  }
1218  else
1219  if(otf.lastAction == NORMAL_MAP)
1220  {
1221  paintOtfGrid();
1222  }
1223  else
1224  if(otf.lastAction == CHANNEL_MAP)
1225  {
1226  do_otfChannelMap(NULL);
1227  }
1228  }
1229 
1230  return(0);
1231 }
1232 
1233 
1235 {
1236  otf.newShade = 1;
1237 
1238  if(otf.head == NULL)
1239  {
1240  return(1);
1241  }
1242 
1243  otfInterp();
1244 
1245  return(0);
1246 }
1247 
1248 
1250 char *buf;
1251 {
1252  char *cp;
1253  int c;
1254 
1255  if(buf)
1256  {
1257  cp = strtok(buf, " \n\t");
1258  if(cp)
1259  {
1260  if(!strcmp(cp, "pseudo"))
1261  {
1262  c = PSEUDO;
1263  }
1264  else
1265  if(!strcmp(cp, "flame1"))
1266  {
1267  c = FLAME1;
1268  }
1269  else
1270  if(!strcmp(cp, "flame2"))
1271  {
1272  c = FLAME2;
1273  }
1274  else
1275  if(!strcmp(cp, "flame3"))
1276  {
1277  c = FLAME3;
1278  }
1279  else
1280  if(!strcmp(cp, "flame4"))
1281  {
1282  c = FLAME4;
1283  }
1284  else
1285  if(!strcmp(cp, "flame5"))
1286  {
1287  c = FLAME5;
1288  }
1289  else
1290  if(!strcmp(cp, "flame6"))
1291  {
1292  c = FLAME6;
1293  }
1294  else
1295  if(!strcmp(cp, "flame7"))
1296  {
1297  c = FLAME7;
1298  }
1299  else
1300  if(!strcmp(cp, "flame8"))
1301  {
1302  c = FLAME8;
1303  }
1304  else
1305  if(!strcmp(cp, "flame9"))
1306  {
1307  c = FLAME9;
1308  }
1309  else
1310  {
1311  c = GRAYSCALE;
1312  }
1313 
1314  xgr_setColorChoice(c);
1315  }
1316 
1317  otf.newShade = 1;
1318 
1319  if(otf.head == NULL)
1320  {
1321  if(sockmode)
1322  {
1323  to_helper("done");
1324  }
1325 
1326  return(1);
1327  }
1328 
1329  if(otf.lastAction == INTERP)
1330  {
1331  otfInterp();
1332  }
1333  else
1334  if(otf.lastAction == NORMAL_MAP)
1335  {
1336  paintOtfGrid();
1337  }
1338  else
1339  if(otf.lastAction == CHANNEL_MAP)
1340  {
1341  do_otfChannelMap(NULL);
1342  }
1343  }
1344 
1345  otf.colorChoice = c;
1346 
1347  if(sockmode && !dontsend)
1348  {
1349  to_helper("done");
1350  }
1351 
1352  return(0);
1353 }
1354 
1355 
1356 int do_otfGamma(buf)
1357 char *buf;
1358 {
1359  char *cp;
1360 
1361  if(buf)
1362  {
1363  cp = strtok(buf, " \n\t");
1364  if(cp)
1365  {
1366  otf.gamma = atof(cp);
1367  }
1368  }
1369 
1370  otf.valueMaxChanged = 1;
1371  otf.intenChanged = 1;
1372  otf.newShade = 1;
1373 
1374  if(otf.head == NULL)
1375  {
1376  return(1);
1377  }
1378 
1379  paintOtfGrid();
1380 
1381  return(0);
1382 }
1383 
1385 char *buf;
1386 {
1387  char *cp;
1388 
1389  if(buf)
1390  {
1391  cp = strtok(buf, " \n\t");
1392  if(cp)
1393  {
1394  otf.scaleFactor = atof(cp);
1395  }
1396  }
1397 
1398  otf.valueMaxChanged = 1;
1399  otf.intenChanged = 1;
1400  otf.newShade = 1;
1401 
1402  if(otf.head == NULL)
1403  {
1404  return(1);
1405  }
1406 
1407  paintOtfGrid();
1408 
1409  return(0);
1410 }
1411 
1413 char *buf;
1414 {
1415  char tb[80];
1416 
1417  if(buf)
1418  {
1419  otf.singleChan = atoi(buf);
1420  }
1421 
1422  if(!thisIsaRefresh)
1423  {
1424  setInValid(1);
1425  }
1426 
1427  sprintf(tb,"MSG_RPT Dataserv: Setting OTF Single Display Channel to %d.", otf.singleChan);
1428  to_monitor(tb);
1429 
1430  log_msg(tb);
1431 
1432  verifyScanDone((int)scanNum);
1433 
1434  show_display();
1435 
1436  return(0);
1437 }
1438 
1439 
1440 
1442 char *buf;
1443 {
1444  char tb[80];
1445  int old;
1446 
1447  old = otf.singleOtfBin;
1448 
1449  if(buf)
1450  {
1451  otf.singleOtfBin = atoi(buf);
1452  }
1453 
1454  if(!thisIsaRefresh)
1455  {
1456  setInValid(1);
1457  }
1458 
1459  if(otf.singleOtfBin > 32 || otf.singleOtfBin < 0)
1460  {
1461  log_msg("single Bin value %d, too big, or large", otf.singleOtfBin);
1462  otf.singleOtfBin = old;
1463  }
1464 
1465  sprintf(tb,"MSG_RPT Dataserv: Setting OTF Bin Number to %d.",otf.singleOtfBin);
1466 
1467  to_monitor(tb);
1468 
1469  log_msg(tb);
1470 
1471  verifyScanDone((int)scanNum);
1472 
1473  show_display();
1474 
1475  return(0);
1476 }
1477 
1478 
1480 char *buf;
1481 {
1482  char tb[80];
1483  static char *ar[] = { "AUTO", "TIME", "RA", "DEC", "AZ", "EL" };
1484  int old;
1485 
1486  old = otf.arrayNum;
1487 
1488  if(buf)
1489  {
1490  otf.arrayNum = atoi(buf);
1491  }
1492 
1493  if(!thisIsaRefresh)
1494  {
1495  setInValid(1);
1496  }
1497 
1498  if(otf.arrayNum>-1 && otf.arrayNum < 6)
1499  {
1500  sprintf(tb,"MSG_RPT Dataserv: Setting OTF Display Array to %s.",
1501  ar[otf.arrayNum]);
1502  to_monitor(tb);
1503  log_msg(tb);
1504 
1505  verifyScanDone((int)scanNum);
1506  show_display();
1507  }
1508  else
1509  {
1510  otf.arrayNum = old;
1511  }
1512 
1513  return(0);
1514 }
1515 
1516 int do_otfTsys(buf)
1517 char *buf;
1518 {
1520 
1521  otf.valueMaxChanged = 1;
1522  otf.intenChanged = 1;
1523  otf.newShade = 1;
1524 
1525  if(otf.head == NULL)
1526  {
1527  return(1);
1528  }
1529 
1530  paintOtfGrid();
1532 
1533  return(0);
1534 }
1535 
1536 
1537 
1538 int do_otfRms(buf)
1539 char *buf;
1540 {
1542 
1543  otf.valueMaxChanged = 1;
1544  otf.intenChanged = 1;
1545  otf.newShade = 1;
1546 
1547  if(otf.head == NULL)
1548  {
1549  return(1);
1550  }
1551 
1552  paintOtfGrid();
1554 
1555  return(0);
1556 }
1557 
1558 
1559 int do_otfTime(buf)
1560 char *buf;
1561 {
1563 
1564  otf.valueMaxChanged = 1;
1565  otf.intenChanged = 1;
1566  otf.newShade = 1;
1567 
1568  if(otf.head == NULL)
1569  {
1570  return(1);
1571  }
1572 
1573  paintOtfGrid();
1575 
1576  return(0);
1577 }
1578 
1579 int do_otfChans(buf)
1580 char *buf;
1581 {
1582  char *cp;
1583  char tmp[256];;
1584 
1585  strcpy(tmp, buf);
1586  cp = strtok(tmp," \n\t");
1587  if(cp)
1588  {
1589  otf.int_chans[0] = atoi(cp);
1590  }
1591  else
1592  {
1593  log_msg("Bad begin chan specifier in otfchans");
1594  return(1);
1595  }
1596 
1597  cp = strtok((char *)NULL," \n\t");
1598  if(cp)
1599  {
1600  otf.int_chans[1] = atoi(cp);
1601  }
1602  else
1603  {
1604  log_msg("Bad ending chan specifier in otfchans");
1605  return(1);
1606  }
1607 
1608  otf.valueMaxChanged = 1;
1609  otf.intenChanged = 1;
1610  otf.newShade = 1;
1611 
1612  if(otf.head == NULL)
1613  {
1614  return(1);
1615  }
1616 
1617  markDataDirty();
1618 
1619  paintOtfGrid();
1620 
1622 
1623  return(0);
1624 }
1625 
1626 
1628 char *buf;
1629 {
1630  int i;
1631  char *cp;
1632 
1633  cp = strtok(buf,"\n\t ");
1634  if(cp)
1635  {
1636  i = atoi(cp);
1637  }
1638  else
1639  {
1640  log_msg("do_otfBeamSize(), no arg specified");
1641  return(1);
1642  }
1643 
1644  cp = strtok(NULL,"\n\t ");
1645  if(cp)
1646  {
1647  otf.beamRa = atof(cp);
1648  }
1649 
1650  cp = strtok(NULL,"\n\t ");
1651  if(cp)
1652  {
1653  otf.beamDec = atof(cp);
1654  }
1655 
1656  otf.valueMaxChanged = 1;
1657  otf.intenChanged = 1;
1658  otf.newShade = 1;
1659  otf.placeBeamSize = i;
1660 
1661  if(otf.head == NULL)
1662  {
1663  return(1);
1664  }
1665 
1666  paintOtfGrid();
1668 
1669  return(0);
1670 }
1671 
1672 
1674 char *buf;
1675 {
1676  int i;
1677  char *cp;
1678 
1679  cp = strtok(buf,"\n\t ");
1680  if(cp)
1681  {
1682  i = atoi(cp);
1683  }
1684  else
1685  {
1686  log_msg("do_otfBeamArm(), no arg specified");
1687  return(1);
1688  }
1689 
1690  otf.armBeamLocation = i;
1691 
1692  return(0);
1693 }
1694 
1695 
1696 
1698 char *buf;
1699 {
1700  char *cp;
1701  int bl;
1702 
1703  cp = strtok(buf,"\n\t ");
1704  if(cp)
1705  {
1706  bl = atoi(cp);
1707  }
1708  else
1709  {
1710  log_msg("do_otfBaseLine(), no baseline specified");
1711  return(1);
1712  }
1713 
1714  otf.valueMaxChanged = 1;
1715  otf.intenChanged = 1;
1716  otf.newShade = 1;
1717  otf.gridBaseLine = bl;
1718 
1719  if(otf.head == NULL)
1720  {
1721  return(1);
1722  }
1723 
1724  paintOtfGrid();
1725 
1727 
1728  return(0);
1729 }
1730 
1731 
1732 
1734 char *buf;
1735 {
1736  char *cp, tmp[256];
1737  int i=0;
1738 
1739  strcpy(tmp, buf);
1740  cp = strtok(tmp, " \n\t");
1741  while(cp)
1742  {
1743  if(i > 7)
1744  {
1745  return(1);
1746  }
1747 
1748  otf.baselines[i++] = atoi(cp);
1749  cp = strtok(NULL, " \n\t");
1750  }
1751 
1752  if(otf.head == NULL)
1753  {
1754  return(1);
1755  }
1756 
1758 
1759  otf.valueMaxChanged = 1;
1760  otf.intenChanged = 1;
1761  otf.newShade = 1;
1762 
1763  paintOtfGrid();
1764 
1766 
1767  return(0);
1768 }
1769 
1770 
1771 
int save_config
Definition: mailparse.c:45
int regionshow
Definition: otf.h:188
int do_otfRegular(void)
Definition: otf.c:1073
int singleChan
Definition: otf.h:158
#define INT
Definition: mailparse.c:10
int off_center_line
double which_two[2]
float beamRa
Definition: otf.h:239
struct SOCK * last_msg(void)
float scaleFactor
Definition: otf.h:211
int do_otfGridRows(char *buf)
Definition: mailparse.c:957
struct SPECTRA_DISPLAY_PARAMS sdp[MAX_IF_NUMS]
Definition: obsmodes.c:84
int fitChan[2]
Definition: spectra.c:38
int spikeCheck(char *buf)
Definition: otf.c:1291
char saveBuf[16384]
Definition: dataserv.c:52
int debugSpectra
Definition: otf.h:161
int do_printIgnoreScans(void)
Definition: otf.c:699
int printKeySymHelp(void)
Definition: otf.c:2891
char * strcmprs(char *str)
int armBeamLocation
Definition: otf.h:192
int singleOtfBin
float otfIFNumber
Definition: otf.c:23
float beamDec
Definition: otf.h:240
int deNewLineIt(char *buf)
int ignorePos
Definition: spectra.c:34
int xgr_makeGif(char *win, char *file)
Definition: xgr.c:887
#define FLAME8
Definition: colors.h:42
float manMapDec
Definition: otf.h:228
int sockmode
Definition: dataserv.c:37
int parseMail(char *buf)
Definition: mailparse.c:245
int do_ephemObj(char *buf)
Definition: mailparse.c:796
int do_otfGridFreqres(char *buf)
Definition: mailparse.c:925
int to_monitor(char *buf)
Definition: dataserv.c:641
int do_otfBadChan(char *buf)
Definition: mailparse.c:1081
int do_calDone(void)
Definition: mailparse.c:345
#define MAX_MAIL_BOXES
Definition: defines.h:28
float manNyquistRa
Definition: otf.h:231
int do_otfChans(char *buf)
Definition: mailparse.c:1579
int do_etimeDump(void)
Definition: etime.c:194
#define LOAD_FAST
Definition: otf.h:17
int colorChoice
Definition: otf.h:181
int cutoff
Definition: otf.h:153
int chanSelOTF
Definition: otf.h:183
#define FLAME3
Definition: colors.h:37
int ephemObj
Definition: otf.c:25
int do_otfGridAllowVelShift(char *buf)
Definition: mailparse.c:989
struct HEADER * head
Definition: otf.h:246
int do_otfTsys(char *buf)
Definition: mailparse.c:1516
int aosScanDone
Definition: mailparse.c:33
int do_otfRmRMS(char *buf)
Definition: otf.c:5394
int verifyScanDone(int scn)
Definition: dataserv.c:606
FILE * fp
Definition: linuxpops.c:70
int do_otfColorChoice(char *buf)
Definition: mailparse.c:1249
int manualInitials
Definition: dataserv.c:34
#define FLAME2
Definition: colors.h:36
int numSpectra
Definition: otf.h:172
int placeBeamSize
Definition: otf.h:187
#define NORMAL_MAP
Definition: otf.h:11
int ignoreBadChans
Definition: mailparse.c:35
int do_otfTime(char *buf)
Definition: mailparse.c:1559
int which_two_i[2]
int do_otfGridChanCompress(char *buf)
Definition: mailparse.c:812
int do_otfLockScale(char *buf)
Definition: mailparse.c:780
int do_fixedzero(char *buf)
Definition: mailparse.c:722
#define PSEUDO
Definition: colors.h:34
int newShade
Definition: otf.h:164
int do_otfGridSizeDec(char *buf)
Definition: mailparse.c:890
int noint
Definition: otf.h:171
int lastAction
Definition: otf.h:179
int markDataDirty(void)
Definition: otf.c:2621
int useFixData
Definition: dataserv.c:40
#define PLOT_RMS
Definition: otf.h:52
int do_diagHarCopyServ(void)
Definition: mailparse.c:604
int do_otfBaseLine(char *buf)
Definition: mailparse.c:1697
int do_otfGridNoint(char *buf)
Definition: mailparse.c:973
int dbeScanDone
Definition: mailparse.c:34
struct MAIL_PARSE parse_table[]
Definition: mailparse.c:56
int do_gfilename(char *buf)
Definition: dataserv.c:1138
int do_otfDisplayArray(char *buf)
Definition: mailparse.c:1479
int debug
Definition: mailparse.c:29
char oldBuf[16384]
Definition: dataserv.c:52
int do_ignorePos(char *buf)
Definition: spectra.c:515
int doOtfGridRePaint(void)
Definition: otf.c:1104
int fbScanDone
Definition: mailparse.c:32
int int_chans[2]
Definition: otf.h:173
int whichPlot
Definition: otf.h:202
char * strlwr(char *str)
int do_otfSingleBin(char *buf)
Definition: mailparse.c:1441
int baselines[8]
Definition: otf.h:207
int do_otfNumColors(char *buf)
Definition: mailparse.c:1190
int allowVelShift
Definition: otf.h:191
int do_mallocmap(void)
Definition: mailparse.c:711
float chanCompress
Definition: otf.h:233
int do_listRegions(char *buf)
Definition: region.c:299
int log_msg(const char *fmt,...)
int xgr_setNumColors(int n)
Definition: xgr.c:93
#define FLAME1
Definition: colors.h:35
#define DOUBLE
Definition: mailparse.c:12
int do_help(char *buf)
Definition: mailparse.c:419
char initials[256]
Definition: dataserv.c:52
int do_otfSlice(char *buf)
Definition: otf.c:5964
int do_badChan(char *buf)
Definition: mailparse.c:363
Definition: sock.h:30
int do_otfGridCellSizeRa(char *buf)
Definition: mailparse.c:831
float manMapWidth
Definition: otf.h:229
#define MAX_IF_NUMS
Definition: defines.h:31
int do_load(char *buf)
Definition: mailparse.c:178
int do_otf3dplot(char *buf)
Definition: otf.c:5220
int setInValid(int w)
Definition: xgr.c:2333
int do_otfRmBadChan(void)
Definition: otf.c:1208
int do_otfGridSizeRa(char *buf)
Definition: mailparse.c:870
int xgr_hardCopy(char *win, int land, int rev, char *file)
Definition: xgr.c:851
int do_ignoreGains(char *buf)
Definition: mailparse.c:521
int do_hardCopy(char *buf)
Definition: mailparse.c:555
int valueMaxChanged
Definition: otf.h:176
int do_otfListCells(char *buf)
Definition: otf.c:5904
int auto_locate
int do_status(void)
Definition: mailparse.c:354
int chanSelOTF
Definition: otf.c:24
float manMapHeight
Definition: otf.h:230
int lockScale
Definition: otf.h:174
float manNyquistDec
Definition: otf.h:232
int manualVersion
Definition: dataserv.c:35
int gridBaseLine
Definition: otf.h:184
#define MAX_BAD_CHAN
Definition: defines.h:29
int doFsProcess
Definition: spectra.c:33
char errBuf[512]
Definition: dataserv.c:52
int singleChan
int dontsend
Definition: otf.c:28
char * msg
Definition: mailparse.c:43
int strcmp()
struct SOCK * mailBoxes[MAX_MAIL_BOXES]
Definition: mailparse.c:37
int do_otfGridVelocity(char *buf)
Definition: mailparse.c:1044
int do_loadRegion(char *buf)
Definition: region.c:354
int do_filename(char *buf)
Definition: dataserv.c:1100
int do_otfGamma(char *buf)
Definition: mailparse.c:1356
#define FLAME9
Definition: colors.h:43
#define LOAD_STEP
Definition: otf.h:16
int do_printData(char *buf)
Definition: dataserv.c:1053
float velocity
Definition: otf.h:236
int(* fctn)()
Definition: mailparse.c:51
int do_otfGridRa(char *buf)
Definition: mailparse.c:1005
int do_makeGif(char *buf)
Definition: mailparse.c:623
#define LOAD_PREVIEW
Definition: otf.h:15
int do_otfGridScale(char *buf)
Definition: mailparse.c:1384
int count
Definition: mailparse.c:46
int loadChoice
Definition: otf.h:178
int do_otfSpectralSum(char *buf)
Definition: otf.c:4791
int do_clearIgnore(void)
Definition: otf.c:741
#define FLAME6
Definition: colors.h:40
float gamma
Definition: otf.h:212
int do_scanDone(char *buf)
Definition: mailparse.c:306
int do_diagHarCopyGrid(void)
Definition: mailparse.c:614
float ifNumber
Definition: obsmodes.c:131
int do_otfGridDump(void)
Definition: otf.c:4059
void * ptr
Definition: mailparse.c:49
int do_otfSpectraDebug(char *buf)
Definition: mailparse.c:1116
int arrayNum
Definition: otf.h:159
int interpAndWrite(struct XGR_ *s)
Definition: otf.c:6299
int do_otfSingleChan(char *buf)
Definition: mailparse.c:1412
int do_otfBeamArm(char *buf)
Definition: mailparse.c:1673
int restoreMsg
Definition: obsmodes.c:127
char manVersion[80]
Definition: dataserv.c:52
char * sock_name(struct SOCK *handle)
int displayRequestedOtf(void)
Definition: otf.c:3737
#define FLAME7
Definition: colors.h:41
int badChanArray[MAX_BAD_CHAN]
Definition: otf.c:38
int do_ignoreRepaints(char *buf)
Definition: mailparse.c:542
int synchronize(int v)
Definition: dataserv.c:1036
int paintOtfGrid(void)
Definition: otf.c:1844
int do_remRegions(char *buf)
Definition: region.c:309
int do_ignoreScan(char *buf)
Definition: otf.c:448
int do_markers(char *buf)
Definition: mailparse.c:743
int type
Definition: mailparse.c:47
int xgr_setColorChoice(int c)
Definition: xgr.c:106
int rows
Definition: otf.h:170
#define PLOT_TIME
Definition: otf.h:54
int do_stop(void)
Definition: mailparse.c:393
int do_otfGridInit(void)
Definition: otf.c:4257
float manMapRa
Definition: otf.h:227
int thisIsaRefresh
Definition: dataserv.c:36
int cols
Definition: otf.h:169
#define CHANNEL_MAP
Definition: otf.h:13
float scanNum
Definition: dataserv.c:46
int do_debug(char *buf)
Definition: mailparse.c:765
int domarker
Definition: spectra.c:37
int do_otfLoadChoice(char *buf)
Definition: mailparse.c:1146
int do_otfBeamSize(char *buf)
Definition: mailparse.c:1627
int do_otfRms(char *buf)
Definition: mailparse.c:1538
int do_printMapScans(void)
Definition: otf.c:900
int do_otfInterp(void)
Definition: mailparse.c:1234
char * format
Definition: mailparse.c:48
int do_otfCutOff(char *buf)
Definition: mailparse.c:1060
int fixedZero
Definition: xgr.c:22
int readMail(char *buf, int len)
Definition: mailparse.c:223
int do_etimeClear(void)
Definition: etime.c:170
int do_otf3dcube(char *buf)
Definition: otf.c:4931
int stopFlag
Definition: mailparse.c:30
int do_otfGridCellSizeDec(char *buf)
Definition: mailparse.c:851
int intenChanged
Definition: otf.h:177
int do_tiltmeter(char *buf)
Definition: mailparse.c:171
char prgName[80]
Definition: dataserv.c:52
int do_otfIFchoice(char *buf)
Definition: mailparse.c:1172
int do_otfVelRun(char *buf)
Definition: otf.c:3904
#define GRAYSCALE
Definition: colors.h:33
int do_baseLines(char *buf)
Definition: mailparse.c:1733
struct OTF_STRUCT otf
Definition: specdata.c:100
int ignoreAllRepaints
Definition: otf.h:152
int do_otfFixBadCells(char *buf)
Definition: otf.c:5836
int doTPprocess
Definition: spectra.c:32
char * vxstrtok(char *string, char *last_token, char *delim)
Definition: mailparse.c:655
float restfreq
Definition: otf.h:235
int ignore_gains
Definition: obsmodes.c:126
int do_otfStatus(void)
Definition: otf.c:6152
int do_etimeShow(void)
Definition: etime.c:230
int do_setClip(char *buf)
Definition: mailparse.c:473
float freqres
Definition: otf.h:234
char * help
Definition: mailparse.c:52
int otfInterp(void)
Definition: otf.c:4282
int do_zapCell(char *buf)
Definition: otf.c:5497
void signalHandler(void)
Definition: dataserv.c:351
int do_showRegion(char *buf)
int do_quit(void)
Definition: mailparse.c:384
int show_display(void)
Definition: dataserv.c:680
int do_otfGridLoad(char *buf)
Definition: otf.c:4100
int do_otfGridCols(char *buf)
Definition: mailparse.c:941
#define INTERP
Definition: otf.h:12
int to_helper(char *buf)
Definition: dataserv.c:125
int do_otfGridDec(char *buf)
Definition: mailparse.c:1025
#define FLAME5
Definition: colors.h:39
int singleOtfBin
Definition: otf.h:160
int recomputeBaseLines(void)
Definition: otf.c:2662
int do_xsync(char *buf)
Definition: mailparse.c:401
char manInitials[80]
Definition: dataserv.c:52
int do_otfSendPlot(char *buf)
Definition: otf.c:3453
#define PLOT_TSYS
Definition: otf.h:53
int noPlot
Definition: otf.h:163
int do_otfGridRestfreq(char *buf)
Definition: mailparse.c:909
#define FLAME4
Definition: colors.h:38
int do_otfChannelMap(char *buf)
Definition: otf.c:4558