Menu
Logged-In As
ACCOUNTNot Logged In
Implement bu_scan_fastf_t() function to scan floating point values from stringsBRL-CAD
Status: ClosedTime to complete:
100 hrs
Mentors: Sean, Daniel_R
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
- src/libbu/scan.c -- create this
- src/libbu/CMakeLists.txt -- update this
Uploaded Work
File name/URL | File size | Date submitted | |
---|---|---|---|
task-9-implement-scan-fastf.diff | 2.9 KB | December 05 2014 18:40 UTC | |
task-9-implement-scan-fastf-v2.diff | 3.0 KB | December 06 2014 00:11 UTC | |
task-9-implement-scan-fastf-v3.diff | 3.0 KB | December 06 2014 14:50 UTC |
I would like to work on this task.
This task has been assigned to Andromeda Galaxy. You have 100 hours to complete this task, good luck!
The work on this task is ready to be reviewed.
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.
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.
The work on this task is ready to be reviewed.
Congratulations, this task has been completed successfully.
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.