Thanks everyone :) I found that use this code was the easiest (perhaps not the BeOS way but it can be changed when a read line class/function exist in Haiku) FILE *file = fopen(str.String(), "r"); if (file != NULL) { char line [STRINGLENGTHCPY]; while (fgets (line, sizeof line, file ) != NULL ) { int len = strlen(line); if (len > 0 && line[len-1] == '\n') line[len-1] = '\0'; BuildFromJoystickDesc(line, info); } fclose(file); } -- MVH Fredrik Modéen