From bd3d316abd2e20e72bd211d1447cf07626201199 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Fri, 21 May 1999 22:12:12 +0000 Subject: [PATCH] Fix the bugs in the new macros. (Whoops.) Organization: Straylight/Edgeware From: mdw --- dstr.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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@ --- * * -- [mdw]