rem: sscanf(line, "%f", &r);
add: savelocale = setlocale(LC_NUMERIC, NULL); setlocale(LC_NUMERIC, "C"); sscanf(line, "%f", &r); setlocale(LC_NUMERIC, savelocale);
context: static float getfloat(void){    char *line;    int i;    float r;    line = getstr();    for (i = 0; line[i]; i++) {	if (!isdigit(line[i]) && line[i] != '.' && line[i] != '-') {	    SHOWMESSAGE(("That's not a float!"));	    return (BAD_INPUT);	}    }    /* An empty line is a legal error (hah!). */    if (!line[0])	return (BAD_INPUT);    sscanf(line, "%f", &r);    return (r);}