chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f45c2e7
)
Fix the bugs in the new macros. (Whoops.)
author
mdw
<mdw>
Fri, 21 May 1999 22:12:12 +0000
(22:12 +0000)
committer
mdw
<mdw>
Fri, 21 May 1999 22:12:12 +0000
(22:12 +0000)
dstr.h
patch
|
blob
|
blame
|
history
diff --git
a/dstr.h
b/dstr.h
index 938378a0e747d1927825535adadb084af6679483..13e7d4dbeaaaf2d3a40d2527c17c0e1db6bcb4ee 100644
(file)
--- a/
dstr.h
+++ b/
dstr.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-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
*
*
* Handle dynamically growing strings
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: dstr.h,v $
/*----- 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.
*
* 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;
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 ------------------------------------------------*/
/*----- Functions provided ------------------------------------------------*/
@@
-130,7
+133,7
@@
extern void dstr_destroy(dstr */*d*/);
extern void dstr_reset(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@ --- *
*
/* --- @dstr_ensure@ --- *
*