Thread: colour highlighting of syntax

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    There are three code colourers written by members of this board as far as I'm aware. siavoshkc's "code painter", Code Colorer v2.0 by Martin, and my codeform. (codeform's somewhat old and I'm rewriting it right now.)

    Here's a recent thread where we argue about which is the best: http://cboard.cprogramming.com/showthread.php?t=82592
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #2
    Registered Luser risby's Avatar
    Join Date
    Jun 2006
    Posts
    72
    Quote Originally Posted by dwks
    There are three code colourers written by members of this board
    Yes, thanks. I tried them all:

    CPP code tagger

    Code:
    #include <stdio.h>
    
    int main(void) {
        int ch;
    
        while ((ch = getchar()) != EOF)
            if (ch == '\n')
                printf("\n");
            else
                printf("%0x ", ch ^ 0xaa);
    
        return 0;
    }
    Color Coder V 2.0

    Code:
    #include <stdio.h>
    
    int main(void) {
        int ch;
    
        while ((ch = getchar()) != EOF)
            if (ch == '\n')
                printf("\n");
            else
                printf("%0x ", ch ^ 0xaa);
    
        return 0;
    }
    codeform

    Code:
    #include <stdio.h>
    
    int main(void) {
        int ch;
    
        while ((ch = getchar()) != EOF)
            if (ch == '\n')
                printf("\n");
            else
                printf("%0x ", ch ^ 0xaa);
    
        return 0;
    }
    And I do believe that codeform does have that little something extra; plus, with a little adjustment, I can use it on my Linux systems. Thanks dwks.

    Adjustment:
    - I removed the forward slash from the definition of the default dat file as forward slash is the Windows-specific directory path separator

    Note:
    - Neither Linux nor Windows liked the numbercol definition in codeform_cb_cpp.dat (the equal symbol before darkblue needs a backslash escape character)

    [numbercol]
    \[color=darkblue]=[/color]

    It says
    Quote Originally Posted by codeform
    Syntax error in data file "codeform.dat" on line 112:
    [numbercol]'s data must have 2 parts (it has 3)
    ===
    Don't grumble about what you can't have;
    be grateful you don't get what you deserve.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 07:33 AM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM