Skip to content

Commit 3467c89

Browse files
committed
Formatting.
1 parent a7fa224 commit 3467c89

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

ext/libxml/ruby_xml_document.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -221,18 +221,18 @@ rxml_document_canonicalize(int argc, VALUE *argv, VALUE self)
221221
// Do stuff if ruby hash passed as argument
222222
if (!NIL_P(option_hash))
223223
{
224-
VALUE o_comments = Qnil;
225-
VALUE o_mode = Qnil;
226-
VALUE o_i_ns_prefixes = Qnil;
227-
224+
VALUE o_comments = Qnil;
225+
VALUE o_mode = Qnil;
226+
VALUE o_i_ns_prefixes = Qnil;
227+
228228
Check_Type(option_hash, T_HASH);
229229

230230
o_comments = rb_hash_aref(option_hash, ID2SYM(rb_intern("comments")));
231231
comments = (RTEST(o_comments) ? 1 : 0);
232232

233233
o_mode = rb_hash_aref(option_hash, ID2SYM(rb_intern("mode")));
234234
if (!NIL_P(o_mode))
235-
{
235+
{
236236
Check_Type(o_mode, T_FIXNUM);
237237
c14n_mode = NUM2INT(o_mode);
238238
//TODO: clean this up
@@ -242,25 +242,25 @@ rxml_document_canonicalize(int argc, VALUE *argv, VALUE self)
242242

243243
o_i_ns_prefixes = rb_hash_aref(option_hash, ID2SYM(rb_intern("inclusive_ns_prefixes")));
244244
if (!NIL_P(o_i_ns_prefixes))
245-
{
245+
{
246246
int i;
247247
int p = 0; //pointer array index
248248
VALUE *list_in = NULL;
249249
long list_size = 0;
250250

251-
Check_Type(o_i_ns_prefixes, T_ARRAY);
251+
Check_Type(o_i_ns_prefixes, T_ARRAY);
252252
list_in = RARRAY_PTR(o_i_ns_prefixes);
253253
list_size = RARRAY_LEN(o_i_ns_prefixes);
254254

255255
if (list_size > 0)
256-
{
256+
{
257257
for(i=0; i < list_size; ++i) {
258258
if (p >= C14N_NS_LIMIT) { break; }
259259

260260
if (RTEST(list_in[i]))
261-
{
261+
{
262262
if (TYPE(list_in[i]) == T_STRING)
263-
{
263+
{
264264
inc_ns_prefixes_ptr[p] = (xmlChar *)StringValueCStr(list_in[i]);
265265
p++;
266266
}
@@ -279,29 +279,29 @@ rxml_document_canonicalize(int argc, VALUE *argv, VALUE self)
279279

280280
o_nodes = rb_hash_aref(option_hash, ID2SYM(rb_intern("nodes")));
281281
if (!NIL_P(o_nodes))
282-
{
282+
{
283283
int i;
284284
int p = 0; // index of pointer array
285285
VALUE * list_in = NULL;
286286
long node_list_size = 0;
287287

288-
if (CLASS_OF(o_nodes) == cXMLXPathObject)
289-
{
290-
o_nodes = rb_funcall(o_nodes, rb_intern("to_a"), 0);
291-
}
292-
else
293-
{
294-
Check_Type(o_nodes, T_ARRAY);
295-
}
288+
if (CLASS_OF(o_nodes) == cXMLXPathObject)
289+
{
290+
o_nodes = rb_funcall(o_nodes, rb_intern("to_a"), 0);
291+
}
292+
else
293+
{
294+
Check_Type(o_nodes, T_ARRAY);
295+
}
296296
list_in = RARRAY_PTR(o_nodes);
297297
node_list_size = RARRAY_LEN(o_nodes);
298298

299299
for (i=0; i < node_list_size; ++i)
300-
{
300+
{
301301
if (p >= C14N_NODESET_LIMIT) { break; }
302302

303303
if (RTEST(list_in[i]))
304-
{
304+
{
305305
xmlNodePtr node_ptr;
306306
TypedData_Get_Struct(list_in[i], xmlNode, &rxml_node_data_type, node_ptr);
307307
node_ptr_array[p] = node_ptr;
@@ -936,9 +936,9 @@ static VALUE rxml_document_version_get(VALUE self)
936936
static VALUE rxml_document_xhtml_q(VALUE self)
937937
{
938938
xmlDocPtr xdoc;
939-
xmlDtdPtr xdtd;
939+
xmlDtdPtr xdtd;
940940
TypedData_Get_Struct(self, xmlDoc, &rxml_document_data_type, xdoc);
941-
xdtd = xmlGetIntSubset(xdoc);
941+
xdtd = xmlGetIntSubset(xdoc);
942942
if (xdtd != NULL && xmlIsXHTML(xdtd->SystemID, xdtd->ExternalID) > 0)
943943
return (Qtrue);
944944
else

0 commit comments

Comments
 (0)