From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: fgets Max Chars Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <8luvll$tj6$1 AT duke DOT telepac DOT pt> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 31 X-Trace: /bdhN5cNbwyBX7j9yqYvWP7a99dIayrivAhKIyQYbizb2Os8UDR/pbGqMXKQbErP7V5gv5exQ8rP!I8LoL8hoqbEBf/m5qhDqmkLuc9t2uUw/4xFs7J7GVy4PUHarXDdPhwybhLHs0GMYYpdytMKaDePl!RF3j X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sat, 29 Jul 2000 18:25:28 GMT Distribution: world Date: Sat, 29 Jul 2000 18:25:28 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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. -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/