[Thread Prev][Thread Next][Index]

Re: gui interface problems, continue



Antonio,

Here is the hunk of code where this is failing.  You might try compiling
this into a test program on your system to see why the C routine
"sscanf" is failing?  Could it be some internationalization issue with
your linux system?

-- Jon

static float JC_String_ConvertLongitudeToFloat( char *string )
{
     float value=0;
     int n=0;
     char tempText[256]="";

     if ( (n = sscanf(string, "%f%s", &value, tempText)) != 2 ) {
          fprintf(stderr, "ERROR in JC_Utility.c:
JC_String_ConvertLongitudeToFloat(): sscan
f read %d items.\n", n);
          return 1;
     }
 ...
}

antonio rodriguez wrote:
> 
> Hi Jon,
> 
> I've tried all the combinations! (9.5w  9,5W    9.5W    9,5w)
> 
>  >One more thing:
> 
>  >Try putting in a space:  "9.5 W"
> 
> The systems resets automatically to that format
> 
> and always I get the same result, even if I try to use for example 352
> instead of 8w.
> 
> Seems to be a conflict with the ferret environment and my linux
> configuration but I'm not able to find the answer
> 
> Cheers,
> 
> Antonio
> 
> Jonathan Callahan wrote:
> 
> > Antonio,
> >
> > Try a 'W' instead of 'w'.
> >
> >
> > -- Jon
> >
> >
> > arv@ono.com wrote:
> >
> >
> >>----- Mensaje Original -----
> >>Remitente: Jonathan Callahan <callahan@pmel.noaa.gov>
> >>Fecha: Jueves, Junio 6, 2002 4:58 pm
> >>Asunto: Re: gui interface problem
> >>
> >>
> >>>Antonio,
> >>>
> >>>I don't have advice on the first couple of warnings but I do on the
> >>>syntax error.  In english we use '.' to separate integer and decimal
> >>>portions of a real number.  Ferret uses ',' to separate arguments
> >>>to a
> >>>command and doesn't understand the European notation '9,5' as a
> >>>number.
> >>>I hope that helps.
> >>>
> >>Hi Jonathan.
> >>
> >>Seems it doesn't work, because I get:
> >>
> >>Cannot interpret "9.5w" as a world coordinate. Value being reset
> >>
> >>And on the console appears this:
> >>
> >>ERROR in JC_Utility.c: JC_String_ConvertLongitudeToFloat(): sscanf read
> >>1 items.
> >>gsetviewport()   52 Viewport is not within the Normalized Device
> >>Coordinate unit square
> >>
> >>Any idea?
> >>
> >>Thanks in advance
> >>
> >>
> >> Antonio Rodriguez
> >> CICEM Agua del Pino
> >> Huelva, Spain
> >>
> >>
> >
> >


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement