|
C++ Source Code Beautifying Show |
|
| |
|
|
SourceFormatX code beautifier bases on professional syntax parse engines so it can beautify C and C++ source code files with omnifarious styles, even these unorderly and messy source code examples below:
|
C/C++ Source Code Beautifying Examples:
Example 1
|
Example 2
|
Example 3
|
Example 4
|
Example 5
This C source code comes from IOCCC too, source code was arranged like a big semicolon.
static signed char a[] = {0x69,
110, 118, 97, 108, 105, 0x64, 1-1,
0x6d, 111, 118, 101, 1<<1<<1<<1<<1<<1,
114, 105, 0x6e, 103, 32, 'o'/3, 100,
32, 102, 114, 111, 0x6d, 32, 115, 116,
97, 100-001, 107, 32,37, 2*'2', '@'>>1,
116, '%' + '%' + '%','w'-'W',115, 0x74,
97, 3*'!', 107, 'q' - 'Q', 37, 10*'\n',
10, 0}, * b = a + (1<<1<<1<<1), * w, x,
*q, c, r; int main(int d, char *e []) {
return q = (signed char *)(e+1+1), (r =
e[0] && e[1] ? 0 : 0 * puts (a) + 1) ||
(r = e[1<<1] && d != 1 <<1 && 0 * puts(
a) + 1) || e[1- -1] || (r = atoi(e[1])
< -0200 || atoi (e [1]) > 0x7f || ( x =
atoi( e[1] ) ) == 0 ? 0 * puts(a) + 1 :
0) || e [1- -1] || (x- -x > 1-1 ? (q[0]
= x, q[1] = q[3] = 1, q[2] = 2) : (
memset ( w = ( signed char * )
malloc(-x), '1', -x), puts (w),
q[0] = x, q[1] = '0', q[2] = q[3] =
0)), r || (q[3] ? (c = 6 - q[1] - q[2],
(q[0] != 1) ? q[0]-- , d = q[2], q[2] =
c, main(2, e), c = q[2], q[2] = d, q[0]
++ : 0, printf(b, q[0], q[1], q[2]), (q
[0] != 1) ? q[0]--, d = q[1],q[1] = c ,
main(2, e), c = q[1], q[1] = d, q[0] ++
: 0) : - 1 - q[0] - 1 == 0 ? (w[- x - 1
- (q[1] & 1 ^ 1)] = q[1], puts (w), w [
- x - 1 - (q[1] & 1)] = q[1], puts(w) )
: - 1 - q[0] == 0 ? (w[- x - 1] = q[ 1
], puts(w)) : (q[0] += 1 + ( q[1] & 1
^ 1), main(2, e), q[0] -= 1 + ( q
[1] & 1 ^ 1), q[1] & 1 ? (q
[0]+=1+1, q[1]^=1, main
(2, e), q[1]^=1, q[0]-=1
+1) : 0, w[q[0] - x] = q
[1], puts(w), q[1] & 1 ?
0 : (q[0]+=1+1, q[1]^=1,
main (2, e), q[1]^=1, q
[0]-=1+1), q[0] += 1 +
(q[1] & 1),main(2,e)
, q[0] -= 1 + (q[1]
& 1) ) ), r; }
static signed char a[] =
{
0x69, 110, 118, 97, 108, 105, 0x64, 1-1, 0x6d, 111, 118, 101, 1 << 1 << 1 <<
1 << 1 << 1, 114, 105, 0x6e, 103, 32, 'o' / 3, 100, 32, 102, 114, 111, 0x6d,
32, 115, 116, 97, 100-001, 107, 32, 37, 2 *'2', '@' >> 1, 116, '%' + '%' +
'%', 'w' - 'W', 115, 0x74, 97, 3 *'!', 107, 'q' - 'Q', 37, 10 *'\n', 10, 0
}, *b = a + (1 << 1 << 1 << 1), *w, x, *q, c, r;
int main(int d, char *e[])
{
return q = (signed char*)(e + 1 + 1), (r = e[0] && e[1] ? 0 : 0 *puts(a) + 1)
|| (r = e[1 << 1] && d != 1 << 1 && 0 *puts(a) + 1) || e[1- -1] || (r = atoi
(e[1]) < - 0200 || atoi(e[1]) > 0x7f || (x = atoi(e[1])) == 0 ? 0 *puts(a)
+ 1 : 0) || e[1- -1] || (x - - x > 1-1 ? (q[0] = x, q[1] = q[3] = 1, q[2]
= 2) : (memset(w = (signed char*)malloc( -x), '1', -x), puts(w), q[0] = x,
q[1] = '0', q[2] = q[3] = 0)), r || (q[3] ? (c = 6-q[1] - q[2], (q[0] != 1)
? q[0]--, d = q[2], q[2] = c, main(2, e), c = q[2], q[2] = d, q[0]++ : 0,
printf(b, q[0], q[1], q[2]), (q[0] != 1) ? q[0]--, d = q[1], q[1] = c, main
(2, e), c = q[1], q[1] = d, q[0]++ : 0) : -1 - q[0] - 1 == 0 ? (w[-x - 1 -
(q[1] &1 ^ 1)] = q[1], puts(w), w[-x - 1-(q[1] &1)] = q[1], puts(w)) : -1 -
q[0] == 0 ? (w[ - x - 1] = q[1], puts(w)): (q[0] += 1+(q[1] &1 ^ 1), main
(2, e), q[0] -= 1+(q[1] &1 ^ 1), q[1] &1 ? (q[0] += 1+1, q[1] ^= 1, main(2,
e), q[1] ^= 1, q[0] -= 1+1): 0, w[q[0] - x] = q[1], puts(w), q[1] &1 ? 0 :
(q[0] += 1+1, q[1] ^= 1, main(2, e), q[1] ^= 1, q[0] -= 1+1), q[0] += 1+
(q[1] &1), main(2, e), q[0] -= 1+(q[1] &1))), r;
}
Example 1
|
Example 2
|
Example 3
|
Example 4
|
Example 5
Don't waste time on beautifying C/C++ source code manually any more! Try C++ Code Beautifier Free Trial Now!
|