Quick Search:

jump to detailed chart Line History

line history graph

View Mode

Logical Physical

Show Arbitrary Diff

From to

Supports revisions and tags.

Watches and RSS

History

trunk 9578 1329

latest revision download trunk

9578 annotated / raw | Diffs: previous, other | Lines: 28 ( +8, -2 )

Created: 2008-05-15 16:31:12 -0500 (6 months ago) | Author: duff | Changeset: 9578

• switch (sort of back) to uppercased filename transliterated to ASCII with non-alphanumeric characters converted to an underscore and a unique suffix added to the entire thing.

9542 annotated / raw | Diffs: previous, other | Lines: 22 ( +4, -4 )

Created: 2008-05-08 15:20:43 -0500 (6 months ago) | Author: duff | Changeset: 9542

• change to use a UUID instead of _FILENAME_

Our previous macro name was in disagreement with C/C++ naming conventions¹.

I searched for a convention for include guards and found this in the C++ FAQ:

   […] It is recommended to add some project unique part, and
   if you are using a directory hierarchy also that, e.g.
   MYPROJ_BAR_FOO_HPP if it resides in bar/foo.hpp

I considered this, i.e. using the full path, but ended up with the UUID since that is bullet-proof and looks consistent. The FAQ’s suggested solution is still only a heuristic, adds about the same noise as a UUID, the path of the file may likely change throughout the life of it, and project name is not always known.

The downside is of course that the macro name is nonsensical if part of compiler output or similar.

I am interested in feedback on this change — I’ve wanted to change the generated name for a long time, but lack of a good convention has made me delay it.

¹ Names beginning with double underscore or an underscore and a capital letter are reserved for implementation (compiler, standard library) and should not be used.

3648 annotated / raw | Diffs: previous, other | Lines: 22 ( +1, -1 )

Created: 2006-06-13 21:52:10 -0500 (2 years 5 months ago) | Author: duff | Changeset: 3648

• remove mention of tab trigger from the name

Branch point for: WIP

2357 annotated / raw | Diffs: previous, other | Lines: 22 ( +1, -1 )

Created: 2005-12-01 07:37:25 -0600 (3 years ago) | Author: chris | Changeset: 2357

Fix include guard snippet. The previous change wasn't what I meant. Allan caught it. :)

2350 annotated / raw | Diffs: previous, other | Lines: 22 ( +2, -1 )

Created: 2005-11-30 21:47:05 -0600 (3 years ago) | Author: chris | Changeset: 2350

Include guard name in closing endif comment

2217 annotated / raw | Diffs: previous, other | Lines: 21 ( +3, -3 )

Created: 2005-11-21 16:18:09 -0600 (3 years ago) | Author: duff | Changeset: 2217

• use filename as default value for teh include-guard (uppercased and with spaces/dots replaced with underscores)
• change to title-case and re-order preferences items

1576 annotated / raw | Diffs: previous, other | Lines: 21 ( +1, -1 )

Created: 2005-08-18 02:00:53 -0500 (3 years 3 months ago) | Author: duff | Changeset: 1576

• updated scope for all this to spell out the four variants (c, c++, obj-c, and obj-c++) since 1.1b17 no longer settle for prefix-matching

1329 new annotated / raw | Lines: 21 ( +21, -0 )

Created: 2005-07-13 00:46:09 -0500 (3 years 4 months ago) | Author: chris | Changeset: 1329

• header multiple-inclusion guard snippet:

#ifndef _thing_H_
#define _thing_H_
...
#endif /*_thing_H_*/

(One imagines Dennis Ritchie in 1974: what, you mean people might have multiple include files for one executable? that's crazy talk.)

Crucible: Open Source License registered to Atlassian.
Atlassian FishEye, Subversion, CVS & Perforce analysis. (Version:1.5.5 Build:build-dev18790 2008-08-11 ) - Administration - Page generated 2008-12-04 15:40 -0600