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

Ensure bu_scan_fastf_t() supports % as a delimiter

completed by: Andromeda Galaxy

mentors: Hardeep Singh Rai, Harmanpreet

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

There is not a bu_scan_fastf_t() function in BRL-CAD but it needs some cleanup work. In particular, the behavior of the delimiter argument needs to be consistent with the behavior of strtok() in that any delimiter character(s) encountered are merely skipped between fastf_t values. This will likely entail removing the current scanf/sscanf logic that uses %n to get over the delimiter as a string.

Modify the implementation to match the header documentation. See the implementation file's TODO comment for more details too. Submit your changes as a patch file.

References:
  • include/bu/log.h
  • src/libbu/scan.c
Modify:
  • src/libbu/scan.c