Move comments from source to header files ... move LIBRT comments for files beginning with the letter 'd'BRL-CAD
Status: ClosedTime to complete: 48 hrs Mentors: SeanTags: Cut-n-paste, text editor, comments

 

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 143 public API comments in LIBRT files starting with a 'd' (e.g., src/librt/db_tree.c) that need to be moved. This will find most of them:

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

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/d*.c
Uploaded Work
File name/URLFile sizeDate submitted
ModifiedFiles.zip140.7 KBNovember 30 2012 11:19 UTC
my.patch89.1 KBNovember 30 2012 11:44 UTC
Comments
Edward Kalfovon November 27 2012 20:12 UTCTask Claimed

I would like to work on this task.

Sean on November 27 2012 20:45 UTCTask Assigned

This task has been assigned to Edward Kalfov. You have 48 hours to complete this task, good luck!

Sean on November 27 2012 20:45 UTCTask Reopened

This task has been Reopened.

Sean on November 27 2012 20:47 UTCoops

Edward,


Sorry for the confusion -- this task wasn't supposed to be published.  There's still another even shorter comment-moving task available here:


http://www.google-melange.com/gci/task/view/google/gci2012/8025209


 

Ambar Palon November 28 2012 13:07 UTCTask Claimed

I would like to work on this task.

Sean on November 28 2012 13:30 UTCTask Assigned

This task has been assigned to Ambar Pal. You have 48 hours to complete this task, good luck!

Ambar Palon November 28 2012 14:48 UTCHow to install?

How do I install BRL-CAD on windows 7?
I found some info here http://brlcad.org/wiki/Deuces but I cannot understand what to do after point 2. Please Explain.

Sean on November 28 2012 14:54 UTCsource checkout

This task requires a source checkout of BRL-CAD.  You'll need to download a Subversion client for Windows and use that to check out https://brlcad.svn.sourceforge.net/svnroot/brlcad/brlcad/trunk


From there, you'll be able to edit the source files and make a patch of the moved comments. 

Ambar Palon November 28 2012 14:57 UTCThanks

Thanks, so I need not download the image file whose link is provided at http://brlcad.org/wiki/Deuces. 

Sean on November 28 2012 15:02 UTCit depends

You certainly can download the disk image and virtual machine described on the Deuces page.  That will provide you a completely set up Linux environment to work in that has everything already installed and ready to go.  The page where you downloaded the disk image had much more detailed instructions on what to do with setting up the image within VirtualBox.


 

Ambar Palon November 28 2012 15:09 UTCWhere to move to?

The comments need to be moved from .c source code files to the corresponding .h API header file "


Suppose I have got a function in the d*.c/d*.h files which is defined with RT_EXPORT. I goto the comment for the function, copy it. Where do I paste it now?

Sean on November 28 2012 18:56 UTCread what you pasted?

Exactly what you just wrote.  You find a /** */ comment for a function in a .c source file and move it to where the function is declared in the .h header file.  You're not doing copy-n-paste, you're doing cut-n-paste.  cut from c, paste into h.  do that for all of the functions that have an RT_EXPORT declaration.

Ambar Palon November 29 2012 15:46 UTCgrep command not working

So I installed the image that was provided and then ran 


 


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

 


on the terminal. However, it says src/librt not found. Excuse me if this is a really silly question because i am totally new to linux but BRL CAD seems interesting and therefore i am trying all this.

Ambar Palon November 29 2012 15:52 UTCI got it

It takes time to change to linux from windows. I just had to cd to the brlcad-svn directory.

Ambar Palon November 30 2012 11:46 UTCReady for review

The work on this task is ready to be reviewed.

Melange on November 30 2012 13:30 UTCNo more Work can be submitted

Melange has detected that the deadline has passed and no more work can be submitted. The submitted work should be reviewed.

Andrei Popescu on November 30 2012 17:50 UTCCongratulations

Congratulations ,you have succesfully completed the task. Your work has been applied in revision r53914. If you wish, please leave your name so you can be credited in our autorship for your contribution.

Andrei Popescu on November 30 2012 17:50 UTCTask Closed

Congratulations, this task has been completed successfully.

Ambar Palon December 1 2012 13:36 UTCThank You

My name is Ambar Pal.

Sean on January 14 2013 15:22 UTCthank you

As GCI comes to a close, we wanted to take the time to say THANK YOU for all your efforts.  This comment interface closes after GCI is over, so you're encouraged to join our mailing list where we'll be announcing contributions from GCI participants like yourelf over the upcoming months: 


https://lists.sourceforge.net/lists/listinfo/brlcad-news


If you've provided your full name, we'll be sure to credit you in our authorship documentation and you'll see your name in a future announcement.  If you contact us at devs@brlcad.org or via IRC, we'll even let you know when your work is integrated and follow up with updates.  You're welcome and encouraged to contact us any time, especially if you have a question about how to continue participating in Open Source after GCI is over, but even if just to keep in touch.  Note that ongoing participation in Open Source is one of the most impressive skills to have on your resumé.  Take care, be well, and thank you again!