| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: c |
G'Day Paul,
-=> Quoting Paul Edwards to Kieran Haughey <=-
PE> That is the only point - safety. The only time you should use
PE> something like gets is when you can guarantee that the strings
PE> entered won't be bigger than the internal buffer, because you
PE> know the content of the data, because it is computer generated.
PE> And if it's computer-generated data, it's a bit suspicious that
PE> it's coming from stdin, which normally represents user input!
So would you consider using editgets from snippets instead of gets() ?
At first i thought it was good, but after having to link in 3-4 source and
another 7 or so header files, i've made my own.
I hardly used gets or fgets since.
The reason is that i want the user see exactly what i will except within the
program, with fgets() you can type in a long string and unbeknown to you(the
user) it'll get truncated.
L8r Frank (fadam{at}ozemail.com.au)
___ Blue Wave/QWK v2.12
---
* Origin: Melbourne PC User Group BBS (3:632/309)SEEN-BY: 50/99 620/243 623/630 632/0 107 271 304 309 328 348 360 393 525 530 SEEN-BY: 632/552 998 999 1000 633/262 371 634/384 635/301 502 503 544 637/103 SEEN-BY: 639/252 670/301 711/401 409 410 413 430 510 808 809 932 934 712/515 SEEN-BY: 713/888 714/906 800/1 7877/2809 @PATH: 632/309 998 635/503 50/99 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.