[C++] Code cleaner

Results 1 to 7 of 7
  1. #1
    Gamma Daevius is offline
    MemberRank
    Jun 2007 Join Date
    NetherlandsLocation
    3,252Posts

    [C++] Code cleaner

    Hi,

    It's a very small and simple program. But I use it often and perhaps you guys need it too. The program deletes spaces on the end of each line and/or change tabs into spaces. As I said, its a very simple program, primarily for codes.

    The .zip file contains 4 files. 2 executables and it's 2 sources. 1 .exe for removal of spaces on the end of the line only, and 1 .exe for changing tabs into spaces too.

    [New download links, see below for the new things in the update]
    Code Cleaner.zip
    Code Cleaner.cpp

    I compiled it on Windows, I have no clue on how to make it working for Linux, so the tar.gz contains only the sources.

    Usage: You can use command line, where the first parameter/argument should be the filepath of the file you want to 'clean'. But I suggest just dropping a file on the .exe icon.

    What you think?
    Last edited by Daevius; 18-09-07 at 08:05 PM.


  2. #2
    Omega FragFrog is offline
    MemberRank
    Aug 2004 Join Date
    The NetherlandsLocation
    5,630Posts

    Re: [C++] Code cleaner

    I think I'll stick with PSPad which is a free editor that also has that functionality :icon6: Nice try though :icon6:

  3. #3
    Gamma Daevius is offline
    MemberRank
    Jun 2007 Join Date
    NetherlandsLocation
    3,252Posts

    Re: [C++] Code cleaner

    Yeah thanks. Code::Blocks has it too (IDE for C/C++). But Dreamweaver (Coding mode ofcourse! ^^) doesn't, unfortunatly.

    One page of 38 kB had around 200 bytes useless 'code' ^^.

    __________________________________________
    Made a small upgrade, for anyone who's interested:

    It now does the following:
    - Remove tabs and spaces on the end of a line
    - Change four spaces into a tab on the beginning of a line
    - Remove any empty lines on the end of a file (except for one empty line, else compiling can give warnings)

    http://daevius.ajgserv.co.uk/ragezone/Code Cleaner.zip

    The zip contains the executable (.exe) and the source (.cpp).

    Usage:
    Drop a file on the icon or execute it via cmd, the first parameter should contain the path to the file you want to clean.

    _______________________
    Made another small upgrade:

    It can now handle multiple files. You can drop one or more files on the icon (no directories), and it will clean them. If you launch it with cmd: add as many arguments as you want, they should all contain the path to the file.

    Use the same link as above :)

    _________________
    ANOTHER upgrade lol:

    Some small compiler optimizations:

    Code Cleaner.zip
    Code Cleaner.cpp
    Last edited by Daevius; 18-09-07 at 08:04 PM.

  4. #4
    Apprentice Hacker is offline
    MemberRank
    Sep 2007 Join Date
    AustraliaLocation
    24Posts

    Re: [C++] Code cleaner

    Yeah thanks for that. Doesn't really sound like a showcase. More like a release. I will try it.

    _Hacker

  5. #5
    Gamma Daevius is offline
    MemberRank
    Jun 2007 Join Date
    NetherlandsLocation
    3,252Posts

    Re: [C++] Code cleaner

    Quote Originally Posted by Hacker View Post
    Yeah thanks for that. Doesn't really sound like a showcase. More like a release. I will try it.

    _Hacker
    Well, it was my first (usefull?) C++ program, so I wanted to show it so ppl can view the source and give comments on how I could make it better, but that didnt happen lol. Try it out, its very easy :)

  6. #6
    Account Upgraded | Title Enabled! Intelext is offline
    MemberRank
    Mar 2007 Join Date
    EuropeLocation
    1,228Posts

    Re: [C++] Code cleaner

    Hmm interesting..

  7. #7
    Novice Daeser is offline
    MemberRank
    Sep 2007 Join Date
    1Posts

    Re: [C++] Code cleaner

    Useful, thanks for it mate.



Advertisement