docs/Writerside/topics/buffer.h.md

changeset 1298
0597f1f20ea9
parent 1291
5942859fd76c
equal deleted inserted replaced
1297:0811fb9a8dba 1298:0597f1f20ea9
45 45
46 // add headers 46 // add headers
47 CxMapIterator iter = cxMapIterator(header); 47 CxMapIterator iter = cxMapIterator(header);
48 cx_foreach(CxMapEntry*, entry, iter) { 48 cx_foreach(CxMapEntry*, entry, iter) {
49 cxstring name = cx_strn(entry->key->data, entry->key->len); 49 cxstring name = cx_strn(entry->key->data, entry->key->len);
50 cx_bprintf(&buf, "%.*s: %s\r\n", 50 cx_bprintf(&buf, "%" CX_PRIstr ": %s\r\n",
51 (int) name.length, name.ptr, entry->value 51 CX_SFMT(name), entry->value
52 ); 52 );
53 } 53 }
54 54
55 // blank line terminates 55 // blank line terminates
56 cxBufferWrite("\r\n", 1, 2, &buf); 56 cxBufferWrite("\r\n", 1, 2, &buf);

mercurial