Commit 0a71c517 authored by saeed's avatar saeed

bug fixed

parent 41223da3
This diff is collapsed.
......@@ -33,7 +33,7 @@ static void drawonscreen_configure_thread(struct Vis *vis){
XDrawString(vis->dsp, pixmap, vis->gc,vis->w / 2 - txw,vis->h / 2,info,lenstring(info));
XCopyArea (vis->dsp, pixmap, vis->win, vis->gc,0, 0,vis->w, vis->h,0, 0);
XFreePixmap(vis->dsp,pixmap);
odbinfo_onotherwindow(vis, &odbinfo);
odbinfo_onotherwindow(vis, &odbinfo_set);
}
static void drawonscreen_motion_thread(struct Vis *vis, XEvent *e){
......
......@@ -54,7 +54,6 @@ struct stn_set{
int nt;
};
static struct station *stns;
static struct stn_set stn_set;
struct odbinfo{
......
......@@ -27,8 +27,6 @@ static int run_view(int argc,char *argv[]){
scdim.height = height;
scdim.symbol_radius = SYM_SIZE;
struct Colort *scolor = NULL;
stn_set = getstn_set(argc,argv,&odbinfo_set);
get2dfield_binary("landseamask.bin",&FLD);
......@@ -38,9 +36,7 @@ static int run_view(int argc,char *argv[]){
log_stn(&stn_set);
log_odb(&odbinfo_set);
return result;
struct Vis visu = init_x(width,height);
struct dsp_field dspf = adjusttowindowsize(&visu, &FLD);
......@@ -58,7 +54,7 @@ static int run_view(int argc,char *argv[]){
for (int i=0; i < NUM_THREADS;++i){
pthread_create(&thread_id[i], NULL, handle_event_thread, (void *)&visu_1);
}
handle_event(&visu,&visu_1,&dspf,scolor,ncolor,&scdim);
handle_event(&visu,&visu_1,&dspf,&scdim);
}
return result;
......
......@@ -243,31 +243,6 @@ static struct stn_set getstn_set(int argc, char *argv[], struct odbinfo_set *odb
return result;
}
static struct obs fill_obs(float *lonm, float *latm, int nx, int ny){
struct obs result = {NULL,NULL,stns->ns,stns->ns};
result.iindex = (int *)malloc(sizeof(int) *stns->ns);
result.jindex = (int *)malloc(sizeof(int) *stns->ns);
int im = -1;
for (int i=0; i < stns->ns;++i){
im = -1;
for(int j=0; j < ny;++j){
if (stns[i].lat >= latm[j]) im = j;
}
result.jindex[i] = im;
}
for (int i=0; i < stns->ns;++i){
im = -1;
for(int j=0; j < nx;++j){
if (stns[i].lon >= lonm[j]) im = j;
}
result.iindex[i] = im;
}
return result;
}
static struct obs_set fill_obs_set(float *lonm, float *latm, int nx, int ny){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment