Branch: Tag:

2000-05-18

2000-05-18 08:33:07 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

bugfix ;)

Rev: lib/modules/Geography.pmod/Position.pike:1.2

31:    if (zero_type(_long))    {    string tmp; -  if (sscanf(_lat,"%sN %s",tmp,_long)==2) _long=tmp+"N"; -  else if (sscanf(_lat,"%sS %s",tmp,_long)==2) _long=tmp+"N"; -  else if (sscanf(_lat,"%s %s",tmp,_long)==2) _long=tmp; +  if (sscanf(_lat,"%sN %s",tmp,_long)==2) _lat=tmp+"N"; +  else if (sscanf(_lat,"%sS %s",tmp,_long)==2) _lat=tmp+"S"; +  else if (sscanf(_lat,"%sW %s",tmp,_lat)==2) _long=tmp+"W"; +  else if (sscanf(_lat,"%sE %s",tmp,_lat)==2) _long=tmp+"N"; +  else if (sscanf(_lat,"%s %s",tmp,_long)==2) _lat=tmp;    }    _lat=dwim(_lat,"NS");    if (stringp(_lat))
165:   string _sprintf(int t)   {    if (t=='O') -  return "Position("+longitude()+", "+latitude()+")"; +  return "Position("+latitude()+", "+longitude()+")";    return 0;   }