| delorie.com/archives/browse.cgi | search |
| From: | Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: fgets Max Chars |
| Organization: | Pin Eight Software http://pineight.8m.com/ |
| Message-ID: | <qc86os4j4lrv4qojfd99olqs0rv31i81pp@4ax.com> |
| References: | <8luvll$tj6$1 AT duke DOT telepac DOT pt> |
| X-Newsreader: | Forte Agent 1.7/32.534 |
| MIME-Version: | 1.0 |
| 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"
<pdestroy AT netcabo DOT pt> wrote:
>#include <stdio.h>
>
>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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |