Changeset 263 for libyaml/trunk/src/yaml_private.h
- Timestamp:
- 12/27/07 07:05:17 (5 years ago)
- File:
-
- 1 edited
-
libyaml/trunk/src/yaml_private.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libyaml/trunk/src/yaml_private.h
r262 r263 72 72 (memset(&(error), 0, sizeof(error)), \ 73 73 (error).type = (error_type), \ 74 (error). type.dumping.problem = (error_problem), \74 (error).data.dumping.problem = (error_problem), \ 75 75 0) 76 76 … … 105 105 WRITING_ERROR_INIT((self)->error,YAML_WRITER_ERROR,problem,offset) 106 106 107 #define EMITTER_ERROR_INIT(self, context,problem)\107 #define EMITTER_ERROR_INIT(self,problem) \ 108 108 DUMPING_ERROR_INIT((self)->error,YAML_EMITTER_ERROR,problem) 109 109 … … 148 148 #define INITIAL_QUEUE_CAPACITY 16 149 149 #define INITIAL_STRING_CAPACITY 16 150 151 /*152 * Input/output buffer management.153 */154 155 #define STORAGE_INIT(self,storage,storage_capacity) \156 (((storage).buffer = yaml_malloc(storage_capacity)) ? \157 ((storage).pointer = (storage).length = 0, \158 (buffer).capacity = (storage_capacity) \159 1) : \160 ((self)->error.type = YAML_MEMORY_ERROR, \161 0))162 163 #define STORAGE_DEL(self,storage) \164 (yaml_free((storage).buffer), \165 (storage).pointer = (storage).length = (storage).capacity = 0)166 150 167 151 /* … … 183 167 yaml_char_t *adj_buffer, size_t adj_pointer, size_t adj_capacity); 184 168 185 #define NULL_STRING { NULL, NULL, NULL}169 #define NULL_STRING { NULL, 0, 0 } 186 170 187 171 #define STRING(string,capacity) { (string), 0, (capacity) } … … 460 444 461 445 #define MOVE(string) ((string).pointer += WIDTH((string))) 446 447 /* 448 * Write a single octet and bump the pointer. 449 */ 450 451 #define JOIN_OCTET(string,octet) \ 452 ((string).buffer[(string).pointer++] = (octet)) 462 453 463 454 /* … … 864 855 yaml_char_t *buffer; 865 856 size_t pointer; 866 size_t length;867 857 size_t capacity; 868 858 } input; … … 875 865 unsigned char *buffer; 876 866 size_t pointer; 877 size_t length;878 867 size_t capacity; 879 868 } raw_input; … … 1069 1058 yaml_char_t *buffer; 1070 1059 size_t pointer; 1071 size_t length;1072 1060 size_t capacity; 1073 1061 } output; … … 1077 1065 yaml_char_t *buffer; 1078 1066 size_t pointer; 1079 size_t length;1080 1067 size_t capacity; 1081 1068 } raw_output; 1069 1070 /* The offset of the current position (in bytes). */ 1071 size_t offset; 1082 1072 1083 1073 /* The stream encoding. */ … … 1151 1141 int column; 1152 1142 /* If the last character was a whitespace? */ 1153 int whitespace;1143 int is_whitespace; 1154 1144 /* If the last character was an indentation character (' ', '-', '?', ':')? */ 1155 int i ndention;1145 int is_indention; 1156 1146 1157 1147 /* Anchor analysis. */
Note: See TracChangeset
for help on using the changeset viewer.
