Changeset da0fef6 in mainline for uspace/app/bithenge/print.c
- Timestamp:
- 2012-06-23T18:24:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 03b2b2c
- Parents:
- d5070ef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bithenge/print.c
rd5070ef rda0fef6 104 104 static int print_string(bithenge_print_type_t type, bithenge_node_t *node) 105 105 { 106 size_t off = 0;107 106 const char *value = bithenge_string_node_value(node); 108 wchar_t ch;109 107 printf("\""); 110 while ((ch = str_decode(value, &off, STR_NO_LIMIT)) != 0) { 108 for (string_iterator_t i = string_iterator(value); !string_iterator_done(&i); ) { 109 wchar_t ch; 110 int rc = string_iterator_next(&i, &ch); 111 if (rc != EOK) 112 return rc; 111 113 if (ch == '"' || ch == '\\') { 112 114 printf("\\%lc", (wint_t) ch); … … 134 136 return rc; 135 137 for (aoff64_t i = 0; i < size; i++) 136 printf("\\x%02x", buffer[i]);138 printf("\\x%02x", (unsigned int)(uint8_t)buffer[i]); 137 139 pos += size; 138 140 } while (size == sizeof(buffer));
Note:
See TracChangeset
for help on using the changeset viewer.