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

Break up large header into smaller headers (include/bn.h)

completed by: wltan

mentors: Hardeep Singh Rai, Ishwerdas

BRL-CAD has a few header files that are just monstrously large. Instead of huge headers, we want to break them up into smaller, more modular headers.

This task entails breaking up our include/bn header into multiple headers. You'll be expected to use the existing header groupings that are in the file so that related portions of the API remain grouped together. You'll probably end up creating at least a dozen new headers in an include/bn/ subdirectory.

  1. obtain BRL-CAD from SVN checkout
  2. create a new header via "sh/ lgpl include/bn/subheader.h"
  3. update include/bn.h to #include your new bn/subheader.h file
  4. make sure it compiles
  5. run "svn add include/bn/subheader.h"
  6. repeat from #2 until there are no more symbols left
  7. submit your changes as a patch file: svn diff > my_changes.patch


  • include/bu.h
  • include/bu/*.h
  • include/bn.h <-- you'll end up with just #include <bn subheader.h=""> in here
  • include/bn/*.h <-- you create new subheaders here, you can run sh/ to create stubs