Revision: 65326
          http://sourceforge.net/p/brlcad/code/65326
Author:   starseeker
Date:     2015-06-16 16:41:00 +0000 (Tue, 16 Jun 2015)
Log Message:
-----------
add a comment for BU_OPT_CHECK_ARGV0

Modified Paths:
--------------
    brlcad/trunk/include/bu/opt.h

Modified: brlcad/trunk/include/bu/opt.h
===================================================================
--- brlcad/trunk/include/bu/opt.h       2015-06-16 16:35:57 UTC (rev 65325)
+++ brlcad/trunk/include/bu/opt.h       2015-06-16 16:41:00 UTC (rev 65326)
@@ -114,7 +114,11 @@
  */
 typedef int (*bu_opt_arg_process_t)(struct bu_vls *, int argc, const char 
**argv, void *);
 
-
+/**
+ * A common task when writing bu_opt_arg_process_t validators is to check the
+ * first argument of the argv array - this macro encapsulates that into a
+ * standard check.
+ */
 #define BU_OPT_CHECK_ARGV0(_log_vls, _argc, _argv, _opt_name) \
 if (_argc < 1 || !_argv || !_argv[0] || _argv[0][0] == '\0') { \
     if (_log_vls) { \
@@ -123,7 +127,6 @@
     return -1; \
 }
 
-
 /**
  * @brief
  * "Option description" structure.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to