I've uploaded codeform again. The only changes are:
- get_string() doubles the allocated memory when it runs out of space, speeding up codeform for very long source code lines.
- clinkfunc, cdescfunc, and cdesclinkfunc rules files have been added. They only work with HTML so far like so:
But you can easily modify them for use with BBCode. Just change the top ten lines where variables are initialized.Code:C:\>codeform -f rules\c_1_css -f rules\cdesclinkfunc codeform.c
I've also created Perl versions of my clipboard programs. The first package is pclip.zip: http://dwks.theprogrammingsite.com/m...down/pclip.zip
It contains pclipset.pl, pclipget.pl, and pclipclr.pl, which set, get, and clear the clipboard. The whole archive is 510 bytes and this is the most complicated of the three:
They work better than my C ones; they never add mysterious characters to the end or chop off the last character.Code:use Win32::Clipboard;
my $CLIP = Win32::Clipboard();
my @data = <STDIN>;
$CLIP->Set(join('', @data));
There's also pclipcf2.zip: http://dwks.theprogrammingsite.com/m...n/pclipcf2.zip
It's really neat. You run it in the background from codeform's install directory. Then whenever you put something into the clipboard that starts with "//cf", it runs codeform on the clipboard (after removing the "//cf") and puts the results in the clipboard. So you just write some code like
(without code tags), copy it into the clipboard, and viola! your clipboard contains this (with code tags):Code://cf
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("Hello, World!\n");
return 0;
}
It's amazing. Sort of annoying if you need to copy text starting with "//cf", but that shouldn't happen too often. It takes virtually no CPU time, except when you modify the clipboard. It must be run from codeform's install directory -- i.e. the same directory as codeform.exe. It only works on Windows. And don't worry, if the clipboard doesn't start with //cf, it leaves it alone. :) Let me know how it works. [edit=2] It doesn't seem to work too well with Windows XP . . . [/edit]Code:#include <stdio.h>
int main(int argc, char *argv[]) {
printf("Hello, World!\n");
return 0;
}
[edit] For non-Perl gurus:
[/edit]Code:C:\whatever\codeform>perl pclipcf.pl
[edit=3] pclipcf update
There's a new version of pclipcf, version 3. It works with Windows XP even. :)
http://dwks.theprogrammingsite.com/m...n/pclipcf3.zip [/edit]