summaryrefslogtreecommitdiff
path: root/ext/json
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2011-06-15 00:02:37 +0200
committerFlorian Frank <flori@ping.de>2011-06-15 00:02:37 +0200
commit6f1603ebfef3947578abe47f07cd25e79eeb0625 (patch)
tree0bd40b89cb9a8d2432ff29c33398a1e4ef5a6318 /ext/json
parent04324543a1fc72e42dcd38e4ec6170b30fa85a01 (diff)
downloadjson-6f1603ebfef3947578abe47f07cd25e79eeb0625.tar.gz
clean up superflous tabs
Diffstat (limited to 'ext/json')
-rw-r--r--ext/json/ext/generator/generator.c20
-rw-r--r--ext/json/ext/generator/generator.h6
-rw-r--r--ext/json/ext/parser/parser.c12
-rw-r--r--ext/json/ext/parser/parser.h10
-rw-r--r--ext/json/ext/parser/parser.rl12
5 files changed, 30 insertions, 30 deletions
diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c
index f71eebb..5b65408 100644
--- a/ext/json/ext/generator/generator.c
+++ b/ext/json/ext/generator/generator.c
@@ -62,7 +62,7 @@ static const char trailingBytesForUTF8[256] = {
* in a UTF-8 sequence.
*/
static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
- 0x03C82080UL, 0xFA082080UL, 0x82082080UL };
+ 0x03C82080UL, 0xFA082080UL, 0x82082080UL };
/*
* Utility routine to tell whether a sequence of bytes is legal UTF-8.
@@ -363,23 +363,23 @@ static void fbuffer_append_char(FBuffer *fb, char newchr)
static void freverse(char *start, char *end)
{
- char c;
+ char c;
- while (end > start) {
- c = *end, *end-- = *start, *start++ = c;
+ while (end > start) {
+ c = *end, *end-- = *start, *start++ = c;
}
}
static long fltoa(long number, char *buf)
{
- static char digits[] = "0123456789";
- long sign = number;
- char* tmp = buf;
+ static char digits[] = "0123456789";
+ long sign = number;
+ char* tmp = buf;
- if (sign < 0) number = -number;
+ if (sign < 0) number = -number;
do *tmp++ = digits[number % 10]; while (number /= 10);
- if (sign < 0) *tmp++ = '-';
- freverse(buf, tmp - 1);
+ if (sign < 0) *tmp++ = '-';
+ freverse(buf, tmp - 1);
return tmp - buf;
}
diff --git a/ext/json/ext/generator/generator.h b/ext/json/ext/generator/generator.h
index e47f507..ca976cd 100644
--- a/ext/json/ext/generator/generator.h
+++ b/ext/json/ext/generator/generator.h
@@ -79,9 +79,9 @@ static VALUE fbuffer_to_s(FBuffer *fb);
#define UNI_STRICT_CONVERSION 1
-typedef unsigned long UTF32; /* at least 32 bits */
-typedef unsigned short UTF16; /* at least 16 bits */
-typedef unsigned char UTF8; /* typically 8 bits */
+typedef unsigned long UTF32; /* at least 32 bits */
+typedef unsigned short UTF16; /* at least 16 bits */
+typedef unsigned char UTF8; /* typically 8 bits */
#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
#define UNI_MAX_BMP (UTF32)0x0000FFFF
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c
index e834dd6..721507f 100644
--- a/ext/json/ext/parser/parser.c
+++ b/ext/json/ext/parser/parser.c
@@ -1102,10 +1102,10 @@ tr2:
p--; {p++; cs = 3; goto _out;}
} else {
if (NIL_P(json->array_class)) {
- rb_ary_push(*result, v);
- } else {
- rb_funcall(*result, i_leftshift, 1, v);
- }
+ rb_ary_push(*result, v);
+ } else {
+ rb_funcall(*result, i_leftshift, 1, v);
+ }
{p = (( np))-1;}
}
}
@@ -1960,8 +1960,8 @@ void Init_parser()
i_match_string = rb_intern("match_string");
i_key_p = rb_intern("key?");
i_deep_const_get = rb_intern("deep_const_get");
- i_aset = rb_intern("[]=");
- i_leftshift = rb_intern("<<");
+ i_aset = rb_intern("[]=");
+ i_leftshift = rb_intern("<<");
#ifdef HAVE_RUBY_ENCODING_H
CEncoding_UTF_8 = rb_funcall(rb_path2class("Encoding"), rb_intern("find"), 1, rb_str_new2("utf-8"));
CEncoding_UTF_16BE = rb_funcall(rb_path2class("Encoding"), rb_intern("find"), 1, rb_str_new2("utf-16be"));
diff --git a/ext/json/ext/parser/parser.h b/ext/json/ext/parser/parser.h
index ed48035..66a4f18 100644
--- a/ext/json/ext/parser/parser.h
+++ b/ext/json/ext/parser/parser.h
@@ -23,9 +23,9 @@
/* unicode */
-typedef unsigned long UTF32; /* at least 32 bits */
-typedef unsigned short UTF16; /* at least 16 bits */
-typedef unsigned char UTF8; /* typically 8 bits */
+typedef unsigned long UTF32; /* at least 32 bits */
+typedef unsigned short UTF16; /* at least 16 bits */
+typedef unsigned char UTF8; /* typically 8 bits */
#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
#define UNI_SUR_HIGH_START (UTF32)0xD800
@@ -46,8 +46,8 @@ typedef struct JSON_ParserStruct {
int symbolize_names;
VALUE object_class;
VALUE array_class;
- int create_additions;
- VALUE match_string;
+ int create_additions;
+ VALUE match_string;
} JSON_Parser;
#define GET_PARSER \
diff --git a/ext/json/ext/parser/parser.rl b/ext/json/ext/parser/parser.rl
index 66c8363..ffc80c4 100644
--- a/ext/json/ext/parser/parser.rl
+++ b/ext/json/ext/parser/parser.rl
@@ -347,10 +347,10 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul
fhold; fbreak;
} else {
if (NIL_P(json->array_class)) {
- rb_ary_push(*result, v);
- } else {
- rb_funcall(*result, i_leftshift, 1, v);
- }
+ rb_ary_push(*result, v);
+ } else {
+ rb_funcall(*result, i_leftshift, 1, v);
+ }
fexec np;
}
}
@@ -817,8 +817,8 @@ void Init_parser()
i_match_string = rb_intern("match_string");
i_key_p = rb_intern("key?");
i_deep_const_get = rb_intern("deep_const_get");
- i_aset = rb_intern("[]=");
- i_leftshift = rb_intern("<<");
+ i_aset = rb_intern("[]=");
+ i_leftshift = rb_intern("<<");
#ifdef HAVE_RUBY_ENCODING_H
CEncoding_UTF_8 = rb_funcall(rb_path2class("Encoding"), rb_intern("find"), 1, rb_str_new2("utf-8"));
CEncoding_UTF_16BE = rb_funcall(rb_path2class("Encoding"), rb_intern("find"), 1, rb_str_new2("utf-16be"));