Arduino syntax highlighting for the web

I noticed there didn't seem to be Arduino-specific syntax highlighting available for web posts, so I wrote a couple of "brush" files for SyntaxHighlighter. You can see them at work and download them from my blog, here.

I wasn't entirely sure where to post this, so I decided the folder with "Syntax" was probably best; I apologise if that's wrong, and moderators please feel free to move it elsewhere.

Under edit, there is “copy as html” and “copy for forum.” The latter produces:

boolean testprime (unsigned short t)
{
int i;
unsigned int p; // prime to test with

for (i=0; i < MAXPRIMES; i++) {
p = primes*;*

  • if (p == 0) {*
  • return TRUE; // indivisible by all primes so far*
  • }*
    _ if ((long)p*(long)p > (long)t) {_
  • return TRUE; // indivisible by primes up to sqrt(t)*
  • }*
  • if ((t % p) == 0) {*
  • return FALSE; // divisible by this factor!*
  • }*
  • } // If this exits, it means we got the end of MAXPRIMES*
  • printstring("Primes exceed testability at pp, tp, i== ");*
  • printprime(t);*
  • printprime(p);*
  • printprime(i);*
  • done = TRUE;*
  • return FALSE;*
    }
    [/quote]

Under edit, there is "copy as html" and "copy for forum."

Wow, I'd never noticed those commands before! What a nice feature!

That said, I still prefer the SyntaxHighlighter output: it has many more features and is completely configurable, so it can be made to look however one wants. Hopefully, someone else will find it useful, too.