Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Tree implementation, ideas for keyboard input method needed |
| Date | 2012-01-16 18:06 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jf2ags$dhk$1@dont-email.me> (permalink) |
| References | <Xns9FDCEA347419Bbubbachipsetone@130.133.4.11> <lnzkdnz3j3.fsf@nuthaus.mib.org> <Xns9FDCF01D6D14Ebubbachipsetone@130.133.4.11> |
On 01/16/2012 05:36 PM, Bubba wrote: > Keith Thompson's log on stardate 16 sij 2012 > > I hoped for something like this in the first place, so thank you in > advance! > >> Identifiers starting with underscores are reserved to the >> implementation in most contexts. Identifiers starting with two >> underscores are reserved in all contexts. You should never define >> such identifiers yourself (unless you're writing code for a C >> compiler or library implementation). > > What are the repercussions of choosing wrong number of underscores? :) Theoretically: the behavior of your program is undefined. This means that the C standard places no restrictions on the behavior of the resulting program. That's a bad thing, if there's any particular behavior you want your program to have, since it might not have that behavior. It's an even worse thing if there are any things your program could do that you don't want it to do (such as erasing all of your files), because there's a chance that it might do one of those things. Practically: identifiers are reserved to the implementation, so they can by used by the implementation for it's own purpose, without worrying about the possibility that user code might interfere. Consider what could go wrong with your program if __celltype is defined by the implementation, inside stdlib.h, for some purpose. The best possible outcome is that the compiler will notice two different conflicting definitions for __celltype, and complain. The worst possibility is that __celltype is defined in some way that produces no warning messages when you misuse it. >> And in fact I'd declare this as: >> struct celltype *make_root(labeltype label, struct celltype **t); > > Could you please clarify the need for double pointer? Please don't refer to that as a "double pointer". It's a pointer to a pointer. a "double pointer" could be interpreted as referring to a "double*". I'll let Keith answer the rest of your question in more detail, since it's his suggestion. -- James Kuyper
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Tree implementation, ideas for keyboard input method needed Bubba <nickname@banelli.biz.invalid> - 2012-01-16 22:01 +0000
Re: Tree implementation, ideas for keyboard input method needed Keith Thompson <kst-u@mib.org> - 2012-01-16 14:27 -0800
Re: Tree implementation, ideas for keyboard input method needed Bubba <nickname@banelli.biz.invalid> - 2012-01-16 22:36 +0000
Re: Tree implementation, ideas for keyboard input method needed Kaz Kylheku <kaz@kylheku.com> - 2012-01-16 22:53 +0000
Re: Tree implementation, ideas for keyboard input method needed James Kuyper <jameskuyper@verizon.net> - 2012-01-16 18:06 -0500
Re: Tree implementation, ideas for keyboard input method needed Keith Thompson <kst-u@mib.org> - 2012-01-16 16:41 -0800
Re: Tree implementation, ideas for keyboard input method needed Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-16 23:01 +0000
Re: Tree implementation, ideas for keyboard input method needed Shao Miller <sha0.miller@gmail.com> - 2012-01-16 19:49 -0500
Re: Tree implementation, ideas for keyboard input method needed Keith Thompson <kst-u@mib.org> - 2012-01-16 17:46 -0800
Re: Tree implementation, ideas for keyboard input method needed Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-16 22:29 +0000
Re: Tree implementation, ideas for keyboard input method needed Bubba <nickname@banelli.biz.invalid> - 2012-01-16 22:38 +0000
Re: Tree implementation, ideas for keyboard input method needed William Ahern <william@wilbur.25thandClement.com> - 2012-01-16 15:30 -0800
Re: Tree implementation, ideas for keyboard input method needed Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-17 00:03 +0000
Re: Tree implementation, ideas for keyboard input method needed Keith Thompson <kst-u@mib.org> - 2012-01-16 16:35 -0800
Re: Tree implementation, ideas for keyboard input method needed cri@tiac.net (Richard Harter) - 2012-01-17 02:00 +0000
Re: Tree implementation, ideas for keyboard input method needed Keith Thompson <kst-u@mib.org> - 2012-01-16 19:16 -0800
Re: Tree implementation, ideas for keyboard input method needed cri@tiac.net (Richard Harter) - 2012-01-17 05:15 +0000
Re: Tree implementation, ideas for keyboard input method needed Keith Thompson <kst-u@mib.org> - 2012-01-17 00:00 -0800
Re: Tree implementation, ideas for keyboard input method needed Kaz Kylheku <kaz@kylheku.com> - 2012-01-17 04:04 +0000
Re: Tree implementation, ideas for keyboard input method needed Kaz Kylheku <kaz@kylheku.com> - 2012-01-16 22:44 +0000
Re: Tree implementation, ideas for keyboard input method needed Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-01-16 17:58 -0500
Re: Tree implementation, ideas for keyboard input method needed ImpalerCore <jadill33@gmail.com> - 2012-01-16 19:36 -0800
Re: Tree implementation, ideas for keyboard input method needed Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-01-16 23:33 -0500
Re: Tree implementation, ideas for keyboard input method needed ImpalerCore <jadill33@gmail.com> - 2012-01-17 07:18 -0800
Re: Tree implementation, ideas for keyboard input method needed "BartC" <bc@freeuk.com> - 2012-01-17 13:54 +0000
Re: Tree implementation, ideas for keyboard input method needed ImpalerCore <jadill33@gmail.com> - 2012-01-17 07:39 -0800
Re: Tree implementation, ideas for keyboard input method needed Kaz Kylheku <kaz@kylheku.com> - 2012-01-17 19:01 +0000
Re: Tree implementation, ideas for keyboard input method needed jgk@panix.com (Joe keane) - 2012-01-18 21:21 +0000
csiph-web