3 #line 1 "edit_stations.ec"
20 extern unsigned long cmap[16];
33 Widget rowcol,rowcol3,pbutton,rowcol1;
39 double testdist,maxdist;
48 char *st[5],
buf[100],muf[10];
51 short int initial_toggle;
117 while(
saved!=NULL) {
150 testdist= pow((
double)(win_x-
r),2) + pow((
double)(win_y-
s),2);
151 testdist= pow(testdist,.5);
153 if(testdist < maxdist) {
217 if(sxadd==-1 && syadd==-1)
220 else if(sxadd==0 && syadd==-1)
223 else if(sxadd==-1 && syadd==0)
226 else if(sxadd==0 && syadd==0)
231 t=XmStringLtoRCreate(
buf,XmSTRING_DEFAULT_CHARSET);
234 XtSetArg(
args[argcount],XmNmessageString,t);argcount++;
235 XtSetArg(
args[argcount],XmNwidth, 250);argcount++;
236 XtSetArg(
args[argcount],XmNheight,225);argcount++;
237 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
238 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
239 XtSetArg(
args[argcount],XmNdialogStyle,
240 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
243 XtUnmanageChild(XmMessageBoxGetChild(
dialog,XmDIALOG_HELP_BUTTON));
248 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
249 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
250 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
251 rowcol=XmCreateRowColumn(
dialog,
"Edit Stations",
args,argcount);
253 t=XmStringLtoRCreate(
"Station Location",XmSTRING_DEFAULT_CHARSET);
255 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
256 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
257 XtManageChild(pbutton);
260 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
261 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
262 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
263 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
264 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
265 rowcol3=XmCreateRadioBox(rowcol,
"Edit Stations",
args,argcount);
275 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
276 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
277 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
279 if(
i==initial_toggle)
280 XtSetArg(
args[argcount],XmNset,True);
283 XtSetArg(
args[argcount],XmNset,False);
287 pbutton=XmCreateToggleButton(rowcol3,st[
i],
args,argcount);
289 XtManageChild(pbutton);
292 XtManageChild(rowcol3);
293 XtManageChild(rowcol);
308 #line 302 "edit_stations.ec"
309 #line 303 "edit_stations.ec"
324 #line 314 "edit_stations.ec"
332 else if((
int)data==2)
337 else if((
int)data==1)
342 else if((
int)data==3)
370 #line 355 "edit_stations.ec"
372 #line 356 "edit_stations.ec"
373 static const char *sqlcmdtxt[] =
374 #line 356 "edit_stations.ec"
376 #line 356 "edit_stations.ec"
377 "insert into mapper_offsets values ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )",
380 #line 356 "edit_stations.ec"
381 static ifx_statement_t _SQ0 = {0};
382 static ifx_sqlvar_t _sqibind[] =
384 { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
385 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
386 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
387 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
388 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
389 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
390 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
391 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
392 { 102,
sizeof(xoff), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
393 { 102,
sizeof(yoff), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
394 #line 356 "edit_stations.ec"
396 #line 356 "edit_stations.ec"
397 #line 356 "edit_stations.ec"
398 _sqibind[0].sqldata = id;
399 #line 356 "edit_stations.ec"
400 _sqibind[1].sqldata = pe1;
401 #line 356 "edit_stations.ec"
402 _sqibind[2].sqldata = pe2;
403 #line 356 "edit_stations.ec"
404 _sqibind[3].sqldata = dur;
405 #line 356 "edit_stations.ec"
406 _sqibind[4].sqldata = t;
407 #line 356 "edit_stations.ec"
408 _sqibind[5].sqldata = s;
409 #line 356 "edit_stations.ec"
410 _sqibind[6].sqldata = e;
411 #line 356 "edit_stations.ec"
412 _sqibind[7].sqldata = p;
413 #line 356 "edit_stations.ec"
414 _sqibind[8].sqldata = (
char *) &xoff;
415 #line 356 "edit_stations.ec"
416 _sqibind[9].sqldata = (
char *) &yoff;
417 sqli_stmt(ESQLINTVERSION, &_SQ0, sqlcmdtxt, 10, _sqibind, (
struct value *)0, (ifx_literal_t *)0, (ifx_namelist_t *)0, (ifx_cursor_t *)0, 6, 0, 0);
418 #line 356 "edit_stations.ec"
427 #line 359 "edit_stations.ec"
429 #line 361 "edit_stations.ec"
430 static const char *sqlcmdtxt[] =
431 #line 361 "edit_stations.ec"
433 #line 361 "edit_stations.ec"
434 "update mapper_offsets set ( xoff , yoff ) = ( ? , ? ) where id = ? and pe1 = ? and pe2 = ? and dur = ? and t = ? and s = ? and e = ? and p = ?",
437 #line 361 "edit_stations.ec"
438 static ifx_statement_t _SQ0 = {0};
439 static ifx_sqlvar_t _sqibind[] =
441 { 102,
sizeof(xoff), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
442 { 102,
sizeof(yoff), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
443 { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
444 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
445 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
446 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
447 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
448 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
449 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
450 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
451 #line 361 "edit_stations.ec"
453 #line 361 "edit_stations.ec"
454 #line 361 "edit_stations.ec"
455 _sqibind[0].sqldata = (
char *) &xoff;
456 #line 361 "edit_stations.ec"
457 _sqibind[1].sqldata = (
char *) &yoff;
458 #line 361 "edit_stations.ec"
459 _sqibind[2].sqldata = id;
460 #line 361 "edit_stations.ec"
461 _sqibind[3].sqldata = pe1;
462 #line 361 "edit_stations.ec"
463 _sqibind[4].sqldata = pe2;
464 #line 361 "edit_stations.ec"
465 _sqibind[5].sqldata = dur;
466 #line 361 "edit_stations.ec"
467 _sqibind[6].sqldata = t;
468 #line 361 "edit_stations.ec"
469 _sqibind[7].sqldata = s;
470 #line 361 "edit_stations.ec"
471 _sqibind[8].sqldata = e;
472 #line 361 "edit_stations.ec"
473 _sqibind[9].sqldata = p;
474 sqli_stmt(ESQLINTVERSION, &_SQ0, sqlcmdtxt, 10, _sqibind, (
struct value *)0, (ifx_literal_t *)0, (ifx_namelist_t *)0, (ifx_cursor_t *)0, 4, 0, 0);
475 #line 361 "edit_stations.ec"
498 #line 380 "edit_stations.ec"
499 #line 381 "edit_stations.ec"
514 #line 392 "edit_stations.ec"
569 #line 444 "edit_stations.ec"
void edit_stations(int win_x, int win_y, unsigned int win_button)
void change_custom_file(Widget w, XtPointer data, XtPointer call_data)
void change_station_location(Widget w, XtPointer data, XtPointer call_data)
void kill_widget(Widget, XtPointer, XtPointer)
sprintf(fbuf,"/usr/mapper/nexrad/ngrid.%02d-%02d-%02d-%02d", year, month, day, hour)
fprintf(fp,"%d %d %d %d 1\n", iminx, iminy, maxi, maxj)
char station_list_file[256]
void render_data(int, int)