Implement bu_scan_fastf_t() function to scan floating point values from stringsBRL-CAD
Status: ClosedTime to complete: 100 hrs Mentors: Sean, Daniel_RTags: C, floating point, code, function

This is a follow-on task for https://www.google-melange.com/gci/task/view/google/gci2014/5265491291537408

Following the analysis from that task, the objective is to implement the function described that has an argument for recording the number of characters scanned.

Implement the function making sure to robustly validate all function arguments. The function implementation should leverage existing API functions (e.g. bu_sscanf()) where warranted.

References:
  • https://www.google-melange.com/gci/task/view/google/gci2014/5265491291537408
Modify:
  • src/libbu/scan.c -- create this
  • src/libbu/CMakeLists.txt -- update this
Uploaded Work
File name/URLFile sizeDate submitted
task-9-implement-scan-fastf.diff2.9 KBDecember 05 2014 18:40 UTC
task-9-implement-scan-fastf-v2.diff3.0 KBDecember 06 2014 00:11 UTC
task-9-implement-scan-fastf-v3.diff3.0 KBDecember 06 2014 14:50 UTC
Comments
Andromeda Galaxyon December 5 2014 18:38 UTCTask Claimed

I would like to work on this task.

Gauravjeet Singh on December 5 2014 18:40 UTCTask Assigned

This task has been assigned to Andromeda Galaxy. You have 100 hours to complete this task, good luck!

Andromeda Galaxyon December 5 2014 18:44 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 5 2014 21:35 UTCTask Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Sean on December 5 2014 21:39 UTClooking pretty good

The only two things noticed on quick review are that the HIDDEN function should be named in group/verb_action/noun form.  The group is "scan" so perhaps simply "scan_str".  The other thing noticed is that there will be a null-pointer dereference and subsequent crash if any of the fastf_t args is a NULL pointer. 

Andromeda Galaxyon December 6 2014 00:11 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 7 2014 04:31 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on January 8 2015 08:54 UTCfollow-on

A follow-on to this task is now posted: https://www.google-melange.com/gci/task/view/google/gci2014/5048599469621248


There's also a set of five tasks to convert %lf's to this function.