diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-15 18:09:00 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-15 20:03:45 +0100 |
commit | 05b5d8547f5f98ca4b907bf6a21564e2384740a6 (patch) | |
tree | d1a5c0a856f938721b92076e328ef22647fcaddb /vcal.c | |
parent | Add toggle for node data output. (diff) | |
download | calp-05b5d8547f5f98ca4b907bf6a21564e2384740a6.tar.gz calp-05b5d8547f5f98ca4b907bf6a21564e2384740a6.tar.xz |
Improve FOR macro.
Diffstat (limited to 'vcal.c')
-rw-r--r-- | vcal.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -115,15 +115,15 @@ int DEEP_COPY(vcomponent)(vcomponent* a, vcomponent* b) { FMT_F(vcomponent) { int seek = 0; - FOR(int, i, 40) fmtf("_"); + for (int i = 0; i < 40; i++) fmtf("_"); seek += sprintf(buf + seek, _YELLOW); seek += sprintf(buf + seek, "\nVComponet (Type := %s)\n", this->type); seek += sprintf(buf + seek, _RESET); seek += FMT(TRIE(content_line))(&this->clines, buf + seek); seek += sprintf(buf + seek, "\nComponents:\n"); - FOR(VECT(vcomponent), i, &this->components) { - seek += FMT(vcomponent)(GET(VECT(vcomponent))(&this->components, i), buf + seek); + FOR(VECT(vcomponent), vcomponent, comp, &this->components) { + seek += FMT(vcomponent)(comp, buf + seek); } return seek; |