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:
9994cbd
)
Fix argument reuse in DPUTS.
author
mdw
<mdw>
Wed, 22 Dec 1999 15:39:51 +0000
(15:39 +0000)
committer
mdw
<mdw>
Wed, 22 Dec 1999 15:39:51 +0000
(15:39 +0000)
dstr.h
patch
|
blob
|
blame
|
history
diff --git
a/dstr.h
b/dstr.h
index cde6b6f3f2a2301c7365b2fb69c49b4ae4ceeafa..6bc33f89dcea6fec00a938c3aa78192c7ef7ddaa 100644
(file)
--- a/
dstr.h
+++ b/
dstr.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: dstr.h,v 1.
9 1999/12/10 23:42:04
mdw Exp $
+ * $Id: dstr.h,v 1.
10 1999/12/22 15:39:51
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.10 1999/12/22 15:39:51 mdw
+ * Fix argument reuse in DPUTS.
+ *
* Revision 1.9 1999/12/10 23:42:04 mdw
* Change header file guard names.
*
* Revision 1.9 1999/12/10 23:42:04 mdw
* Change header file guard names.
*
@@
-216,7
+219,7
@@
extern void dstr_puts(dstr */*d*/, const char */*s*/);
#define DPUTS(d, s) do { \
dstr *_d = (d); \
const char *_s = (s); \
#define DPUTS(d, s) do { \
dstr *_d = (d); \
const char *_s = (s); \
- size_t _sz = strlen(
s);
\
+ size_t _sz = strlen(
_s);
\
DENSURE(_d, _sz + 1); \
memcpy(_d->buf + _d->len, _s, _sz + 1); \
_d->len += _sz; \
DENSURE(_d, _sz + 1); \
memcpy(_d->buf + _d->len, _s, _sz + 1); \
_d->len += _sz; \