[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20000524: NWX WATCH_BOX plotting



When choosing the SPC-->Current Svr Tstm Torn Watches option,
I have found that the watch boxes are not always plotted on
the map...depending on which products had been selected previously.

For example, if I select the Meso Discussion first, then the watchboxes
will not get plotted when I select that product.

The problem appears to stem from the srchInfo.srchstr not being initialized
(since the boxes are plotted before the text search routine is called). As
a result, in fosd.c fosd_getdata(), srchInfo.srchstr has the value of the
previously selected product- which eventually leads to not finding the
watch boxes in the cst_srch() call in srchb.c. If I select "All Watchboxes"
first so that the srchstr has "WWUS40 KMKC", then the problem doesn't appear,
nor does it appear if the value is "\0" the first time through.

Adding:
srchInfo.srchstr[0] = '\0';
to the fosd_wbox routine appears to correct this problem, though it
probably should really have the bulletin id being read from the table.

Steve


void fosd_wbox()

/************************************************************************
 * fosd_wbox                                                            *
 *                                                                      *
 * This routine will get, decode and plot the WATCHBOX data.            *
 *                                                                      *
 * fosd_wbox ( )                                                        *
 *                                                                      *
 * Input parameters:                                                    *
 *                                                                      *
 * Output parameters:                                                   *
 **                                                                     *
 * Log:                                                                 *
 * S. Jacobs/NCEP        7/98                                           *
 * S. Jacobs/NCEP        3/99   Removed & from var in fosd_getdata call *
 ***********************************************************************/

{

        int             i, iret, nw, numwtch;
        XmTextPosition  curpos;

        char            reparr[MAX_WATCHES][REPMAX];

/*---------------------------------------------------------------------*/

        iret = 0;

        srchInfo.sflag = 0;
        srchInfo.srchstr[0] = '\0';    /* Chiz/Unidata 5/00 */ 

        nw = 0;
...

etc.




Steve Chiswell
Unidata User Support