From: "Paulo J. Matos aka PDestroy" Newsgroups: comp.os.msdos.djgpp Subject: Re: fgets Max Chars Date: Sat, 29 Jul 2000 22:00:58 +0200 Lines: 40 Message-ID: <8lvgu6$u2e$1@duke.telepac.pt> References: <8luvll$tj6$1 AT duke DOT telepac DOT pt> NNTP-Posting-Host: 213.22.2.157 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Damian Yerrick Wrote: >On Sat, 29 Jul 2000 17:06:13 +0200, "Paulo J. Matos aka PDestroy" > wrote: > >>#include >> >>int main(void) { >> char *s; >> >> s=malloc(3000); >> >> fgets(s, 3000, stdin); >> return 1; >>} >> >>Althought I malloced 3000 chars I am only able to write 129... For example: >>Compile it, and just start to write... After a bunch of chars (129 from my >>experience), your PC will beep and you cannot write anything more. Why and >>how can I solve this since I need to receive big strings from user? > >Use getch() and write your own input routine. If it's bigger than one line, >you'll need to use a (partial) fullscreen editor anyway. For fullscreen editor >source, go to http://www.talula.demon.co.uk/ and look for FED the Folding EDitor >by Shawn Hargreaves. Hi, thx for your answer. Are you saying that this is a system limitation or what?? Just to get a few lines from the user I have to write a full text editor??? What the heck??? Isn't there any other way to work it out??? Best regards, Paulo [snipped sig]