Changeset 220
- Timestamp:
- 08/01/06 07:28:16 (7 years ago)
- Location:
- libyaml/trunk
- Files:
-
- 1 added
- 5 edited
-
Makefile.am (modified) (1 diff)
-
README (modified) (2 diffs)
-
announcement.msg (added)
-
include/yaml.h (modified) (36 diffs)
-
tests/example-deconstructor.c (modified) (2 diffs)
-
tests/example-reformatter.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libyaml/trunk/Makefile.am
r172 r220 4 4 SUBDIRS = include src . tests 5 5 6 EXTRA_DIST = doc/doxygen.cfg6 EXTRA_DIST = README LICENSE doc/doxygen.cfg 7 7 8 8 maintainer-clean-local: -
libyaml/trunk/README
r169 r220 1 libyaml- A C library for parsing and emitting YAML.1 LibYAML - A C library for parsing and emitting YAML. 2 2 3 The project is in an early stage of development and not usable for end users.3 The project is in an early stage of development. 4 4 5 5 To build and install the library, run: 6 $ ./configure 7 $ make 8 # make install 9 10 If you checked the source code from the Subversion repository, run 6 11 $ ./bootstrap 7 12 $ ./configure 8 13 $ make 9 $ make check10 14 # make install 11 15 12 For more information, check the libyamlhomepage:16 For more information, check the LibYAML homepage: 13 17 'http://pyyaml.org/wiki/LibYAML'. 14 18 … … 16 20 'http://lists.sourceforge.net/lists/listinfo/yaml-core'. 17 21 18 Submit bug reports and feature requests to the libyamlbug tracker:22 Submit bug reports and feature requests to the LibYAML bug tracker: 19 23 'http://pyyaml.org/newticket?component=libyaml'. 20 24 21 libyamlis written by Kirill Simonov <xi@resolvent.net>. It is released25 LibYAML is written by Kirill Simonov <xi@resolvent.net>. It is released 22 26 under the MIT license. See the file LICENSE for more details. 27 28 This project is developed for Python Software Foundation as a part of 29 Google Summer of Code under the mentorship of Clark Evans. -
libyaml/trunk/include/yaml.h
r219 r220 5 5 * Include the header file with the code: 6 6 * @code 7 * #include <yaml /yaml.h>7 * #include <yaml.h> 8 8 * @endcode 9 9 */ … … 286 286 * Free any memory allocated for a token object. 287 287 * 288 * @param[in ] token A token object.288 * @param[in,out] token A token object. 289 289 */ 290 290 … … 417 417 * Create the STREAM-START event. 418 418 * 419 * @param[ in]event An empty event object.419 * @param[out] event An empty event object. 420 420 * @param[in] encoding The stream encoding. 421 421 * … … 430 430 * Create the STREAM-END event. 431 431 * 432 * @param[ in]event An empty event object.432 * @param[out] event An empty event object. 433 433 * 434 434 * @returns @c 1 if the function succeeded, @c 0 on error. … … 444 444 * ignored by the emitter. 445 445 * 446 * @param[ in]event An empty event object.446 * @param[out] event An empty event object. 447 447 * @param[in] version_directive The %YAML directive value or @c NULL. 448 448 * @param[in] tag_directives_start The beginning of the %TAG directives list. … … 466 466 * ignored by the emitter. 467 467 * 468 * @param[ in]event An empty event object.468 * @param[out] event An empty event object. 469 469 * @param[in] implicit If the document end indicator is implicit. 470 470 * … … 478 478 * Create an ALIAS event. 479 479 * 480 * @param[ in]event An empty event object.480 * @param[out] event An empty event object. 481 481 * @param[in] anchor The anchor value. 482 482 * … … 495 495 * @a quoted_implicit flags must be set. 496 496 * 497 * @param[ in]event An empty event object.497 * @param[out] event An empty event object. 498 498 * @param[in] anchor The scalar anchor or @c NULL. 499 499 * @param[in] tag The scalar tag or @c NULL. … … 521 521 * Either the @a tag attribute or the @a implicit flag must be set. 522 522 * 523 * @param[ in]event An empty event object.523 * @param[out] event An empty event object. 524 524 * @param[in] anchor The sequence anchor or @c NULL. 525 525 * @param[in] tag The sequence tag or @c NULL. … … 538 538 * Create a SEQUENCE-END event. 539 539 * 540 * @param[ in]event An empty event object.540 * @param[out] event An empty event object. 541 541 * 542 542 * @returns @c 1 if the function succeeded, @c 0 on error. … … 553 553 * Either the @a tag attribute or the @a implicit flag must be set. 554 554 * 555 * @param[ in]event An empty event object.555 * @param[out] event An empty event object. 556 556 * @param[in] anchor The mapping anchor or @c NULL. 557 557 * @param[in] tag The mapping tag or @c NULL. … … 570 570 * Create a MAPPING-END event. 571 571 * 572 * @param[ in]event An empty event object.572 * @param[out] event An empty event object. 573 573 * 574 574 * @returns @c 1 if the function succeeded, @c 0 on error. … … 581 581 * Free any memory allocated for an event object. 582 582 * 583 * @param[ in]event An event object.583 * @param[out] event An event object. 584 584 */ 585 585 … … 601 601 * buffer. The number of written bytes should be set to the @a length variable. 602 602 * 603 * @param[in ] data A pointer to an application data specified by604 * @c yaml_parser_set_read_handler.605 * @param[out] buffer The buffer to write the data from the source.606 * @param[in] size The size of the buffer.607 * @param[out] size_read The actual number of bytes read from the source.603 * @param[in,out] data A pointer to an application data specified by 604 * yaml_parser_set_input(). 605 * @param[out] buffer The buffer to write the data from the source. 606 * @param[in] size The size of the buffer. 607 * @param[out] size_read The actual number of bytes read from the source. 608 608 * 609 609 * @returns On success, the handler should return @c 1. If the handler failed, … … 876 876 * 877 877 * This function creates a new parser object. An application is responsible 878 * for destroying the object using the @c yaml_parser_deletefunction.879 * 880 * @param[ in]parser An empty parser object.878 * for destroying the object using the yaml_parser_delete() function. 879 * 880 * @param[out] parser An empty parser object. 881 881 * 882 882 * @returns @c 1 if the function succeeded, @c 0 on error. … … 889 889 * Destroy a parser. 890 890 * 891 * @param[in ] parser A parser object.891 * @param[in,out] parser A parser object. 892 892 */ 893 893 … … 902 902 * destroying the @a parser. 903 903 * 904 * @param[in ] parser A parser object.905 * @param[in] input A source data.906 * @param[in] size The length of the source data in bytes.904 * @param[in,out] parser A parser object. 905 * @param[in] input A source data. 906 * @param[in] size The length of the source data in bytes. 907 907 */ 908 908 … … 917 917 * responsible for closing the @a file. 918 918 * 919 * @param[in ] parser A parser object.920 * @param[in] file An open file.919 * @param[in,out] parser A parser object. 920 * @param[in] file An open file. 921 921 */ 922 922 … … 927 927 * Set a generic input handler. 928 928 * 929 * @param[in] parser A parser object. 930 * @param[in] handler A read handler. 931 * @param[in] data Any application data for passing to the read handler. 929 * @param[in,out] parser A parser object. 930 * @param[in] handler A read handler. 931 * @param[in] data Any application data for passing to the read 932 * handler. 932 933 */ 933 934 … … 939 940 * Set the source encoding. 940 941 * 941 * @param[in ] parser A parser object.942 * @param[in] encoding The source encoding.942 * @param[in,out] parser A parser object. 943 * @param[in] encoding The source encoding. 943 944 */ 944 945 … … 957 958 * produced token object using the @c yaml_token_delete function. 958 959 * 959 * An application must not alternate the calls of @c yaml_parser_scanwith the960 * calls of @c yaml_parser_parse. Doing this will break the parser.961 * 962 * @param[in ] parser A parser object.963 * @param[ in]token An empty token object.960 * An application must not alternate the calls of yaml_parser_scan() with the 961 * calls of yaml_parser_parse(). Doing this will break the parser. 962 * 963 * @param[in,out] parser A parser object. 964 * @param[out] token An empty token object. 964 965 * 965 966 * @returns @c 1 if the function succeeded, @c 0 on error. … … 978 979 * 979 980 * An application is responsible for freeing any buffers associated with the 980 * produced event object using the @c yaml_event_deletefunction.981 * 982 * An application must not alternate the calls of @c yaml_parser_scanwith the983 * calls of @c yaml_parser_parse. Doing this will break the parser.984 * 985 * @param[in ] parser A parser object.986 * @param[ in]event An empty event object.981 * produced event object using the yaml_event_delete() function. 982 * 983 * An application must not alternate the calls of yaml_parser_scan() with the 984 * calls of yaml_parser_parse(). Doing this will break the parser. 985 * 986 * @param[in,out] parser A parser object. 987 * @param[out] event An empty event object. 987 988 * 988 989 * @returns @c 1 if the function succeeded, @c 0 on error. … … 1006 1007 * @a buffer to the output. 1007 1008 * 1008 * @param[in ] data A pointer to an application data specified by1009 * @c yaml_emitter_set_write_handler.1010 * @param[ out]buffer The buffer with bytes to be written.1011 * @param[in] size The size of the buffer.1009 * @param[in,out] data A pointer to an application data specified by 1010 * yaml_emitter_set_output(). 1011 * @param[in] buffer The buffer with bytes to be written. 1012 * @param[in] size The size of the buffer. 1012 1013 * 1013 1014 * @returns On success, the handler should return @c 1. If the handler failed, … … 1257 1258 * 1258 1259 * This function creates a new emitter object. An application is responsible 1259 * for destroying the object using the @c yaml_emitter_deletefunction.1260 * 1261 * @param[ in] emitterAn empty parser object.1260 * for destroying the object using the yaml_emitter_delete() function. 1261 * 1262 * @param[out] emitter An empty parser object. 1262 1263 * 1263 1264 * @returns @c 1 if the function succeeded, @c 0 on error. … … 1270 1271 * Destroy an emitter. 1271 1272 * 1272 * @param[in ] emitterAn emitter object.1273 * @param[in,out] emitter An emitter object. 1273 1274 */ 1274 1275 … … 1284 1285 * YAML_WRITE_ERROR error. 1285 1286 * 1286 * @param[in] emitter An emitter object. 1287 * @param[in] output An output buffer. 1288 * @param[in] size The buffer size. 1289 * @param[in] size_written The pointer to save the number of written bytes. 1287 * @param[in,out] emitter An emitter object. 1288 * @param[in] output An output buffer. 1289 * @param[in] size The buffer size. 1290 * @param[in] size_written The pointer to save the number of written 1291 * bytes. 1290 1292 */ 1291 1293 … … 1300 1302 * responsible for closing the @a file. 1301 1303 * 1302 * @param[in ] emitterAn emitter object.1303 * @param[in] fileAn open file.1304 * @param[in,out] emitter An emitter object. 1305 * @param[in] file An open file. 1304 1306 */ 1305 1307 … … 1310 1312 * Set a generic output handler. 1311 1313 * 1312 * @param[in] emitter An emitter object. 1313 * @param[in] handler A write handler. 1314 * @param[in] data Any application data for passing to the write handler. 1314 * @param[in,out] emitter An emitter object. 1315 * @param[in] handler A write handler. 1316 * @param[in] data Any application data for passing to the write 1317 * handler. 1315 1318 */ 1316 1319 … … 1322 1325 * Set the output encoding. 1323 1326 * 1324 * @param[in ] emitter An emitter object.1325 * @param[in] encoding The output encoding.1327 * @param[in,out] emitter An emitter object. 1328 * @param[in] encoding The output encoding. 1326 1329 */ 1327 1330 … … 1333 1336 * specification. 1334 1337 * 1335 * @param[in ] emitter An emitter object.1336 * @param[in] canonical If the output is canonical.1338 * @param[in,out] emitter An emitter object. 1339 * @param[in] canonical If the output is canonical. 1337 1340 */ 1338 1341 … … 1343 1346 * Set the intendation increment. 1344 1347 * 1345 * @param[in ] emitter An emitter object.1346 * @param[in] indent The indentation increment (1 < . < 10).1348 * @param[in,out] emitter An emitter object. 1349 * @param[in] indent The indentation increment (1 < . < 10). 1347 1350 */ 1348 1351 … … 1353 1356 * Set the preferred line width. @c -1 means unlimited. 1354 1357 * 1355 * @param[in ] emitter An emitter object.1356 * @param[in] width The preferred line width.1358 * @param[in,out] emitter An emitter object. 1359 * @param[in] width The preferred line width. 1357 1360 */ 1358 1361 … … 1363 1366 * Set if unescaped non-ASCII characters are allowed. 1364 1367 * 1365 * @param[in ] emitter An emitter object.1366 * @param[in] unicode If unescaped Unicode characters are allowed.1368 * @param[in,out] emitter An emitter object. 1369 * @param[in] unicode If unescaped Unicode characters are allowed. 1367 1370 */ 1368 1371 … … 1373 1376 * Set the preferred line break. 1374 1377 * 1375 * @param[in ] emitter An emitter object.1376 * @param[in] line_break The preferred line break.1378 * @param[in,out] emitter An emitter object. 1379 * @param[in] line_break The preferred line break. 1377 1380 */ 1378 1381 … … 1383 1386 * Emit an event. 1384 1387 * 1385 * The event object may be generated using the @c yaml_parser_parsefunction.1388 * The event object may be generated using the yaml_parser_parse() function. 1386 1389 * The emitter takes the responsibility for the event object and destroys its 1387 1390 * content after it is emitted. The event object is destroyed even if the 1388 1391 * function fails. 1389 1392 * 1390 * @param[in ] emitter An emitter object.1391 * @param[in ] event An event object.1393 * @param[in,out] emitter An emitter object. 1394 * @param[in,out] event An event object. 1392 1395 * 1393 1396 * @returns @c 1 if the function succeeded, @c 0 on error. … … 1400 1403 * Flush the accumulated characters to the output. 1401 1404 * 1402 * @param[in ] emitter An emitter object.1405 * @param[in,out] emitter An emitter object. 1403 1406 * 1404 1407 * @returns @c 1 if the function succeeded, @c 0 on error. -
libyaml/trunk/tests/example-deconstructor.c
r219 r220 1047 1047 fprintf(stderr, "Scanner error: %s at line %d, column %d\n" 1048 1048 "%s at line %d, column %d\n", parser.context, 1049 parser.context_mark.line , parser.context_mark.column,1050 parser.problem, parser.problem_mark.line ,1051 parser.problem_mark.column );1049 parser.context_mark.line+1, parser.context_mark.column+1, 1050 parser.problem, parser.problem_mark.line+1, 1051 parser.problem_mark.column+1); 1052 1052 } 1053 1053 else { 1054 1054 fprintf(stderr, "Scanner error: %s at line %d, column %d\n", 1055 parser.problem, parser.problem_mark.line ,1056 parser.problem_mark.column );1055 parser.problem, parser.problem_mark.line+1, 1056 parser.problem_mark.column+1); 1057 1057 } 1058 1058 break; … … 1062 1062 fprintf(stderr, "Parser error: %s at line %d, column %d\n" 1063 1063 "%s at line %d, column %d\n", parser.context, 1064 parser.context_mark.line , parser.context_mark.column,1065 parser.problem, parser.problem_mark.line ,1066 parser.problem_mark.column );1064 parser.context_mark.line+1, parser.context_mark.column+1, 1065 parser.problem, parser.problem_mark.line+1, 1066 parser.problem_mark.column+1); 1067 1067 } 1068 1068 else { 1069 1069 fprintf(stderr, "Parser error: %s at line %d, column %d\n", 1070 parser.problem, parser.problem_mark.line ,1071 parser.problem_mark.column );1070 parser.problem, parser.problem_mark.line+1, 1071 parser.problem_mark.column+1); 1072 1072 } 1073 1073 break; -
libyaml/trunk/tests/example-reformatter.c
r219 r220 134 134 fprintf(stderr, "Scanner error: %s at line %d, column %d\n" 135 135 "%s at line %d, column %d\n", parser.context, 136 parser.context_mark.line , parser.context_mark.column,137 parser.problem, parser.problem_mark.line ,138 parser.problem_mark.column );136 parser.context_mark.line+1, parser.context_mark.column+1, 137 parser.problem, parser.problem_mark.line+1, 138 parser.problem_mark.column+1); 139 139 } 140 140 else { 141 141 fprintf(stderr, "Scanner error: %s at line %d, column %d\n", 142 parser.problem, parser.problem_mark.line ,143 parser.problem_mark.column );142 parser.problem, parser.problem_mark.line+1, 143 parser.problem_mark.column+1); 144 144 } 145 145 break; … … 149 149 fprintf(stderr, "Parser error: %s at line %d, column %d\n" 150 150 "%s at line %d, column %d\n", parser.context, 151 parser.context_mark.line , parser.context_mark.column,152 parser.problem, parser.problem_mark.line ,153 parser.problem_mark.column );151 parser.context_mark.line+1, parser.context_mark.column+1, 152 parser.problem, parser.problem_mark.line+1, 153 parser.problem_mark.column+1); 154 154 } 155 155 else { 156 156 fprintf(stderr, "Parser error: %s at line %d, column %d\n", 157 parser.problem, parser.problem_mark.line ,158 parser.problem_mark.column );157 parser.problem, parser.problem_mark.line+1, 158 parser.problem_mark.column+1); 159 159 } 160 160 break;
Note: See TracChangeset
for help on using the changeset viewer.
