From: mdw Date: Fri, 21 May 1999 22:12:12 +0000 (+0000) Subject: Fix the bugs in the new macros. (Whoops.) X-Git-Tag: 2.0.4~306 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/commitdiff_plain/bd3d316abd2e20e72bd211d1447cf07626201199 Fix the bugs in the new macros. (Whoops.) --- diff --git a/dstr.h b/dstr.h index 938378a..13e7d4d 100644 --- a/dstr.h +++ b/dstr.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: dstr.h,v 1.6 1999/05/21 08:38:14 mdw Exp $ + * $Id: dstr.h,v 1.7 1999/05/21 22:12:12 mdw Exp $ * * Handle dynamically growing strings * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: dstr.h,v $ + * Revision 1.7 1999/05/21 22:12:12 mdw + * Fix the bugs in the new macros. (Whoops.) + * * Revision 1.6 1999/05/21 08:38:14 mdw * Add some more macros, particularly for creation and destruction. * @@ -82,7 +85,7 @@ typedef struct dstr { size_t len; /* Length of the string */ } dstr; -#define DSTR_INIT = { 0, 0, 0 }; /* How to initialize one */ +#define DSTR_INIT { 0, 0, 0 } /* How to initialize one */ /*----- Functions provided ------------------------------------------------*/ @@ -130,7 +133,7 @@ extern void dstr_destroy(dstr */*d*/); extern void dstr_reset(dstr */*d*/); -#define DRESET(d) do (d)->len = 0; while (0) +#define DRESET(d) ((d)->len = 0) /* --- @dstr_ensure@ --- * *