My Account Log In Walkthrough IDE Integrations Contact  
Polystyle
Point And Click Source Code
Formatter & Obfuscator

Click Here To Download A Free Trial!
Home Features Documentation Buy Formatter Buy Obfuscator Download  

 



  • PHP Obfuscator

  • C# Obfuscator

  • Perl Obfuscator

  • Java Obfuscator

  • Javascript Obfuscator

  • JSP Obfuscator

  • Actionscript Obfuscator

  • C/C++ Formatter

  • Perl Formatter

  • Pascal/Delphi Formatter

  • C# Formatter

  • CSS Formatter

  • CMAC Formatter

  • Java Formatter

  • Javascript Formatter

  • PHP Formatter

  • JSP Formatter

  • HTML/XML Formatter

  • Python Formatter

  • ASP Formatter

  • Visual Basic Formatter

  • Actionscript Formatter

  • Step 2: Example CMAC Source

  • Overall CMAC Features
  • Step 1: Unformatted Source
  • Step 2: Example Source
  • Step 3: Formatted Source

    Here's one of the CMAC example files that come with Polystyle, this is the Whitesmith style.

    Polystyle comes with style files for: Allman/BSD, Ellemtel, GNU, Kernighan & Ritchie, One True Brace Style, Unix Kernel, Linux Kernel, Stroustrup, Sun Microsystems, and Whitesmith.

    Each example file come in various indent styles, such as 2-space, 1-tab, 4-space, and others.

    Your style is easily configured using the Configuration Tool.

    To define your style, you simply edit an example file however you like.


    /**
     * This is a recommended CMAC Multi-Edit Macro example.
     * Reformat this file as you like to define your personal style.
     *
     * Notes:
     * 1.) Do not remove code from this file or change the order in which it
     *     appears, only change the whitespace to reflect your style.
     *
     * 2.) Polystyle only modifies whitespace and will never alter the actual content
     *     of your files, such as adding {}'s in 'if' statements.
     *
     * 3.) Polystyle does not format comments based on examples. It will always
     *     format comments the same way.
     *
     * Copyright 2001-2003 Flashbulb Studios.
     *
     * http://Polystyle.com
     */
    
    macro_file myFile;
    
    import Bool method() kernel32 'myName';
    
    prototype TMACROS
      {
      void Upper(str &s);
      
      str gtest "Also_GTest";
    
      void message(...);
      }
    
    struct MyStruct
      {
      int j[1] = i >> 1;
    
      int i = 'j' || "k";
      
      int a, b, c;
      
      struct a b;
      }
      
    void myMethod(int *a, *int b = 0, int [] c) trans2
      {
      // if statements with empty braces
      if (x)
        {
        }
      else if (x)
        {
        }
      else
        {
        }
    
      // if statements with exactly one braced statement
      if (x)
        {
        a();
        }
      else if (x)
        {
        b();
        }
      else
        {
        c();
        }
    
      // special 'if' cases
      if (x)
        {
        a();
        }
      else
        {
        c();
        }
    
      if (x)
        {
        a();
    
        a();
        }
      else
        {
        c();
    
        c();
        }
    
      // if statements with a single implicit substatement
      if (x)
        a();
    
      else if (x)
        b();
    
      else
        c();
    
      // if statements with multiple statements
      if (!z)
        {
        j = ++i & (i());
    
        z = j[0][0][0];
        }
      else if (a and x)
        {
        a();
    
        ret method(a, b, 'c');
        }
      else
        {
        a();
    
        a();
        }
    
      // while statements with a single implicit substatement
      while (x)
        a();
    
      // while statements with a single implicit 'if' substatement
      while (x)
        if (x)
          a();
    
      // while with multiple statements
      while (k == j)
        {
        label:
    
        h[0] = a.b.c ? b : (c).d;
    
        break;
        }
    
      // for statements with a single braced statement
      for (int i; i > 6; i++)
        {
        break label;
        }
    
      // do statements with a single braced substatement
      do
        {
        continue label;
        } while (false);
    
      /* Switch blocks:
       *
       * You can have case substatements be aligned by giving an example like:
       *
       * case 1: a();
       * 
       *         b();
       * 
       *         c();
       * 
       *         etc...
       */
      switch(c)
        {
        case 1:
        case 2:
        case 3:
          a();
    
          b();
    
          c();
    
        case 4:
          break; // case with exactly one substatement
    
        default:
          break;
        }
      }
    
    void emptyMethod()
      {
      }
    
    void method()
      {
      // try-catch-finally with empty bodies
      try
        {
        }
      catch (Throwable e)
        {
        }
      finally
        {
        }
    
      // try-catch-finally with exactly one statement
      try
        {
        a();
        }
      catch (Throwable t)
        {
        a();
        }
      finally
        {
        a();
        }
    
      // try-catch-finally with multiple statements 
      try
        {
        for (;;) { } // for statement with empty control statements
    
        a();
        }
      catch(Throwable e)
        {
        do { } while (x);
    
        throw e;
        }
      finally
        {
        int i = i * 3, j, k;
    
        ret i + "0";
        }
      }
    
    #ifdef a
    
      #define x (a == a && !b)
    
    #else
    
      #undef x
    
      #undef x
    
      #undef x
    
    #endif
    

    Next, in Step 3 we get the final result!

  • Home Features Documentation Buy Polystyle Buy Obfuscator Download  

    Click Here To Download A Free Trial!

    Copyright © Flashbulb Studios. All rights reserved.