cybrid_api_bank_ruby 0.8.12 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +5 -5
  4. data/cybrid_api_bank_ruby.gemspec +1 -1
  5. data/docs/BankBankModel.md +2 -0
  6. data/docs/BanksBankApi.md +1 -1
  7. data/docs/PostBankBankModel.md +2 -0
  8. data/lib/cybrid_api_bank_ruby/api/accounts_bank_api.rb +1 -1
  9. data/lib/cybrid_api_bank_ruby/api/assets_bank_api.rb +1 -1
  10. data/lib/cybrid_api_bank_ruby/api/banks_bank_api.rb +1 -1
  11. data/lib/cybrid_api_bank_ruby/api/customers_bank_api.rb +1 -1
  12. data/lib/cybrid_api_bank_ruby/api/identity_records_bank_api.rb +1 -1
  13. data/lib/cybrid_api_bank_ruby/api/prices_bank_api.rb +1 -1
  14. data/lib/cybrid_api_bank_ruby/api/quotes_bank_api.rb +1 -1
  15. data/lib/cybrid_api_bank_ruby/api/symbols_bank_api.rb +1 -1
  16. data/lib/cybrid_api_bank_ruby/api/trades_bank_api.rb +1 -1
  17. data/lib/cybrid_api_bank_ruby/api/trading_configurations_bank_api.rb +1 -1
  18. data/lib/cybrid_api_bank_ruby/api/verification_keys_bank_api.rb +1 -1
  19. data/lib/cybrid_api_bank_ruby/api_client.rb +1 -1
  20. data/lib/cybrid_api_bank_ruby/api_error.rb +1 -1
  21. data/lib/cybrid_api_bank_ruby/configuration.rb +1 -1
  22. data/lib/cybrid_api_bank_ruby/models/account_bank_model.rb +3 -3
  23. data/lib/cybrid_api_bank_ruby/models/account_list_bank_model.rb +1 -1
  24. data/lib/cybrid_api_bank_ruby/models/asset_bank_model.rb +1 -1
  25. data/lib/cybrid_api_bank_ruby/models/asset_list_bank_model.rb +1 -1
  26. data/lib/cybrid_api_bank_ruby/models/attestation_details_bank_model.rb +1 -1
  27. data/lib/cybrid_api_bank_ruby/models/bank_bank_model.rb +14 -2
  28. data/lib/cybrid_api_bank_ruby/models/bank_list_bank_model.rb +1 -1
  29. data/lib/cybrid_api_bank_ruby/models/customer_bank_model.rb +1 -1
  30. data/lib/cybrid_api_bank_ruby/models/customer_list_bank_model.rb +1 -1
  31. data/lib/cybrid_api_bank_ruby/models/exchange_account_bank_model.rb +1 -1
  32. data/lib/cybrid_api_bank_ruby/models/exchange_bank_model.rb +1 -1
  33. data/lib/cybrid_api_bank_ruby/models/fee_bank_model.rb +1 -1
  34. data/lib/cybrid_api_bank_ruby/models/identity_record_bank_model.rb +1 -1
  35. data/lib/cybrid_api_bank_ruby/models/post_account_bank_model.rb +1 -1
  36. data/lib/cybrid_api_bank_ruby/models/post_bank_bank_model.rb +19 -2
  37. data/lib/cybrid_api_bank_ruby/models/post_customer_bank_model.rb +1 -1
  38. data/lib/cybrid_api_bank_ruby/models/post_fee_bank_model.rb +1 -1
  39. data/lib/cybrid_api_bank_ruby/models/post_identity_record_attestation_details_bank_model.rb +1 -1
  40. data/lib/cybrid_api_bank_ruby/models/post_identity_record_bank_model.rb +1 -1
  41. data/lib/cybrid_api_bank_ruby/models/post_quote_bank_model.rb +1 -1
  42. data/lib/cybrid_api_bank_ruby/models/post_trade_bank_model.rb +1 -1
  43. data/lib/cybrid_api_bank_ruby/models/post_trading_configuration_bank_model.rb +1 -1
  44. data/lib/cybrid_api_bank_ruby/models/post_verification_key_bank_model.rb +1 -1
  45. data/lib/cybrid_api_bank_ruby/models/quote_bank_model.rb +1 -1
  46. data/lib/cybrid_api_bank_ruby/models/quote_list_bank_model.rb +1 -1
  47. data/lib/cybrid_api_bank_ruby/models/symbol_price_bank_model.rb +1 -1
  48. data/lib/cybrid_api_bank_ruby/models/system_account_bank_model.rb +1 -1
  49. data/lib/cybrid_api_bank_ruby/models/trade_bank_model.rb +1 -1
  50. data/lib/cybrid_api_bank_ruby/models/trade_list_bank_model.rb +1 -1
  51. data/lib/cybrid_api_bank_ruby/models/trading_configuration_bank_model.rb +1 -1
  52. data/lib/cybrid_api_bank_ruby/models/trading_configuration_list_bank_model.rb +1 -1
  53. data/lib/cybrid_api_bank_ruby/models/verification_key_bank_model.rb +1 -1
  54. data/lib/cybrid_api_bank_ruby/models/verification_key_list_bank_model.rb +1 -1
  55. data/lib/cybrid_api_bank_ruby/version.rb +2 -2
  56. data/lib/cybrid_api_bank_ruby.rb +1 -1
  57. data/spec/api/accounts_bank_api_spec.rb +1 -1
  58. data/spec/api/assets_bank_api_spec.rb +1 -1
  59. data/spec/api/banks_bank_api_spec.rb +1 -1
  60. data/spec/api/customers_bank_api_spec.rb +1 -1
  61. data/spec/api/identity_records_bank_api_spec.rb +1 -1
  62. data/spec/api/prices_bank_api_spec.rb +1 -1
  63. data/spec/api/quotes_bank_api_spec.rb +1 -1
  64. data/spec/api/symbols_bank_api_spec.rb +1 -1
  65. data/spec/api/trades_bank_api_spec.rb +1 -1
  66. data/spec/api/trading_configurations_bank_api_spec.rb +1 -1
  67. data/spec/api/verification_keys_bank_api_spec.rb +1 -1
  68. data/spec/api_client_spec.rb +1 -1
  69. data/spec/configuration_spec.rb +1 -1
  70. data/spec/models/account_bank_model_spec.rb +2 -2
  71. data/spec/models/account_list_bank_model_spec.rb +1 -1
  72. data/spec/models/asset_bank_model_spec.rb +1 -1
  73. data/spec/models/asset_list_bank_model_spec.rb +1 -1
  74. data/spec/models/attestation_details_bank_model_spec.rb +1 -1
  75. data/spec/models/bank_bank_model_spec.rb +7 -1
  76. data/spec/models/bank_list_bank_model_spec.rb +1 -1
  77. data/spec/models/customer_bank_model_spec.rb +1 -1
  78. data/spec/models/customer_list_bank_model_spec.rb +1 -1
  79. data/spec/models/exchange_account_bank_model_spec.rb +1 -1
  80. data/spec/models/exchange_bank_model_spec.rb +1 -1
  81. data/spec/models/fee_bank_model_spec.rb +1 -1
  82. data/spec/models/identity_record_bank_model_spec.rb +1 -1
  83. data/spec/models/post_account_bank_model_spec.rb +1 -1
  84. data/spec/models/post_bank_bank_model_spec.rb +7 -1
  85. data/spec/models/post_customer_bank_model_spec.rb +1 -1
  86. data/spec/models/post_fee_bank_model_spec.rb +1 -1
  87. data/spec/models/post_identity_record_attestation_details_bank_model_spec.rb +1 -1
  88. data/spec/models/post_identity_record_bank_model_spec.rb +1 -1
  89. data/spec/models/post_quote_bank_model_spec.rb +1 -1
  90. data/spec/models/post_trade_bank_model_spec.rb +1 -1
  91. data/spec/models/post_trading_configuration_bank_model_spec.rb +1 -1
  92. data/spec/models/post_verification_key_bank_model_spec.rb +1 -1
  93. data/spec/models/quote_bank_model_spec.rb +1 -1
  94. data/spec/models/quote_list_bank_model_spec.rb +1 -1
  95. data/spec/models/symbol_price_bank_model_spec.rb +1 -1
  96. data/spec/models/system_account_bank_model_spec.rb +1 -1
  97. data/spec/models/trade_bank_model_spec.rb +1 -1
  98. data/spec/models/trade_list_bank_model_spec.rb +1 -1
  99. data/spec/models/trading_configuration_bank_model_spec.rb +1 -1
  100. data/spec/models/trading_configuration_list_bank_model_spec.rb +1 -1
  101. data/spec/models/verification_key_bank_model_spec.rb +1 -1
  102. data/spec/models/verification_key_list_bank_model_spec.rb +1 -1
  103. data/spec/spec_helper.rb +1 -1
  104. data/vendor/bundle/ruby/3.1.0/cache/psych-4.0.4.gem +0 -0
  105. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/byebug-11.1.3/gem_make.out +2 -2
  106. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/ffi-1.15.5/gem_make.out +2 -2
  107. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/jaro_winkler-1.5.4/gem_make.out +2 -2
  108. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/psych-4.0.4/gem.build_complete +0 -0
  109. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/psych-4.0.4/gem_make.out +27 -0
  110. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/psych-4.0.4/mkmf.log +75 -0
  111. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/psych-4.0.4/psych.so +0 -0
  112. data/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/stringio-3.0.2/gem_make.out +2 -2
  113. data/vendor/bundle/ruby/3.1.0/gems/byebug-11.1.3/ext/byebug/Makefile +2 -2
  114. data/vendor/bundle/ruby/3.1.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +2 -2
  115. data/vendor/bundle/ruby/3.1.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +2 -2
  116. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/.gitignore +16 -0
  117. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/Gemfile +9 -0
  118. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/LICENSE +21 -0
  119. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/Mavenfile +7 -0
  120. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/README.md +72 -0
  121. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/Rakefile +41 -0
  122. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/bin/console +7 -0
  123. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/bin/setup +6 -0
  124. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/.sitearchdir.time +0 -0
  125. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/Makefile +274 -0
  126. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/depend +5 -0
  127. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/extconf.rb +43 -0
  128. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych.c +37 -0
  129. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych.h +17 -0
  130. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych.o +0 -0
  131. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych.so +0 -0
  132. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_emitter.c +555 -0
  133. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_emitter.h +8 -0
  134. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_emitter.o +0 -0
  135. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_parser.c +579 -0
  136. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_parser.h +6 -0
  137. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_parser.o +0 -0
  138. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_to_ruby.c +39 -0
  139. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_to_ruby.h +8 -0
  140. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_to_ruby.o +0 -0
  141. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_yaml_tree.c +12 -0
  142. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_yaml_tree.h +8 -0
  143. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/psych_yaml_tree.o +0 -0
  144. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/LICENSE +19 -0
  145. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/api.c +1393 -0
  146. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/config.h +80 -0
  147. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/dumper.c +394 -0
  148. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/emitter.c +2358 -0
  149. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/loader.c +544 -0
  150. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/parser.c +1375 -0
  151. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/reader.c +469 -0
  152. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/scanner.c +3598 -0
  153. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/writer.c +141 -0
  154. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/yaml.h +1985 -0
  155. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/ext/psych/yaml/yaml_private.h +688 -0
  156. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/class_loader.rb +104 -0
  157. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/coder.rb +95 -0
  158. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/core_ext.rb +19 -0
  159. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/exception.rb +14 -0
  160. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/handler.rb +255 -0
  161. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/handlers/document_stream.rb +23 -0
  162. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/handlers/recorder.rb +40 -0
  163. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/json/ruby_events.rb +20 -0
  164. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/json/stream.rb +17 -0
  165. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/json/tree_builder.rb +13 -0
  166. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/json/yaml_events.rb +30 -0
  167. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/nodes/alias.rb +21 -0
  168. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/nodes/document.rb +63 -0
  169. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/nodes/mapping.rb +59 -0
  170. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/nodes/node.rb +75 -0
  171. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/nodes/scalar.rb +70 -0
  172. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/nodes/sequence.rb +84 -0
  173. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/nodes/stream.rb +40 -0
  174. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/nodes.rb +78 -0
  175. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/omap.rb +5 -0
  176. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/parser.rb +52 -0
  177. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/scalar_scanner.rb +142 -0
  178. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/set.rb +5 -0
  179. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/stream.rb +38 -0
  180. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/streaming.rb +28 -0
  181. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/syntax_error.rb +22 -0
  182. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/tree_builder.rb +137 -0
  183. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/versions.rb +10 -0
  184. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/visitors/depth_first.rb +27 -0
  185. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/visitors/emitter.rb +52 -0
  186. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/visitors/json_tree.rb +25 -0
  187. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/visitors/to_ruby.rb +434 -0
  188. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/visitors/visitor.rb +34 -0
  189. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/visitors/yaml_tree.rb +587 -0
  190. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/visitors.rb +7 -0
  191. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych/y.rb +10 -0
  192. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych.rb +741 -0
  193. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/lib/psych.so +0 -0
  194. data/vendor/bundle/ruby/3.1.0/gems/psych-4.0.4/psych.gemspec +69 -0
  195. data/vendor/bundle/ruby/3.1.0/gems/stringio-3.0.2/ext/stringio/Makefile +2 -2
  196. data/vendor/bundle/ruby/3.1.0/specifications/psych-4.0.4.gemspec +36 -0
  197. metadata +87 -2
@@ -0,0 +1,141 @@
1
+
2
+ #include "yaml_private.h"
3
+
4
+ /*
5
+ * Declarations.
6
+ */
7
+
8
+ static int
9
+ yaml_emitter_set_writer_error(yaml_emitter_t *emitter, const char *problem);
10
+
11
+ YAML_DECLARE(int)
12
+ yaml_emitter_flush(yaml_emitter_t *emitter);
13
+
14
+ /*
15
+ * Set the writer error and return 0.
16
+ */
17
+
18
+ static int
19
+ yaml_emitter_set_writer_error(yaml_emitter_t *emitter, const char *problem)
20
+ {
21
+ emitter->error = YAML_WRITER_ERROR;
22
+ emitter->problem = problem;
23
+
24
+ return 0;
25
+ }
26
+
27
+ /*
28
+ * Flush the output buffer.
29
+ */
30
+
31
+ YAML_DECLARE(int)
32
+ yaml_emitter_flush(yaml_emitter_t *emitter)
33
+ {
34
+ int low, high;
35
+
36
+ assert(emitter); /* Non-NULL emitter object is expected. */
37
+ assert(emitter->write_handler); /* Write handler must be set. */
38
+ assert(emitter->encoding); /* Output encoding must be set. */
39
+
40
+ emitter->buffer.last = emitter->buffer.pointer;
41
+ emitter->buffer.pointer = emitter->buffer.start;
42
+
43
+ /* Check if the buffer is empty. */
44
+
45
+ if (emitter->buffer.start == emitter->buffer.last) {
46
+ return 1;
47
+ }
48
+
49
+ /* If the output encoding is UTF-8, we don't need to recode the buffer. */
50
+
51
+ if (emitter->encoding == YAML_UTF8_ENCODING)
52
+ {
53
+ if (emitter->write_handler(emitter->write_handler_data,
54
+ emitter->buffer.start,
55
+ emitter->buffer.last - emitter->buffer.start)) {
56
+ emitter->buffer.last = emitter->buffer.start;
57
+ emitter->buffer.pointer = emitter->buffer.start;
58
+ return 1;
59
+ }
60
+ else {
61
+ return yaml_emitter_set_writer_error(emitter, "write error");
62
+ }
63
+ }
64
+
65
+ /* Recode the buffer into the raw buffer. */
66
+
67
+ low = (emitter->encoding == YAML_UTF16LE_ENCODING ? 0 : 1);
68
+ high = (emitter->encoding == YAML_UTF16LE_ENCODING ? 1 : 0);
69
+
70
+ while (emitter->buffer.pointer != emitter->buffer.last)
71
+ {
72
+ unsigned char octet;
73
+ unsigned int width;
74
+ unsigned int value;
75
+ size_t k;
76
+
77
+ /*
78
+ * See the "reader.c" code for more details on UTF-8 encoding. Note
79
+ * that we assume that the buffer contains a valid UTF-8 sequence.
80
+ */
81
+
82
+ /* Read the next UTF-8 character. */
83
+
84
+ octet = emitter->buffer.pointer[0];
85
+
86
+ width = (octet & 0x80) == 0x00 ? 1 :
87
+ (octet & 0xE0) == 0xC0 ? 2 :
88
+ (octet & 0xF0) == 0xE0 ? 3 :
89
+ (octet & 0xF8) == 0xF0 ? 4 : 0;
90
+
91
+ value = (octet & 0x80) == 0x00 ? octet & 0x7F :
92
+ (octet & 0xE0) == 0xC0 ? octet & 0x1F :
93
+ (octet & 0xF0) == 0xE0 ? octet & 0x0F :
94
+ (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0;
95
+
96
+ for (k = 1; k < width; k ++) {
97
+ octet = emitter->buffer.pointer[k];
98
+ value = (value << 6) + (octet & 0x3F);
99
+ }
100
+
101
+ emitter->buffer.pointer += width;
102
+
103
+ /* Write the character. */
104
+
105
+ if (value < 0x10000)
106
+ {
107
+ emitter->raw_buffer.last[high] = value >> 8;
108
+ emitter->raw_buffer.last[low] = value & 0xFF;
109
+
110
+ emitter->raw_buffer.last += 2;
111
+ }
112
+ else
113
+ {
114
+ /* Write the character using a surrogate pair (check "reader.c"). */
115
+
116
+ value -= 0x10000;
117
+ emitter->raw_buffer.last[high] = 0xD8 + (value >> 18);
118
+ emitter->raw_buffer.last[low] = (value >> 10) & 0xFF;
119
+ emitter->raw_buffer.last[high+2] = 0xDC + ((value >> 8) & 0xFF);
120
+ emitter->raw_buffer.last[low+2] = value & 0xFF;
121
+
122
+ emitter->raw_buffer.last += 4;
123
+ }
124
+ }
125
+
126
+ /* Write the raw buffer. */
127
+
128
+ if (emitter->write_handler(emitter->write_handler_data,
129
+ emitter->raw_buffer.start,
130
+ emitter->raw_buffer.last - emitter->raw_buffer.start)) {
131
+ emitter->buffer.last = emitter->buffer.start;
132
+ emitter->buffer.pointer = emitter->buffer.start;
133
+ emitter->raw_buffer.last = emitter->raw_buffer.start;
134
+ emitter->raw_buffer.pointer = emitter->raw_buffer.start;
135
+ return 1;
136
+ }
137
+ else {
138
+ return yaml_emitter_set_writer_error(emitter, "write error");
139
+ }
140
+ }
141
+