summaryrefslogtreecommitdiffhomepage
path: root/stc/ccommon.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-05-18 15:34:16 +0200
committerTyge Løvset <[email protected]>2021-05-18 15:34:16 +0200
commita8d94f4acea04681c89b46233f90bd8f4cee6ebf (patch)
tree9a55e275b6e565421cdbf9ba457e791e272ba997 /stc/ccommon.h
parentccc45a1dc249160364aa12b3cfecc9844d6760ff (diff)
downloadSTC-modified-a8d94f4acea04681c89b46233f90bd8f4cee6ebf.tar.gz
STC-modified-a8d94f4acea04681c89b46233f90bd8f4cee6ebf.zip
Final improvements before push.
Diffstat (limited to 'stc/ccommon.h')
-rw-r--r--stc/ccommon.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/stc/ccommon.h b/stc/ccommon.h
index ed44bcd7..0fa74f7b 100644
--- a/stc/ccommon.h
+++ b/stc/ccommon.h
@@ -122,8 +122,7 @@
for (type i=start, i##_inc_=step, i##_end_=(stop) - (0 < i##_inc_) \
; (i <= i##_end_) == (0 < i##_inc_); i += i##_inc_)
-#define c_with(start, end) for (int _c_w = (start, 0); !_c_w; end, ++_c_w)
-#define c_withfile(f, open) for (FILE *f = open; f; fclose(f), f = NULL)
+#define c_with(start, end) for (start, *_c_w = NULL; !_c_w; ++_c_w, end)
#define c_withbuffer(b, type, n) c_withbuffer_x(b, type, n, 256)
#define c_withbuffer_x(b, type, n, BYTES) \
for (type _c_b[((BYTES) - 1) / sizeof(type) + 1], \