Revision: 42148
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42148&view=rev
Author:   d_rossberg
Date:     2011-01-12 16:24:49 +0000 (Wed, 12 Jan 2011)

Log Message:
-----------
the BU_STR_EMPTY() macro tests a string for emptiness ("" or NULL)
its result is either true or false

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

Modified: brlcad/trunk/include/bu.h
===================================================================
--- brlcad/trunk/include/bu.h   2011-01-12 16:07:41 UTC (rev 42147)
+++ brlcad/trunk/include/bu.h   2011-01-12 16:24:49 UTC (rev 42148)
@@ -5074,9 +5074,13 @@
  *
  * bu_strcmp() is a macro that includes the current file name and line
  * number that can be used when bu debugging is enabled.
+ *
+ * BU_STR_EMPTY() is a macro that tests a string for emptiness, i.e. "" or
+ * NULL.
  */
 BU_EXPORT BU_EXTERN(int bu_strcmpm, (const char *string1, const char *string2, 
const char *label));
-#define bu_strcmp(s) bu_strcmpm(s, BU_FLSTR)
+#define bu_strcmp(s)    bu_strcmpm(s, BU_FLSTR)
+#define BU_STR_EMPTY(s) (bu_strcmpm(s, "", BU_FLSTR) == 0)
 
 /** @} */
 


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

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to