On Tue, Dec 18, 2007 at 03:04:23PM +0100, VE3/IK5ROS - IK5ROS Marco Tarsi wrote: > Got a problem when I have updated my callmaster file. > The screen went dirty and character confusion when i digit > initial of callsign, and when I clear the entry box, some > of callsign riming on screen. > Problem come out when in the callmaster data file there is a "slashed call" > such as portable station or something like that.
The problem is not the slash but the length. The error is in searchlog.c's load_callmaster function, where, although the callmaster array is defined as char callmasterarray[MAX_CALLMASTER][9], calls are cut *after* the 9th character. This results in concatenating the calls indefinitely as long as they are longer than 8 characters. For example, if callmaster contains EA8/DJ1YFK/P, EA8/PA0R/P, EA8ZZ in a row, the callmaster array entry for EA8/DJ1YFK/P will become EA8/DJ1YFKEA8/PA0R/EA8ZZ. Diff attached, which cuts the callsigns properly. Still left to discuss whether one should only include calls without "/"s in the callmaster, or maybe just enlarge the array to, say, 15 characters. RAM limitations shouldn't be a matter nowadays? A quick awk script to generate a 'stripped' version of the actual master.scp for TLF would be trivial to write. 73, -- Fabian Kurz, DJ1YFK * Dresden, Germany * http://fkurz.net/
--- searchlog.c 2006-04-05 09:16:50.000000000 +0200 +++ searchlog.c-fix 2007-12-19 18:38:04.000000000 +0100 @@ -869,7 +869,7 @@ { s_inputbuffer[strlen(s_inputbuffer)-1]='\0'; - s_inputbuffer[9]='\0'; + s_inputbuffer[8]='\0'; strcpy(callmasterarray[count], s_inputbuffer) ; count++; } @@ -880,7 +880,7 @@ if(strlen(s_inputbuffer)>0) s_inputbuffer[strlen(s_inputbuffer)-1]='\0'; - s_inputbuffer[9]='\0'; + s_inputbuffer[8]='\0'; strcpy(callmasterarray[count], s_inputbuffer) ; count++;
_______________________________________________ Tlf-devel mailing list Tlf-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tlf-devel