summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 08:04:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 08:04:13 +0000
commit977267c2e0218d6b182807ddf9b7c1d929c40bed (patch)
tree815b002eaefef951ce56a1d58bca375c62bd7350 /ext/syck
parent36f8540a2b024ee30092ea6a0eebfa40ccc95b07 (diff)
* ext/**/*.[ch]: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/bytecode.c22
-rw-r--r--ext/syck/emitter.c34
-rw-r--r--ext/syck/gram.c76
-rw-r--r--ext/syck/handler.c10
-rw-r--r--ext/syck/node.c18
-rw-r--r--ext/syck/rubyext.c70
-rw-r--r--ext/syck/syck.c12
-rw-r--r--ext/syck/syck.h8
-rw-r--r--ext/syck/token.c94
-rw-r--r--ext/syck/yaml2byte.c16
-rw-r--r--ext/syck/yamlbyte.h20
11 files changed, 190 insertions, 190 deletions
diff --git a/ext/syck/bytecode.c b/ext/syck/bytecode.c
index 25ba678300e..5cddb228316 100644
--- a/ext/syck/bytecode.c
+++ b/ext/syck/bytecode.c
@@ -98,7 +98,7 @@ char *get_inline( SyckParser *parser );
if ( reset == 1 ) YYPOS(0); \
return YAML_IOPEN; \
} \
- }
+ }
/*
* Nice little macro to ensure closure of levels.
@@ -135,7 +135,7 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
SyckLevel *lvl;
syck_parser_ptr = parser;
- if ( YYCURSOR == NULL )
+ if ( YYCURSOR == NULL )
{
syck_parser_read( parser );
}
@@ -289,7 +289,7 @@ yy17: ++YYCURSOR;
goto yy18;
yy18:
#line 288 "bytecode.re"
-{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
+{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
goto Scalar;
}
#line 296 "<stdout>"
@@ -392,7 +392,7 @@ yy28:
{ CHK_NL(YYCURSOR);
if ( lvl->status == syck_lvl_seq )
{
- return YAML_INDENT;
+ return YAML_INDENT;
}
else if ( lvl->status == syck_lvl_map )
{
@@ -434,12 +434,12 @@ yy33:
FORCE_NEXT_TOKEN( '}' );
return '{';
}
-
+
POP_LEVEL();
lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_seq )
{
- FORCE_NEXT_TOKEN(YAML_INDENT);
+ FORCE_NEXT_TOKEN(YAML_INDENT);
}
else if ( lvl->status == syck_lvl_map )
{
@@ -494,7 +494,7 @@ yy39:
{
complex = 1;
}
- ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_map);
+ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_map);
CHK_NL(YYCURSOR);
if ( complex )
{
@@ -990,7 +990,7 @@ yy70: ++YYCURSOR;
yy71:
#line 461 "bytecode.re"
{ YYCURSOR = tok;
- goto ScalarEnd;
+ goto ScalarEnd;
}
#line 996 "<stdout>"
yy72: ++YYCURSOR;
@@ -1001,7 +1001,7 @@ yy72: ++YYCURSOR;
yy73:
#line 469 "bytecode.re"
{ CAT(str, cap, idx, tok[0]);
- goto Scalar2;
+ goto Scalar2;
}
#line 1007 "<stdout>"
yy74: ++YYCURSOR;
@@ -1071,7 +1071,7 @@ yy84:
#line 456 "bytecode.re"
{ CHK_NL(tok+1);
CAT(str, cap, idx, '\0');
- goto Scalar2;
+ goto Scalar2;
}
#line 1077 "<stdout>"
}
@@ -1139,7 +1139,7 @@ yy89: ++YYCURSOR;
yy90:
#line 515 "bytecode.re"
{ CAT(str, cap, idx, tok[0]);
- goto Inline;
+ goto Inline;
}
#line 1145 "<stdout>"
yy91: ++YYCURSOR;
diff --git a/ext/syck/emitter.c b/ext/syck/emitter.c
index 18f2cdefeff..eb01033653e 100644
--- a/ext/syck/emitter.c
+++ b/ext/syck/emitter.c
@@ -4,9 +4,9 @@
* $Author$
*
* Copyright (C) 2003 why the lucky stiff
- *
+ *
* All Base64 code from Ruby's pack.c.
- * Ruby is Copyright (C) 1993-2007 Yukihiro Matsumoto
+ * Ruby is Copyright (C) 1993-2007 Yukihiro Matsumoto
*/
#include "ruby/ruby.h"
@@ -17,7 +17,7 @@
#define DEFAULT_ANCHOR_FORMAT "id%03d"
-const char hex_table[] =
+const char hex_table[] =
"0123456789ABCDEF";
static char b64_table[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -131,7 +131,7 @@ syck_new_emitter(void)
e->output_handler = NULL;
e->lvl_idx = 0;
e->lvl_capa = ALLOC_CT;
- e->levels = S_ALLOC_N( SyckLevel, e->lvl_capa );
+ e->levels = S_ALLOC_N( SyckLevel, e->lvl_capa );
syck_emitter_reset_levels( e );
e->bonus = NULL;
return e;
@@ -197,7 +197,7 @@ syck_emitter_pop_level( SyckEmitter *e )
free( e->levels[e->lvl_idx].domain );
}
-void
+void
syck_emitter_add_level( SyckEmitter *e, int len, enum syck_level_status status )
{
ASSERT( e != NULL );
@@ -289,7 +289,7 @@ syck_emitter_write( SyckEmitter *e, const char *str, long len )
{
syck_emitter_clear( e );
}
-
+
/*
* Flush if at end of buffer
*/
@@ -360,7 +360,7 @@ syck_emit( SyckEmitter *e, st_data_t n )
int indent = 0;
long x = 0;
SyckLevel *lvl = syck_emitter_current_level( e );
-
+
/*
* Determine headers.
*/
@@ -485,7 +485,7 @@ void syck_emit_tag( SyckEmitter *e, const char *tag, const char *ignore )
lvl->anctag = 1;
}
-/*
+/*
* Emit a newline and an appropriately spaced indent.
*/
void syck_emit_indent( SyckEmitter *e )
@@ -569,7 +569,7 @@ syck_scan_scalar( int req_width, const char *cursor, long len )
} else if ( len > 1 && cursor[len-2] == '\n' ) {
flags |= SCAN_MANYNL_E;
}
- if (
+ if (
( len > 0 && ( cursor[0] == ' ' || cursor[0] == '\t' ) ) ||
( len > 1 && ( cursor[len-1] == ' ' || cursor[len-1] == '\t' ) )
) {
@@ -594,7 +594,7 @@ syck_scan_scalar( int req_width, const char *cursor, long len )
flags |= SCAN_NEWLINE;
if ( len - i >= 3 && strncmp( &cursor[i+1], "---", 3 ) == 0 )
flags |= SCAN_DOCSEP;
- if ( cursor[i+1] == ' ' || cursor[i+1] == '\t' )
+ if ( cursor[i+1] == ' ' || cursor[i+1] == '\t' )
flags |= SCAN_INDENTED;
if ( req_width > 0 && i - start > req_width )
flags |= SCAN_WIDE;
@@ -618,12 +618,12 @@ syck_scan_scalar( int req_width, const char *cursor, long len )
}
/* remember, if plain collections get implemented, to add nb-plain-flow-char */
else if ( ( cursor[i] == ' ' && cursor[i+1] == '#' ) ||
- ( cursor[i] == ':' &&
+ ( cursor[i] == ':' &&
( cursor[i+1] == ' ' || cursor[i+1] == '\n' || i == len - 1 ) ) )
{
flags |= SCAN_INDIC_C;
}
- else if ( cursor[i] == ',' &&
+ else if ( cursor[i] == ',' &&
( cursor[i+1] == ' ' || cursor[i+1] == '\n' || i == len - 1 ) )
{
flags |= SCAN_FLOWMAP;
@@ -647,12 +647,12 @@ void syck_emit_scalar( SyckEmitter *e, const char *tag, enum scalar_style force_
int scan = 0;
const char *match_implicit;
char *implicit;
-
+
if ( str == NULL ) str = "";
/* No empty nulls as map keys */
- if ( len == 0 && ( parent->status == syck_lvl_map || parent->status == syck_lvl_imap ) &&
- parent->ncount % 2 == 1 && syck_tagcmp( tag, "tag:yaml.org,2002:null" ) == 0 )
+ if ( len == 0 && ( parent->status == syck_lvl_map || parent->status == syck_lvl_imap ) &&
+ parent->ncount % 2 == 1 && syck_tagcmp( tag, "tag:yaml.org,2002:null" ) == 0 )
{
str = "~";
len = 1;
@@ -668,8 +668,8 @@ void syck_emit_scalar( SyckEmitter *e, const char *tag, enum scalar_style force_
} else {
/* complex key */
if ( parent->status == syck_lvl_map && parent->ncount % 2 == 1 &&
- ( !( tag == NULL ||
- ( implicit != NULL && syck_tagcmp( tag, implicit ) == 0 && e->explicit_typing == 0 ) ) ) )
+ ( !( tag == NULL ||
+ ( implicit != NULL && syck_tagcmp( tag, implicit ) == 0 && e->explicit_typing == 0 ) ) ) )
{
syck_emitter_write( e, "? ", 2 );
parent->status = syck_lvl_mapx;
diff --git a/ext/syck/gram.c b/ext/syck/gram.c
index 615a594f613..8fe4e4f3b53 100644
--- a/ext/syck/gram.c
+++ b/ext/syck/gram.c
@@ -1216,7 +1216,7 @@ yyreduce:
case 8:
#line 76 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1232,7 +1232,7 @@ yyreduce:
case 10:
#line 86 "gram.y"
- {
+ {
/*
* _Anchors_: The language binding must keep a separate symbol table
* for anchors. The actual ID in the symbol table is returned to the
@@ -1266,7 +1266,7 @@ yyreduce:
case 16:
#line 114 "gram.y"
- {
+ {
if ( ((SyckParser *)parser)->implicit_typing == 1 )
{
try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
@@ -1277,7 +1277,7 @@ yyreduce:
case 17:
#line 122 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1293,7 +1293,7 @@ yyreduce:
case 19:
#line 132 "gram.y"
- {
+ {
/*
* _Anchors_: The language binding must keep a separate symbol table
* for anchors. The actual ID in the symbol table is returned to the
@@ -1305,7 +1305,7 @@ yyreduce:
case 26:
#line 165 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1313,7 +1313,7 @@ yyreduce:
case 27:
#line 170 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1321,7 +1321,7 @@ yyreduce:
case 28:
#line 175 "gram.y"
- {
+ {
if ( ((SyckParser *)parser)->implicit_typing == 1 )
{
try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
@@ -1332,7 +1332,7 @@ yyreduce:
case 29:
#line 183 "gram.y"
- {
+ {
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
@@ -1350,7 +1350,7 @@ yyreduce:
case 31:
#line 195 "gram.y"
- {
+ {
SyckNode *n = yyvsp[0].nodeData;
if ( ((SyckParser *)parser)->taguri_expansion == 1 )
{
@@ -1373,28 +1373,28 @@ yyreduce:
case 39:
#line 229 "gram.y"
- {
+ {
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
case 40:
#line 233 "gram.y"
- {
+ {
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
case 41:
#line 239 "gram.y"
- {
+ {
yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
}
break;
case 42:
#line 245 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1402,7 +1402,7 @@ yyreduce:
case 43:
#line 250 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1410,7 +1410,7 @@ yyreduce:
case 44:
#line 255 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1418,7 +1418,7 @@ yyreduce:
case 45:
#line 260 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1426,14 +1426,14 @@ yyreduce:
case 46:
#line 265 "gram.y"
- {
+ {
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
}
break;
case 47:
#line 269 "gram.y"
- {
+ {
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
@@ -1447,7 +1447,7 @@ yyreduce:
case 49:
#line 279 "gram.y"
- {
+ {
syck_seq_add( yyvsp[-2].nodeData, yyvsp[0].nodeId );
yyval.nodeData = yyvsp[-2].nodeData;
}
@@ -1455,21 +1455,21 @@ yyreduce:
case 50:
#line 284 "gram.y"
- {
+ {
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
case 51:
#line 293 "gram.y"
- {
+ {
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
case 52:
#line 297 "gram.y"
- {
+ {
yyval.nodeData = syck_alloc_seq();
}
break;
@@ -1483,7 +1483,7 @@ yyreduce:
case 54:
#line 307 "gram.y"
- {
+ {
syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
yyval.nodeData = yyvsp[-2].nodeData;
}
@@ -1491,7 +1491,7 @@ yyreduce:
case 57:
#line 321 "gram.y"
- {
+ {
apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
yyval.nodeData = yyvsp[-1].nodeData;
}
@@ -1499,7 +1499,7 @@ yyreduce:
case 58:
#line 326 "gram.y"
- {
+ {
apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
yyval.nodeData = yyvsp[-1].nodeData;
}
@@ -1507,7 +1507,7 @@ yyreduce:
case 59:
#line 333 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1515,7 +1515,7 @@ yyreduce:
case 60:
#line 338 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1523,7 +1523,7 @@ yyreduce:
case 61:
#line 343 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1531,7 +1531,7 @@ yyreduce:
case 62:
#line 348 "gram.y"
- {
+ {
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
@@ -1539,14 +1539,14 @@ yyreduce:
case 63:
#line 353 "gram.y"
- {
+ {
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
}
break;
case 64:
#line 357 "gram.y"
- {
+ {
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
@@ -1561,8 +1561,8 @@ yyreduce:
case 68:
#line 380 "gram.y"
{
- yyval.nodeData = syck_new_map(
- syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
+ yyval.nodeData = syck_new_map(
+ syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
}
break;
@@ -1603,8 +1603,8 @@ yyreduce:
case 73:
#line 427 "gram.y"
{
- yyval.nodeData = syck_new_map(
- syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
+ yyval.nodeData = syck_new_map(
+ syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
}
break;
@@ -1637,8 +1637,8 @@ yyreduce:
#line 455 "gram.y"
{
NULL_NODE( parser, n );
- yyval.nodeData = syck_new_map(
- syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ),
+ yyval.nodeData = syck_new_map(
+ syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ),
syck_hdlr_add_node( (SyckParser *)parser, n ) );
}
break;
diff --git a/ext/syck/handler.c b/ext/syck/handler.c
index d76a72e5cc2..40f5ef27d0c 100644
--- a/ext/syck/handler.c
+++ b/ext/syck/handler.c
@@ -9,12 +9,12 @@
#include "ruby/ruby.h"
#include "syck.h"
-SYMID
+SYMID
syck_hdlr_add_node( SyckParser *p, SyckNode *n )
{
SYMID id;
- if ( ! n->id )
+ if ( ! n->id )
{
n->id = (p->handler)( p, n );
}
@@ -89,7 +89,7 @@ syck_hdlr_get_anchor( SyckParser *p, char *a )
if ( st_lookup( p->anchors, (st_data_t)a, (void *)&n ) )
{
if ( n != (void *)1 )
- {
+ {
S_FREE( a );
return n;
}
@@ -116,7 +116,7 @@ syck_hdlr_get_anchor( SyckParser *p, char *a )
if ( n->anchor )
{
S_FREE( a );
- }
+ }
else
{
n->anchor = a;
@@ -165,7 +165,7 @@ syck_taguri( const char *domain, const char *type_id, int type_len )
return uri;
}
-int
+int
syck_try_implicit( SyckNode *n )
{
return 1;
diff --git a/ext/syck/node.c b/ext/syck/node.c
index fb98f655ccf..35c1f45150b 100644
--- a/ext/syck/node.c
+++ b/ext/syck/node.c
@@ -59,7 +59,7 @@ syck_alloc_map(void)
n = syck_alloc_node( syck_map_kind );
n->data.pairs = m;
-
+
return n;
}
@@ -94,7 +94,7 @@ syck_alloc_str(void)
n = syck_alloc_node( syck_str_kind );
n->data.str = s;
-
+
return n;
}
@@ -128,7 +128,7 @@ syck_replace_str( SyckNode *n, char *str, enum scalar_style style )
void
syck_replace_str2( SyckNode *n, char *str, long len, enum scalar_style style )
{
- if ( n->data.str->ptr != NULL )
+ if ( n->data.str->ptr != NULL )
{
S_FREE( n->data.str->ptr );
n->data.str->ptr = NULL;
@@ -201,7 +201,7 @@ syck_map_add( SyckNode *map, SYMID key, SYMID value )
ASSERT( map != NULL );
ASSERT( map->data.pairs != NULL );
-
+
m = map->data.pairs;
idx = m->idx;
m->idx += 1;
@@ -226,7 +226,7 @@ syck_map_update( SyckNode *map1, SyckNode *map2 )
m1 = map1->data.pairs;
m2 = map2->data.pairs;
if ( m2->idx < 1 ) return;
-
+
new_idx = m1->idx;
new_idx += m2->idx;
new_capa = m1->capa;
@@ -242,8 +242,8 @@ syck_map_update( SyckNode *map1, SyckNode *map2 )
}
for ( new_idx = 0; new_idx < m2->idx; m1->idx++, new_idx++ )
{
- m1->keys[m1->idx] = m2->keys[new_idx];
- m1->values[m1->idx] = m2->values[new_idx];
+ m1->keys[m1->idx] = m2->keys[new_idx];
+ m1->values[m1->idx] = m2->values[new_idx];
}
}
@@ -324,7 +324,7 @@ syck_seq_add( SyckNode *arr, SYMID value )
ASSERT( arr != NULL );
ASSERT( arr->data.list != NULL );
-
+
s = arr->data.list;
idx = s->idx;
s->idx += 1;
@@ -374,7 +374,7 @@ syck_free_members( SyckNode *n )
switch ( n->kind )
{
case syck_str_kind:
- if ( n->data.str != NULL )
+ if ( n->data.str != NULL )
{
S_FREE( n->data.str->ptr );
n->data.str->ptr = NULL;
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index da741d687c1..af52976ff13 100644
--- a/ext/syck/rubyext.c
+++ b/ext/syck/rubyext.c
@@ -196,7 +196,7 @@ VALUE
syck_get_hash_aref(VALUE hsh, VALUE key)
{
VALUE val = rb_hash_aref( hsh, key );
- if ( NIL_P( val ) )
+ if ( NIL_P( val ) )
{
val = rb_hash_new();
rb_hash_aset(hsh, key, val);
@@ -537,11 +537,11 @@ yaml_org_handler( SyckNode *n, VALUE *ref )
obj = rb_funcall( cDefaultKey, s_new, 0 );
}
else if ( n->data.str->style == scalar_plain &&
- n->data.str->len > 1 &&
+ n->data.str->len > 1 &&
strncmp( n->data.str->ptr, ":", 1 ) == 0 )
{
- obj = rb_funcall( oDefaultResolver, s_transfer, 2,
- rb_str_new2( "tag:ruby.yaml.org,2002:sym" ),
+ obj = rb_funcall( oDefaultResolver, s_transfer, 2,
+ rb_str_new2( "tag:ruby.yaml.org,2002:sym" ),
rb_str_new( n->data.str->ptr + 1, n->data.str->len - 1 ) );
}
else if ( strcmp( type_id, "str" ) == 0 )
@@ -644,7 +644,7 @@ rb_syck_load_handler(SyckParser *p, SyckNode *n)
}
/*
- * Create node,
+ * Create node,
*/
obj = rb_funcall( resolver, s_node_import, 1, Data_Wrap_Struct( cNode, NULL, NULL, n ) );
@@ -680,8 +680,8 @@ rb_syck_err_handler(SyckParser *p, const char *msg)
rb_raise(rb_eArgError, "%s on line %d, col %"PRIdPTRDIFF": `%s'",
msg,
p->linect,
- p->cursor - p->lineptr,
- p->lineptr);
+ p->cursor - p->lineptr,
+ p->lineptr);
}
/*
@@ -715,7 +715,7 @@ syck_set_model(VALUE p, VALUE input, VALUE model)
if ( NIL_P( input ) )
{
- input = rb_ivar_get( p, s_input );
+ input = rb_ivar_get( p, s_input );
}
if ( input == sym_bytecode )
{
@@ -773,7 +773,7 @@ rb_syck_free_parser(SyckParser *p)
* YAML::Syck::Parser.allocate
*/
VALUE syck_parser_s_alloc _((VALUE));
-VALUE
+VALUE
syck_parser_s_alloc(VALUE class)
{
VALUE pobj;
@@ -880,7 +880,7 @@ syck_parser_load_documents(int argc, VALUE *argv, VALUE self)
model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
Data_Get_Struct(self, SyckParser, parser);
syck_set_model( self, input, model );
-
+
bonus = (struct parser_xtra *)parser->bonus;
bonus->taint = syck_parser_assign_io(parser, &port);
bonus->resolver = rb_attr_get( self, s_resolver );
@@ -947,7 +947,7 @@ syck_resolver_use_types_at(VALUE self, VALUE hsh)
}
/*
- * YAML::Syck::Resolver#detect_implicit
+ * YAML::Syck::Resolver#detect_implicit
*/
VALUE
syck_resolver_detect_implicit(VALUE self, VALUE val)
@@ -1075,7 +1075,7 @@ syck_const_find(VALUE const_name)
VALUE
syck_resolver_transfer(VALUE self, VALUE type, VALUE val)
{
- if (NIL_P(type) || RSTRING_LEN(StringValue(type)) == 0)
+ if (NIL_P(type) || RSTRING_LEN(StringValue(type)) == 0)
{
type = rb_funcall( self, s_detect_implicit, 1, val );
}
@@ -1123,7 +1123,7 @@ syck_resolver_transfer(VALUE self, VALUE type, VALUE val)
subclass = rb_funcall( target_class, s_tag_read_class, 1, subclass );
subclass_v = syck_const_find( subclass );
- if ( subclass_v != Qnil )
+ if ( subclass_v != Qnil )
{
subclass = subclass_v;
}
@@ -1177,7 +1177,7 @@ syck_resolver_transfer(VALUE self, VALUE type, VALUE val)
rb_block_call( val, s_each, 0, 0, syck_set_ivars, obj );
}
}
- else
+ else
{
VALUE parts = rb_str_split( type, ":" );
VALUE scheme = rb_ary_shift( parts );
@@ -1219,7 +1219,7 @@ syck_resolver_tagurize(VALUE self, VALUE val)
}
/*
- * YAML::Syck::DefaultResolver#detect_implicit
+ * YAML::Syck::DefaultResolver#detect_implicit
*/
VALUE
syck_defaultresolver_detect_implicit(VALUE self, VALUE val)
@@ -1278,19 +1278,19 @@ syck_genericresolver_node_import(VALUE self, VALUE node)
if ( n->data.str->style == scalar_1quote )
{
style = sym_1quote;
- }
+ }
else if ( n->data.str->style == scalar_2quote )
{
style = sym_2quote;
- }
+ }
else if ( n->data.str->style == scalar_fold )
{
style = sym_fold;
- }
+ }
else if ( n->data.str->style == scalar_literal )
{
style = sym_literal;
- }
+ }
else if ( n->data.str->style == scalar_plain )
{
style = sym_plain;
@@ -1308,7 +1308,7 @@ syck_genericresolver_node_import(VALUE self, VALUE node)
if ( n->data.list->style == seq_inline )
{
style = sym_inline;
- }
+ }
obj = rb_funcall( cSeq, s_new, 3, t, v, style );
rb_iv_set(obj, "@kind", sym_seq);
break;
@@ -1322,7 +1322,7 @@ syck_genericresolver_node_import(VALUE self, VALUE node)
if ( n->data.pairs->style == map_inline )
{
style = sym_inline;
- }
+ }
obj = rb_funcall( cMap, s_new, 3, t, v, style );
rb_iv_set(obj, "@kind", sym_map);
break;
@@ -1347,8 +1347,8 @@ syck_badalias_initialize(VALUE self, VALUE val)
VALUE
syck_badalias_cmp(VALUE alias1, VALUE alias2)
{
- VALUE str1 = rb_ivar_get( alias1, s_name );
- VALUE str2 = rb_ivar_get( alias2, s_name );
+ VALUE str1 = rb_ivar_get( alias1, s_name );
+ VALUE str2 = rb_ivar_get( alias2, s_name );
VALUE val = rb_funcall( str1, s_cmp, 1, str2 );
return val;
}
@@ -1459,23 +1459,23 @@ syck_scalar_style_set(VALUE self, VALUE style)
if ( NIL_P( style ) )
{
node->data.str->style = scalar_none;
- }
+ }
else if ( style == sym_1quote )
{
node->data.str->style = scalar_1quote;
- }
+ }
else if ( style == sym_2quote )
{
node->data.str->style = scalar_2quote;
- }
+ }
else if ( style == sym_fold )
{
node->data.str->style = scalar_fold;
- }
+ }
else if ( style == sym_literal )
{
node->data.str->style = scalar_literal;
- }
+ }
else if ( style == sym_plain )
{
node->data.str->style = scalar_plain;
@@ -1587,7 +1587,7 @@ syck_seq_style_set(VALUE self, VALUE style)
if ( style == sym_inline )
{
node->data.list->style = seq_inline;
- }
+ }
else
{
node->data.list->style = seq_none;
@@ -1709,7 +1709,7 @@ syck_map_style_set(VALUE self, VALUE style)
if ( style == sym_inline )
{
node->data.pairs->style = map_inline;
- }
+ }
else
{
node->data.pairs->style = map_none;
@@ -1865,7 +1865,7 @@ rb_syck_emitter_handler(SyckEmitter *e, st_data_t data)
/*
* Handle output from the emitter
*/
-void
+void
rb_syck_output_handler(SyckEmitter * emitter, char *str, long len)
{
struct emitter_xtra *bonus = (struct emitter_xtra *)emitter->bonus;
@@ -1921,7 +1921,7 @@ rb_syck_free_emitter(SyckEmitter *e)
* YAML::Syck::Emitter.allocate
*/
VALUE syck_emitter_s_alloc _((VALUE));
-VALUE
+VALUE
syck_emitter_s_alloc(VALUE class)
{
VALUE pobj;
@@ -1982,7 +1982,7 @@ syck_emitter_reset(int argc, VALUE *argv, VALUE self)
Check_Type(options, T_HASH);
rb_ivar_set(self, s_options, options);
}
-
+
emitter->headless = 0;
rb_ivar_set(self, s_level, INT2FIX(0));
rb_ivar_set(self, s_resolver, Qnil);
@@ -2018,14 +2018,14 @@ syck_emitter_emit(int argc, VALUE *argv, VALUE self)
/* Second pass, build emitted string */
level -= 1;
rb_ivar_set(self, s_level, INT2FIX(level));
- if ( level == 0 )
+ if ( level == 0 )
{
syck_emit(emitter, (st_data_t)symple);
syck_emitter_flush(emitter, 0);
return bonus->port;
}
-
+
return symple;
}
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index e0fc2bc244a..6ae48a75be4 100644
--- a/ext/syck/syck.c
+++ b/ext/syck/syck.c
@@ -17,7 +17,7 @@ void syck_parser_pop_level( SyckParser * );
/*
* Custom assert
*/
-void
+void
syck_assert( const char *file_name, unsigned line_num, const char *expr )
{
fflush( NULL );
@@ -160,7 +160,7 @@ syck_new_parser(void)
p = S_ALLOC( SyckParser );
S_MEMZERO( p, SyckParser, 1 );
p->lvl_capa = ALLOC_CT;
- p->levels = S_ALLOC_N( SyckLevel, p->lvl_capa );
+ p->levels = S_ALLOC_N( SyckLevel, p->lvl_capa );
p->input_type = syck_yaml_utf8;
p->io_type = syck_io_str;
p->io.str = NULL;
@@ -378,7 +378,7 @@ syck_parser_pop_level( SyckParser *p )
free( p->levels[p->lvl_idx].domain );
}
-void
+void
syck_parser_add_level( SyckParser *p, int len, enum syck_level_status status )
{
ASSERT( p != NULL );
@@ -403,7 +403,7 @@ free_any_io( SyckParser *p )
switch ( p->io_type )
{
case syck_io_str:
- if ( p->io.str != NULL )
+ if ( p->io.str != NULL )
{
S_FREE( p->io.str );
p->io.str = NULL;
@@ -411,7 +411,7 @@ free_any_io( SyckParser *p )
break;
case syck_io_file:
- if ( p->io.file != NULL )
+ if ( p->io.file != NULL )
{
S_FREE( p->io.file );
p->io.file = NULL;
@@ -516,7 +516,7 @@ syck_parse( SyckParser *p )
void
syck_default_error_handler( SyckParser *p, const char *msg )
{
- printf( "Error at [Line %d, Col %"PRIdPTRDIFF"]: %s\n",
+ printf( "Error at [Line %d, Col %"PRIdPTRDIFF"]: %s\n",
p->linect,
p->cursor - p->lineptr,
msg );
diff --git a/ext/syck/syck.h b/ext/syck/syck.h
index 488d27e54ad..2cf81a8b9a5 100644
--- a/ext/syck/syck.h
+++ b/ext/syck/syck.h
@@ -153,7 +153,7 @@ typedef struct _syck_level SyckLevel;
typedef SYMID (*SyckNodeHandler)(SyckParser *, SyckNode *);
typedef void (*SyckErrorHandler)(SyckParser *, const char *);
typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *, char *);
-typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long);
+typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long);
typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);
enum syck_io_type {
@@ -205,7 +205,7 @@ struct _syck_str {
struct _syck_level {
/* Indent */
int spaces;
- /* Counts nodes emitted at this level, useful for parsing
+ /* Counts nodes emitted at this level, useful for parsing
* keys and pairs in bytecode */
int ncount;
/* Does node have anchors or tags? */
@@ -265,8 +265,8 @@ struct _syck_parser {
typedef struct _syck_emitter SyckEmitter;
typedef struct _syck_emitter_node SyckEmitterNode;
-typedef void (*SyckOutputHandler)(SyckEmitter *, char *, long);
-typedef void (*SyckEmitterHandler)(SyckEmitter *, st_data_t);
+typedef void (*SyckOutputHandler)(SyckEmitter *, char *, long);
+typedef void (*SyckEmitterHandler)(SyckEmitter *, st_data_t);
enum doc_stage {
doc_open,
diff --git a/ext/syck/token.c b/ext/syck/token.c
index 1b26e66bdb0..1521c5489de 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -70,7 +70,7 @@
if ( reset == 1 ) YYPOS(0); \
return YAML_IOPEN; \
} \
- }
+ }
/*
* Nice little macro to ensure closure of levels.
@@ -278,7 +278,7 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
int doc_level = 0;
syck_parser_ptr = parser;
- if ( YYCURSOR == NULL )
+ if ( YYCURSOR == NULL )
{
syck_parser_read( parser );
}
@@ -331,7 +331,7 @@ yy2: yyaccept = 0;
yy3:
#line 374 "token.re"
{ YYPOS(0);
- goto Document;
+ goto Document;
}
#line 337 "<stdout>"
yy4: yyaccept = 0;
@@ -344,7 +344,7 @@ yy5: ++YYCURSOR;
goto yy6;
yy6:
#line 356 "token.re"
-{ eat_comments( parser );
+{ eat_comments( parser );
goto Header;
}
#line 351 "<stdout>"
@@ -355,7 +355,7 @@ yy8:
{ SyckLevel *lvl = CURRENT_LEVEL();
ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
- return 0;
+ return 0;
}
#line 361 "<stdout>"
yy9: yyaccept = 1;
@@ -364,7 +364,7 @@ yy9: yyaccept = 1;
yy10:
#line 366 "token.re"
{ GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN );
- goto Header;
+ goto Header;
}
#line 370 "<stdout>"
yy11: yych = *++YYCURSOR;
@@ -432,15 +432,15 @@ yy24:
{ SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
{
- goto Header;
+ goto Header;
}
else
{
ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
- return 0;
+ return 0;
}
- return 0;
+ return 0;
}
#line 446 "<stdout>"
yy25: ++YYCURSOR;
@@ -476,13 +476,13 @@ yy31:
if ( lvl->status == syck_lvl_header )
{
YYPOS(3);
- goto Directive;
+ goto Directive;
}
else
{
ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
- return 0;
+ return 0;
}
}
#line 489 "<stdout>"
@@ -583,7 +583,7 @@ yy39: ++YYCURSOR;
yy40:
#line 497 "token.re"
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
- goto Plain;
+ goto Plain;
}
#line 589 "<stdout>"
yy41: ++YYCURSOR;
@@ -593,7 +593,7 @@ yy42:
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_iseq);
- return YYTOKEN[0];
+ return YYTOKEN[0];
}
#line 599 "<stdout>"
yy43: ++YYCURSOR;
@@ -603,7 +603,7 @@ yy44:
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_imap);
- return YYTOKEN[0];
+ return YYTOKEN[0];
}
#line 609 "<stdout>"
yy45: ++YYCURSOR;
@@ -611,7 +611,7 @@ yy45: ++YYCURSOR;
yy46:
#line 432 "token.re"
{ POP_LEVEL();
- return YYTOKEN[0];
+ return YYTOKEN[0];
}
#line 617 "<stdout>"
yy47: yyaccept = 1;
@@ -800,7 +800,7 @@ yy58: ++YYCURSOR;
goto yy59;
yy59:
#line 486 "token.re"
-{ eat_comments( parser );
+{ eat_comments( parser );
goto Document;
}
#line 807 "<stdout>"
@@ -817,7 +817,7 @@ yy63:
#line 492 "token.re"
{ ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
- return 0;
+ return 0;
}
#line 823 "<stdout>"
yy64: yych = *++YYCURSOR;
@@ -859,11 +859,11 @@ yy70: ++YYCURSOR;
goto yy71;
yy71:
#line 479 "token.re"
-{ if ( is_newline( YYCURSOR - 1 ) )
+{ if ( is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
}
- goto ScalarBlock;
+ goto ScalarBlock;
}
#line 869 "<stdout>"
yy72: ++YYCURSOR;
@@ -1041,14 +1041,14 @@ yy82:
FORCE_NEXT_TOKEN(YAML_IOPEN);
if ( *YYCURSOR == '#' || is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
{
- YYCURSOR--;
+ YYCURSOR--;
ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_seq);
}
else /* spaces followed by content uses the space as indentation */
{
ADD_LEVEL(YYCURSOR - YYLINEPTR, syck_lvl_seq);
}
- return YYTOKEN[0];
+ return YYTOKEN[0];
}
#line 1054 "<stdout>"
yy83: ++YYCURSOR;
@@ -1069,8 +1069,8 @@ yy86: ++YYCURSOR;
yy87:
#line 436 "token.re"
{ if ( *YYTOKEN == ':' && lvl->status != syck_lvl_imap ) lvl->status = syck_lvl_map;
- YYPOS(1);
- return YYTOKEN[0];
+ YYPOS(1);
+ return YYTOKEN[0];
}
#line 1076 "<stdout>"
yy88: ++YYCURSOR;
@@ -1499,7 +1499,7 @@ Plain:
plvl = CURRENT_LEVEL();
GET_TRUE_YAML_INDENT(parentIndent);
-Plain2:
+Plain2:
YYTOKEN = YYCURSOR;
Plain3:
@@ -1564,7 +1564,7 @@ yy113:
}
}
- goto Plain2;
+ goto Plain2;
}
#line 1570 "<stdout>"
yy114: ++YYCURSOR;
@@ -1631,13 +1631,13 @@ yy122: ++YYCURSOR;
}
yy123:
#line 617 "token.re"
-{ if ( qidx == 0 )
+{ if ( qidx == 0 )
{
goto Plain2;
}
else
{
- goto Plain3;
+ goto Plain3;
}
}
#line 1644 "<stdout>"
@@ -1655,7 +1655,7 @@ yy128: ++YYCURSOR;
goto yy129;
yy129:
#line 611 "token.re"
-{ eat_comments( parser );
+{ eat_comments( parser );
RETURN_IMPLICIT();
}
#line 1662 "<stdout>"
@@ -1801,7 +1801,7 @@ yy147:
}
}
- goto SingleQuote2;
+ goto SingleQuote2;
}
#line 1807 "<stdout>"
yy148: ++YYCURSOR;
@@ -1811,8 +1811,8 @@ yy148: ++YYCURSOR;
}
yy149:
#line 712 "token.re"
-{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
- goto SingleQuote2;
+{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
+ goto SingleQuote2;
}
#line 1818 "<stdout>"
yy150: ++YYCURSOR;
@@ -1842,7 +1842,7 @@ yy151:
n->data.str->len = qidx;
n->data.str->style = scalar_1quote;
sycklval->nodeData = n;
- return YAML_PLAIN;
+ return YAML_PLAIN;
}
#line 1848 "<stdout>"
yy152: yych = *++YYCURSOR;
@@ -1854,7 +1854,7 @@ yy154: ++YYCURSOR;
yy155:
#line 685 "token.re"
{ QUOTECAT(qstr, qcapa, qidx, '\'');
- goto SingleQuote2;
+ goto SingleQuote2;
}
#line 1860 "<stdout>"
yy156: yyaccept = 0;
@@ -1960,7 +1960,7 @@ yy163:
}
keep_nl = 1;
- goto DoubleQuote2;
+ goto DoubleQuote2;
}
#line 1966 "<stdout>"
yy164: ++YYCURSOR;
@@ -1970,8 +1970,8 @@ yy164: ++YYCURSOR;
}
yy165:
#line 820 "token.re"
-{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
- goto DoubleQuote2;
+{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
+ goto DoubleQuote2;
}
#line 1977 "<stdout>"
yy166: yyaccept = 1;
@@ -2010,7 +2010,7 @@ yy168:
n->data.str->len = qidx;
n->data.str->style = scalar_2quote;
sycklval->nodeData = n;
- return YAML_PLAIN;
+ return YAML_PLAIN;
}
#line 2016 "<stdout>"
yy169: yych = *++YYCURSOR;
@@ -2038,7 +2038,7 @@ yy175:
#line 792 "token.re"
{ keep_nl = 0;
YYCURSOR--;
- goto DoubleQuote2;
+ goto DoubleQuote2;
}
#line 2044 "<stdout>"
yy176: yych = *++YYCURSOR;
@@ -2076,7 +2076,7 @@ yy179:
#line 778 "token.re"
{ char ch = *( YYCURSOR - 1 );
QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
- goto DoubleQuote2;
+ goto DoubleQuote2;
}
#line 2082 "<stdout>"
yy180: yych = *++YYCURSOR;
@@ -2113,7 +2113,7 @@ yy182:
ch = strtol( chr_text, NULL, 16 );
free( chr_text );
QUOTECAT(qstr, qcapa, qidx, ch);
- goto DoubleQuote2;
+ goto DoubleQuote2;
}
#line 2119 "<stdout>"
yy183: yyaccept = 0;
@@ -2216,7 +2216,7 @@ yy189:
}
}
- return YAML_TRANSFER;
+ return YAML_TRANSFER;
}
#line 2222 "<stdout>"
yy190: yych = *++YYCURSOR;
@@ -2230,7 +2230,7 @@ yy192: ++YYCURSOR;
}
yy193:
#line 905 "token.re"
-{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
+{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
goto TransferMethod2;
}
#line 2237 "<stdout>"
@@ -2505,7 +2505,7 @@ yy214:
#line 1046 "token.re"
{ YYCURSOR--;
POP_LEVEL();
- RETURN_YAML_BLOCK();
+ RETURN_YAML_BLOCK();
}
#line 2511 "<stdout>"
yy215: yyaccept = 1;
@@ -2636,7 +2636,7 @@ yy233: ++YYCURSOR;
}
yy234:
#line 1095 "token.re"
-{ goto Comment;
+{ goto Comment;
}
#line 2642 "<stdout>"
yy235: yych = *++YYCURSOR;
@@ -2699,20 +2699,20 @@ newline_len( char *ptr )
{
if ( *ptr == '\n' )
return 1;
-
+
if ( *ptr == '\r' && *( ptr + 1 ) == '\n' )
return 2;
return 0;
}
-int
+int
syckwrap()
{
return 1;
}
-void
+void
syckerror( const char *msg )
{
if ( syck_parser_ptr->error_handler == NULL )
diff --git a/ext/syck/yaml2byte.c b/ext/syck/yaml2byte.c
index 1b1ce26c494..390deb6c0dc 100644
--- a/ext/syck/yaml2byte.c
+++ b/ext/syck/yaml2byte.c
@@ -7,7 +7,7 @@
*
* WARNING WARNING WARNING --- THIS IS *NOT JUST* PLAYING
* ANYMORE! -- WHY HAS EMBRACED THIS AS THE REAL THING!
- */
+ */
#include "ruby/ruby.h"
#include <syck.h>
#include <assert.h>
@@ -35,7 +35,7 @@ typedef struct {
int printed;
} bytestring_t;
bytestring_t *bytestring_alloc(void) {
- bytestring_t *ret;
+ bytestring_t *ret;
/*TRACE0("bytestring_alloc()");*/
ret = S_ALLOC(bytestring_t);
ret->hash = HASH;
@@ -46,8 +46,8 @@ bytestring_t *bytestring_alloc(void) {
ret->printed = 0;
return ret;
}
-void bytestring_append(bytestring_t *str, char code,
- char *start, char *finish)
+void bytestring_append(bytestring_t *str, char code,
+ char *start, char *finish)
{
long grow;
long length = 2; /* CODE + LF */
@@ -62,14 +62,14 @@ void bytestring_append(bytestring_t *str, char code,
if(length > str->remaining) {
grow = (length - str->remaining) + CHUNKSIZE;
str->remaining += grow;
- str->length += grow;
+ str->length += grow;
str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 );
assert(str->buffer);
}
curr = str->buffer + (str->length - str->remaining);
*curr = code;
curr += 1;
- if(start)
+ if(start)
while(start < finish)
*curr ++ = *start ++;
*curr = '\n';
@@ -99,7 +99,7 @@ void bytestring_extend(bytestring_t *str, bytestring_t *ext)
if(length > str->remaining) {
grow = (length - str->remaining) + CHUNKSIZE;
str->remaining += grow;
- str->length += grow;
+ str->length += grow;
str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 );
}
curr = str->buffer + (str->length - str->remaining);
@@ -176,7 +176,7 @@ syck_yaml2byte_handler(p, n)
{
bytestring_append(val,YAMLBYTE_NULLCHAR,NULL,NULL);
}
- else
+ else
{
assert("oops");
}
diff --git a/ext/syck/yamlbyte.h b/ext/syck/yamlbyte.h
index 0fe4e7b576d..a12a36d79b7 100644
--- a/ext/syck/yamlbyte.h
+++ b/ext/syck/yamlbyte.h
@@ -83,11 +83,11 @@ typedef enum {
YAMLBYTE_E_OTHER = '?', /* some other error condition */
YAMLBYTE_E_PARSE = 'P', /* parse error, check bytecodes */
} yamlbyte_result_t;
-
-typedef const yamlbyte_char_t *yamlbyte_buff_t;
-/*
- * The "Instruction" API
+typedef const yamlbyte_char_t *yamlbyte_buff_t;
+
+/*
+ * The "Instruction" API
*/
typedef struct yaml_instruction {
@@ -96,7 +96,7 @@ typedef struct yaml_instruction {
yamlbyte_buff_t finish; /* open range, *finish is _not_ part */
} *yamlbyte_inst_t;
-/* producer pushes the instruction with one bytecode event to the
+/* producer pushes the instruction with one bytecode event to the
* consumer; if the consumer's result is not YAMLBYTE_OK, then
* the producer should stop */
typedef
@@ -110,14 +110,14 @@ typedef
* case the instruction (and is buffer) are owned by the producer and
* will remain valid till the pull function is called once again;
* if the instruction is NULL, then there are no more results; and
- * it is important to call the pull function till it returns NULL so
+ * it is important to call the pull function till it returns NULL so
* that the producer can clean up its memory allocations */
-typedef
+typedef
yamlbyte_result_t
(*yamlbyte_pull_t)(
yamlbyte_producer_t self,
yamlbyte_inst_t *inst /* to be filled in by the producer */
- );
+ );
/*
* Buffer based API
@@ -139,12 +139,12 @@ typedef
* is set to NULL, then there are no more results; it is important
* to call the pull function till it returns NULL so that the
* producer can clean up its memory allocations */
-typedef
+typedef
yamlbyte_result_t
(*yamlbyte_pullbuff_t)(
yamlbyte_producer_t self,
yamlbyte_buff_t *buff /* to be filled in by the producer */
- );
+ );
/* convert a pull interface to a push interface; the reverse process
* requires threads and thus is language dependent */