gets() - dangerous?

C

Chuck F.

Richard said:
Netocrat said:
.... snip ...

Here's a suggestion for you - pop over to
http://www.cpax.org.uk/prg/portable/c/resources.php and steal
the entire page. (Make sure you read it over, though, since some
of it won't survive a change of ownership and will need
editing.)


I fail to see how Kenny McCormack's opinion is relevant, since
it's abundantly clear that, even if he isn't a troll (which most
of us seem to think he is), his signal-to-noise ratio is way too
low.

Is he mucking about here? He won't be seen unless somebody feeds him.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
 
D

Dieter

Netocrat said:
Netocrat said:
[...]

I really want to thank you (all) for the depth of thought you're putting
into the clc-wiki's structure. I feel this is extremely important and
am very excited about the project. I'm also very glad to see that other
knowledgeable regulars are taking an interest in contributing.

Maybe a new thread should be started for "all things wiki", in order to
keep the discussion in the fore-front as well as enable the "enticement"
for others to participate. I look forward to the possibilities.

Just think that eventually this will help to further decrease the common
explanations that are frequently given by the group... The ones I'm sure
the regulars are tired of. A wiki with a very _well thought out_ and
_organized_ structure will be fantastic.

If only there was such consideration by all document developers (hint: a
standard per se), The OpenSource environment would be a much, much
better place.

Many thanks from a diligent learner,

Dieter
 
D

Dieter

Netocrat said:
Netocrat said:
[...]

I really want to thank you (all) for the depth of thought you're putting
into the clc-wiki's structure. I feel this is extremely important and
am very excited about the project. I'm also very glad to see that other
knowledgeable regulars are taking an interest in contributing.

Maybe a new thread should be started for "all things wiki", in order to
keep the discussion in the fore-front as well as enable the "enticement"
for others to participate. I look forward to the possibilities.

Just think that eventually this will help to further decrease the common
explanations that are frequently given by the group... The ones I'm sure
the regulars are tired of. A wiki with a very _well thought out_ and
_organized_ structure will be fantastic.

If only there was such consideration by all document developers (hint: a
standard per se), The OpenSource environment would be a much, much
better place.

Many thanks from a diligent learner,

Dieter
 
D

Dieter

Netocrat said:
Netocrat said:
[...]

I really want to thank you (all) for the depth of thought you're putting
into the clc-wiki's structure. I feel this is extremely important and
am very excited about the project. I'm also very glad to see that other
knowledgeable regulars are taking an interest in contributing.

Maybe a new thread should be started for "all things wiki", in order to
keep the discussion in the fore-front as well as enable the "enticement"
for others to participate. I look forward to the possibilities.

Just think that eventually this will help to further decrease the common
explanations that are frequently given by the group... The ones I'm sure
the regulars are tired of. A wiki with a very _well thought out_ and
_organized_ structure will be fantastic.

If only there was such consideration by all document developers (hint: a
standard per se), The OpenSource environment would be a much, much
better place.

Many thanks from a diligent learner,

Dieter
 
A

Al Balmer

This reply was delayed as I wanted to complete some development on the
wiki and set up a generic domain name before responding to Steve's post.
The wiki's now accessible through clc-wiki.net.

Wow. Thank you, thank you. A fantastic beginning.

One comment from my 2-minute look at the site - I find it slightly
disconcerting to have the little "link" symbol embedded in code, but
the link for keywords is otherwise an excellent idea.
 
N

Netocrat

One comment from my 2-minute look at the [clc wiki] - I find it slightly
disconcerting to have the little "link" symbol embedded in code, but the
link for keywords is otherwise an excellent idea.

Agreed - I noticed that briefly a while ago but since you mention it, it's
been fixed. The Geshi syntax highlighting extension for the wiki was
Flash's find, and the links it generates are as you write a great idea -
it would be even better if it included all of the standard functions for
linking rather than the scant few that it does. Perhaps in future the wiki
will have its own set of descriptions of all standard functions that can
be internally linked to.

Review guidelines for C code published on the wiki have now been drafted,
along with templates to provide a (typically one-line) summary below each
block of code indicating its review status, original author and related
information:
<http://clc-wiki.net/wiki/Code_Reviews_(for_this_wiki)>
<http://clc-wiki.net/wiki/Help:Editing#C_Code>

Comments on these guidelines are welcome, particularly from anyone
interested in reviewing code on the wiki and anyone who has already
contributed code that's hosted on the wiki. No code has yet been reviewed
under these guidelines, nor has the summary line yet been used other than
for examples.

There's also been a suggestion that C code published on the wiki be
consistent in style, and that the style most likely to be universally
acceptable is K&R. Comments on this are welcome, recognising that the
issue of style is touchy.

The voting extension has also received a bit of a work-out, in the process
uncovering a subtle issue that required manual correction of the logged
eligible voter counts, although it didn't actually invalidate the tallying
process. The fix is being worked on.

The results[*] of the elections don't have great significance whilst edits
on the wiki are open and no group-reviewed-stable-page functionality yet
exists, although the title "editor" is currently equivalent to inclusion
in the wiki group "sysop" and includes a few extra capabilities such as
ability to block vandals by IP/name (along with voting of course).

[*] <http://clc-wiki.net/mediawiki/index.php?title=Special:Group_Decisions>
 
R

Richard Heathfield

Netocrat said:
There's also been a suggestion that C code published on the wiki be
consistent in style, and that the style most likely to be universally
acceptable is K&R.

K&R style has the same probability of universal acceptance as all other
styles, i.e. 0.
 
N

Netocrat

'Universally' was a poor choice there.

Disclosure: K&R is the style I first (implicitly - not necessarily
completely or accurately) learnt and it's still my preferred style. The
suggestion came from two other people though.

The reason I think it's likely to be most acceptable is that it was
developed by the founders of the language. Someone with a mind to
architect a programming language as successful as C is likely to make a
good job of an accompanying style. Given that style is so subjective, the
property "given birth to alongside the language and endorsed by its
parents" is a pretty objective basis for preference (unless there's
another style I don't know of with that property).

Would you suggest leaving the style guidelines at "consistent"?
Indian Hill!

A close relative of K&R style, but more focused on what rather than how,
yes?
 
R

Randy Howard

Netocrat wrote
(in article said:
'Universally' was a poor choice there.

Disclosure: K&R is the style I first (implicitly - not necessarily
completely or accurately) learnt and it's still my preferred style. The
suggestion came from two other people though.

My preference is closer to Allman style. I've been using large
monitors for long enough not to worry about vertical whitespace
much. Plus, I try not to write functions that are hundreds of
lines in length.

Finally, gnu indent is a lovely tool, freely available, so the
issue is pretty much moot anyway.
A close relative of K&R style, but more focused on what rather than how,
yes?

Mainly known for it's silly indenting of the braces, instead of
what's inside them.
 
C

CBFalconer

Randy said:
Netocrat wrote
.... snip ...

My preference is closer to Allman style. I've been using large
monitors for long enough not to worry about vertical whitespace
much. Plus, I try not to write functions that are hundreds of
lines in length.

Finally, gnu indent is a lovely tool, freely available, so the
issue is pretty much moot anyway.


Mainly known for it's silly indenting of the braces, instead of
what's inside them.

Whee - style war. Is this a private fight or can anybody join in?

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
 
F

Flash Gordon

Randy said:
Netocrat wrote


My preference is closer to Allman style. I've been using large
monitors for long enough not to worry about vertical whitespace
much. Plus, I try not to write functions that are hundreds of
lines in length.

As one of the people who suggested K&R style I'll state here and now
that I'm not overly bothered about code style.
Finally, gnu indent is a lovely tool, freely available, so the
issue is pretty much moot anyway.

Indeed. I considered suggesting GNU Indent to force the code in to a
consistent style, but it took me less than 1 second to reject the idea.
However, thinking further, I wonder if it would be possible to give
people the option of having the code piped through indent for display in
the Wiki? Then, as long as someone can specify the style they like they
can have it! It would require a few tweaks here and there, but it should
be possible. Of course, there is always the question of finding the time
to do things.
Mainly known for it's silly indenting of the braces, instead of
what's inside them.

I've generally had to abide by whatever the company standard happened to
be so I've never bothered learning the names of styles.
 
F

Flash Gordon

Netocrat said:
One comment from my 2-minute look at the [clc wiki] - I find it slightly
disconcerting to have the little "link" symbol embedded in code, but the
link for keywords is otherwise an excellent idea.

Agreed - I noticed that briefly a while ago but since you mention it, it's
been fixed. The Geshi syntax highlighting extension for the wiki was
Flash's find, and the links it generates are as you write a great idea -
it would be even better if it included all of the standard functions for
linking rather than the scant few that it does. Perhaps in future the wiki
will have its own set of descriptions of all standard functions that can
be internally linked to.

I just had a look at the code behind it, and it looks to me to be easy
to set up the links to point anywhere we like (Netocrat, have a look in
c.php to see what I mean). Perhaps link to the Dinkumware site for the
library since Mr P.J. Plauger is a reliable source on such matters?

If there is any similarly good (and stable) site to reference for
keywords such as "switch" that would also be easy.

Note that Netocrat has a backup of the Wiki and we can make backups
available to others, so even if the host disappears (I get run over by a
bus, for example) this Wiki can live on.

The voting extension has also received a bit of a work-out, in the process
uncovering a subtle issue that required manual correction of the logged
eligible voter counts, although it didn't actually invalidate the tallying
process. The fix is being worked on.

The results[*] of the elections don't have great significance whilst edits
on the wiki are open and no group-reviewed-stable-page functionality yet
exists, although the title "editor" is currently equivalent to inclusion
in the wiki group "sysop" and includes a few extra capabilities such as
ability to block vandals by IP/name (along with voting of course).

[*] <http://clc-wiki.net/mediawiki/index.php?title=Special:Group_Decisions>

You could have used the friendlier URL of
http://clc-wiki.net/wiki/Special:Group_Decisions
;-)
 
F

Flash Gordon

Randy Howard wrote:

BTW, thank you for going to the trouble of putting this up.

No problem :). I've learnt a lot from this group as I'm sure the others
involved have as well, and setting this up is an attempt to give
something back to the community and help others.
> I have high hopes for it.

As do I. Checking my logs for the past week it's been accessed from 143
different IP addresses (excluding spiders), people have followed links
to it from webmail systems and people are following links to it from
Google groups.
Category suggestion: Homework problems. :)

You mean a set of sensible questions for tutors to set? ;-)

<snip>
 
F

Flash Gordon

Al said:
Wow. Thank you, thank you. A fantastic beginning.

I'm glad you think so :)
One comment from my 2-minute look at the site - I find it slightly
disconcerting to have the little "link" symbol embedded in code, but
the link for keywords is otherwise an excellent idea.

Well, the link symbol has been sorted, and it will be easy to add more
automatic linking from the C code as/when we select reliable references
to link to.
 
M

Michael Mair

Flash said:
Randy Howard wrote:


You mean a set of sensible questions for tutors to set? ;-)

Among other things... However, I have given
"non-real-life" C homework to students to in order
to drive home a certain aspect of a lesson.
Only when we discussed possible solutions the real
life aspects came in.

Primarily: How to ask about homework questions.
There was a discussion within the last months where
Chris Hills brought up a "template":
Start at <[email protected]>


Cheers
Michael
 
C

CBFalconer

Flash said:
Randy Howard wrote:



No problem :). I've learnt a lot from this group as I'm sure the
others involved have as well, and setting this up is an attempt
to give something back to the community and help others.


As do I. Checking my logs for the past week it's been accessed
from 143 different IP addresses (excluding spiders), people have
followed links to it from webmail systems and people are following
links to it from Google groups.

I accessed it by typing "clc-wiki.net" into Firefox. Looks clean.
I created an account and left. :)

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
 
N

Netocrat

[c.l.c wiki style guidelines]
As one of the people who suggested K&R style I'll state here and now
that I'm not overly bothered about code style.


Indeed. I considered suggesting GNU Indent to force the code in to a
consistent style, but it took me less than 1 second to reject the idea.
However, thinking further, I wonder if it would be possible to give
people the option of having the code piped through indent for display in
the Wiki? Then, as long as someone can specify the style they like they
can have it! It would require a few tweaks here and there, but it should
be possible. Of course, there is always the question of finding the time
to do things.

On-the-fly conversion using an indent tool would be fine as an option but
it could also remove deliberately encoded information, so conversion
shouldn't be the default.

Code on the wiki should conform to a single style, whether that's as
specific as K&R, Allman, Indian Hill, or a collaboratively specified c.l.c
wiki style, or something general like "readable and consistent within each
contribution". I can see arguments all ways but a more specific style
across the wiki would be most readable.

I thought it used K&R brace style and I took pete's recommendation as
seriously intended.

[...]
 
N

Netocrat

Netocrat wrote [...]
Let us know if you find a deficiency in the rss/atom feeds:
I just tried the RSS feed in NetNewsWire (Mac OS X) and it seems
to work fine.

Thanks for the confirmation - I've also verified it with a Linux reader.

[...]
BTW, thank you for going to the trouble of putting this up. I have high
hopes for it.

There's definitely heaps of potential. The posters to this group have
given me a lot of insight into C so it's something that I find worthwhile.

[...]
I understand your point. Just keep in mind that contrary to popular
belief, there *are* some insurmountable problems.

If we find consensus on a common style for C code on the wiki, will you
take that comment back? ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,242
Latest member
KendrickKo

Latest Threads

Top