GSoC/GCI Archive
Google Code-in 2012 BRL-CAD

Move comments from source to header files ... move LIBRT comments for files beginning with 'a-c' and 'e-o'

completed by: Silvrous

mentors: Sean, Erik

 

BRL-CAD uses Doxygen source code comments to document the API. The comments need to be moved from .c source code files to the corresponding .h API header file. Note that this is a REALLY easy task, it is just cut-and-paste after all, so it just might take you more than a couple hours if you're inefficient with a text editor. Regardless, you must make sure you compile before and after to make sure you didn't introduce a typo because you're changing so many files.

There are approximately 150 public API comments in LIBRT files starting with 'a', 'b', 'c', (notice we skip 'd' files) 'e', 'f', ... 'n', and 'o'. This will find most of them:

grep -n -r -E '^/\*\*' src/librt | grep -v svn | grep -v '\*\*\*' | grep -v '@' |grep 'librt/[abcefghijklmno]' 

ONLY move comments on functions that have a corresponding RT_EXPORT declaration in the include/raytrace.h header. It should take less than 30 seconds to review each one.

Code:

  • include/raytrace.h
  • include/db.h
  • include/db5.h
  • src/librt/[abcefghijklmno]*.c
  • src/librt/comb/*.c
  • src/librt/binunif/*.c