Newsgroups: comp.os.msdos.djgpp From: "A. Jans-Beken" Subject: Allegro -> possible bug Content-Type: text/plain; charset=us-ascii Message-ID: <34B39B82.4D55@oce.nl> Sender: news AT oce DOT nl (The Daily News @ nntp01.oce.nl) Content-Transfer-Encoding: 7bit Organization: Océ-Nederland B.V. Mime-Version: 1.0 Date: Wed, 7 Jan 1998 15:13:06 GMT Lines: 33 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have noticed a difference between the allegro 2.2 function: pack_fgets(...) and the standard stdio function: fgets(...) It seems that the standard function reads a string INCLUDING the '\n' at the end while the packed function reads a string WITHOUT the trailing '\n'. In stdio code this means: int main() { ... fputs("hello\n", f); ... fgets(buffer,100,f); *(buffer + strlen(buffer) - 1) = '\0'; ... } versus the allegro code: int main() { ... pack_fputs("hello\n", f); ... pack_fgets(buffer,100,f); // String is already terminated by '\0' ... } Dono if this is the same in version 3. greetings, Twan Jans-Beken