diff options
| author | dearblue <[email protected]> | 2021-05-05 19:01:57 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-05-05 22:16:03 +0900 |
| commit | 6fc5dc986a5ffc1a74c63ad0617ea1dcc10d3cdd (patch) | |
| tree | 86da312642d6093ebd28452e13c295a842ed118a /mrbgems/mruby-pack | |
| parent | 35a6dfe905ec3cca51dabbcc8d17032c9f3a305c (diff) | |
| download | mruby-6fc5dc986a5ffc1a74c63ad0617ea1dcc10d3cdd.tar.gz mruby-6fc5dc986a5ffc1a74c63ad0617ea1dcc10d3cdd.zip | |
Extend the tab with 8 whitespace
This work was done as follows:
- check: `git grep $'\011' -- :^oss-fuzz`
- convert: `ruby -pi -e 'nil while $_.sub!(/^(.*?)\t/) { $1 + " " * (8 - $1.size % 8) }'`
The `doc/guide/{compile,mrbgems}.md` file adds and removes whitespace to make the directory tree look the same.
In `mrbgems/mruby-socket/src/socket.c`, there is a part where the indent is changed from 4 to 2 at the same time as the tab is changed.
Diffstat (limited to 'mrbgems/mruby-pack')
| -rw-r--r-- | mrbgems/mruby-pack/src/pack.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/mrbgems/mruby-pack/src/pack.c b/mrbgems/mruby-pack/src/pack.c index e52171d6b..9b462b1b8 100644 --- a/mrbgems/mruby-pack/src/pack.c +++ b/mrbgems/mruby-pack/src/pack.c @@ -48,19 +48,19 @@ enum { PACK_TYPE_NONE }; -#define PACK_FLAG_s 0x00000001 /* native size ("_" "!") */ -#define PACK_FLAG_a 0x00000002 /* null padding ("a") */ -#define PACK_FLAG_Z 0x00000004 /* append nul char ("z") */ -#define PACK_FLAG_SIGNED 0x00000008 /* native size ("_" "!") */ -#define PACK_FLAG_GT 0x00000010 /* big endian (">") */ -#define PACK_FLAG_LT 0x00000020 /* little endian ("<") */ -#define PACK_FLAG_WIDTH 0x00000040 /* "count" is "width" */ -#define PACK_FLAG_LSB 0x00000080 /* LSB / low nibble first */ -#define PACK_FLAG_COUNT2 0x00000100 /* "count" is special... */ -#define PACK_FLAG_LITTLEENDIAN 0x00000200 /* little endian actually */ - -#define PACK_BASE64_IGNORE 0xff -#define PACK_BASE64_PADDING 0xfe +#define PACK_FLAG_s 0x00000001 /* native size ("_" "!") */ +#define PACK_FLAG_a 0x00000002 /* null padding ("a") */ +#define PACK_FLAG_Z 0x00000004 /* append nul char ("z") */ +#define PACK_FLAG_SIGNED 0x00000008 /* native size ("_" "!") */ +#define PACK_FLAG_GT 0x00000010 /* big endian (">") */ +#define PACK_FLAG_LT 0x00000020 /* little endian ("<") */ +#define PACK_FLAG_WIDTH 0x00000040 /* "count" is "width" */ +#define PACK_FLAG_LSB 0x00000080 /* LSB / low nibble first */ +#define PACK_FLAG_COUNT2 0x00000100 /* "count" is special... */ +#define PACK_FLAG_LITTLEENDIAN 0x00000200 /* little endian actually */ + +#define PACK_BASE64_IGNORE 0xff +#define PACK_BASE64_PADDING 0xfe const static unsigned char base64chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -874,13 +874,13 @@ unpack_m(mrb_state *mrb, const void *src, int slen, mrb_value ary, unsigned int if (slen-- == 0) goto done; c = *sptr++; - if (c >= sizeof(base64_dec_tab)) - continue; - ch[i] = base64_dec_tab[c]; - if (ch[i] == PACK_BASE64_PADDING) { - ch[i] = 0; - padding++; - } + if (c >= sizeof(base64_dec_tab)) + continue; + ch[i] = base64_dec_tab[c]; + if (ch[i] == PACK_BASE64_PADDING) { + ch[i] = 0; + padding++; + } } while (c >= sizeof(base64_dec_tab) || ch[i] == PACK_BASE64_IGNORE); } |
