Changeset 9b20126 in mainline for uspace/lib/pcut/src/report/report.c
- Timestamp:
- 2014-09-19T08:23:01Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c85a57f
- Parents:
- 15d0046
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/src/report/report.c
r15d0046 r9b20126 44 44 * 45 45 * @param op Operation to be called on the pcut_report_ops_t. 46 * @param ... Arguments to the operation. 46 47 */ 47 48 #define REPORT_CALL(op, ...) \ 48 49 if ((report_ops != NULL) && (report_ops->op != NULL)) report_ops->op(__VA_ARGS__) 50 51 /** Call a report function if it is available. 52 * 53 * @param op Operation to be called on the pcut_report_ops_t. 54 */ 55 #define REPORT_CALL_NO_ARGS(op) \ 56 if ((report_ops != NULL) && (report_ops->op != NULL)) report_ops->op() 49 57 50 58 /** Print error message. … … 94 102 /* Ensure that we do not read past the full_output. */ 95 103 if (full_output[full_output_size - 1] != 0) { 96 / / FIXME: can this happen?104 /* FIXME: can this happen? */ 97 105 return; 98 106 } 99 107 100 108 while (1) { 109 size_t message_length; 110 101 111 /* First of all, count number of zero bytes before the text. */ 102 112 size_t cont_zeros_count = 0; … … 111 121 112 122 /* Determine the length of the text after the zeros. */ 113 size_tmessage_length = pcut_str_size(full_output);123 message_length = pcut_str_size(full_output); 114 124 115 125 if (cont_zeros_count < 2) { 116 126 /* Okay, standard I/O. */ 117 127 if (message_length > stdio_buffer_size) { 118 / / TODO: handle gracefully128 /* TODO: handle gracefully */ 119 129 return; 120 130 } … … 125 135 /* Error message. */ 126 136 if (message_length > error_buffer_size) { 127 / / TODO: handle gracefully137 /* TODO: handle gracefully */ 128 138 return; 129 139 } … … 213 223 * 214 224 */ 215 void pcut_report_done( ) {216 REPORT_CALL (done);217 } 218 225 void pcut_report_done(void) { 226 REPORT_CALL_NO_ARGS(done); 227 } 228
Note:
See TracChangeset
for help on using the changeset viewer.