SourceFormatX

Overview

Features

Why Use It

Formatting Show

Integration

Screenshots

Documentation

FAQs & Tips

Update History

Award Gallery

Testimonials

License Policy

CodeMorph

CodeToHtml

C Source Code Formatting Show


Feature

SourceFormatX Code Formatter bases on powerful syntax parse engines so it can beautify and format source code files with omnifarious styles, even these unorderly source code examples below:

C/C++ Java C# Delphi (Pascal)
PHP JSP ASP JavaScript
Visual Basic VB.NET VBScript HTML Components
80x86 ASM 8051 ASM CORBA IDL


  C/C++ Source Code Formatting Examples:     Example 1   |   Example 2   |   Example 3   |   Example 4   |   Example 5

This C source code comes from IOCCC too, source code was arranged like three letters: CRC.

  /* Before C/C++ Code Formatting */

  #include <stdio.h>
  #include <stdlib.h>

  int main(int a,char     **A){FILE*B;typedef     unsigned long C;C b
  [8]; if(!(a==7&&(B=     fopen(1[A],"rb"))))     return 1;for(7[b]=0
  ;7[b]<5;7[b]++)b[7[     b]]=strtoul(A[2+7[b     ]],0,16-!7[b]*6);5[
  b]=3[b]                 ; while     ((6[b]=     getc(B)
  )!=(C)-                 1){if(2     [b])for     (7[b]=0
  ;7[b]<4                 ;7[b]++     )if(((6     [b]>>7[
  b])^(6[                 b]>>(7-7[b])))&1)6[     b] ^=(1
  <<7[b])                 ^(1<<(7-7[b]));5[b]     ^= 6[b]
  <<(0[b]                 -8);for(7[b]=0;7[b]     <8;7[b]
  ++)if((                 5[b]>>(0[b]-            1))&1)5
  [b]=(5[                 b]<<1)^ 1[b];           else 5[
  b]<<=1;                 }5[b]&=((((C)1          <<(0[b]
  -1))-1)                 <<1)|1; if(2[b]         )for(7[
  b]=0;7[                 b]<(0[b  ]>>1);7        [b] ++)
  if(((5[b]>>7[b])^(5     [b]>>(0   [b]-1-7       [b])))&1)5[b]^=((C)
  1<<7[b])^((C)1<<(0[     b]-1-7[    b]));5[      b]^=4[b];fclose(B);
  printf("%0*lX\n", (     int)(0[     b]+3)>>     2,5[b]); return 0;}


  /* After C/C++ Code Formatting */

  #include <stdio.h>
  #include <stdlib.h>

  int main(int a, char** A)
  {
    FILE* B;
    typedef unsigned long C;
    C b[8];
    if (!(a == 7 && (B = fopen(1[A], "rb"))))
      return 1;
    for (7[b] = 0; 7[b] < 5; 7[b]++)
      b[7[b]] = strtoul(A[2 + 7[b]], 0, 16 - !7[b]* 6);
    5[b] = 3[b];
    while ((6[b] = getc(B)) != (C) - 1)
    {
      if (2[b])
        for (7[b] = 0; 7[b] < 4; 7[b]++)
          if (((6[b] >> 7[b]) ^ (6[b] >> (7 - 7[b]))) & 1)
            6[b] ^= (1 << 7[b]) ^ (1 << (7 - 7[b]));
      5[b] ^= 6[b] << (0[b] - 8);
      for (7[b] = 0; 7[b] < 8; 7[b]++)
        if ((5[b] >> (0[b] - 1)) & 1)
          5[b] = (5[b] << 1) ^ 1[b];
        else
          5[b] <<= 1;
    }
    5[b] &= ((((C)1 << (0[b] - 1)) - 1) << 1) | 1;
    if (2[b])
      for (7[b] = 0; 7[b] < (0[b] >> 1); 7[b]++)
        if (((5[b] >> 7[b]) ^ (5[b] >> (0[b] - 1 - 7[b]))) & 1)
          5[b] ^= ((C)1 << 7[b]) ^ ((C)1 << (0[b] - 1 - 7[b]));
    5[b] ^= 4[b];
    fclose(B);
    printf("%0*lX\n", (int)(0[b] + 3) >> 2, 5[b]);
    return 0;
  }

Example 1   |   Example 2   |   Example 3   |   Example 4   |   Example 5

  Formatting C source code manually?  Use SourceFormatX C Code Formatter to format all the C source code of your development team.