Enlightenment CVS committal Author : mej Project : eterm Module : libast
Dir : eterm/libast/include/libast Modified Files: obj.h types.h.in Log Message: Fri Jul 16 19:20:48 2004 Michael Jennings (mej) Working on cleaning some things up for portability and C99-compliance. ---------------------------------------------------------------------- =================================================================== RCS file: /cvsroot/enlightenment/eterm/libast/include/libast/obj.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- obj.h 3 Feb 2004 23:16:59 -0000 1.28 +++ obj.h 16 Jul 2004 23:22:18 -0000 1.29 @@ -33,8 +33,8 @@ * manipulating basic generic objects. * * @author Michael Jennings <[EMAIL PROTECTED]> - * $Revision: 1.28 $ - * $Date: 2004/02/03 23:16:59 $ + * $Revision: 1.29 $ + * $Date: 2004/07/16 23:22:18 $ */ /[EMAIL PROTECTED]/ @@ -642,12 +642,13 @@ */ #define SPIF_OBJ_SHOW_NULL(t, n, b, i, tmp) do { \ memset(tmp, ' ', (i)); \ - snprintf(tmp + (i), sizeof(tmp) - (i), "(spif_" #t "_t) %s: " SPIF_NULLSTR_TYPE(t) "\n", \ + snprintf(SPIF_CAST_C(char *) tmp + (i), sizeof(tmp) - (i), \ + "(spif_" #t "_t) %s: " SPIF_NULLSTR_TYPE(t) "\n", \ NONULL(n)); \ if (SPIF_STR_ISNULL(b)) { \ - (b) = spif_str_new_from_ptr(tmp); \ + (b) = spif_str_new_from_ptr(SPIF_CAST(charptr) tmp); \ } else { \ - spif_str_append_from_ptr((b), tmp); \ + spif_str_append_from_ptr((b), SPIF_CAST(charptr) tmp); \ } \ } while (0) =================================================================== RCS file: /cvsroot/enlightenment/eterm/libast/include/libast/types.h.in,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- types.h.in 29 Jun 2004 21:18:07 -0000 1.19 +++ types.h.in 16 Jul 2004 23:22:18 -0000 1.20 @@ -191,7 +191,7 @@ * * @see @link DOXGRP_TYPES Portable Data Types @endlink */ -#define SPIF_DECL_CLASSNAME(type) "!spif_" #type "_t!" +#define SPIF_DECL_CLASSNAME(type) SPIF_CAST(charptr) "!spif_" #type "_t!" /[EMAIL PROTECTED]/ /[EMAIL PROTECTED]/ @@ -365,6 +365,22 @@ #define SPIF_NULLSTR_TYPE_C(type) "{ ((" #type ") NULL) }" /** + * Returns a string representing a NULL value of a pointer to the + * specified base type. + * + * This macro returns a string which shows the NULL value typecast to + * a pointer to the specified type. This is a convenience macro used + * primarily by the "show" method of various objects. + * + * @param type The type basename. + * @return A string representation of a NULL pointer to an object + * of the specified type. + * + * @see @link DOXGRP_TYPES Portable Data Types @endlink + */ +#define SPIF_NULLSTR_TYPE_PTR(type) "{ ((spif_" #type "_t *) NULL) }" + +/** * Returns whether or not a generic pointer is NULL. * * This macro returns whether or not a generic pointer is NULL. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs