by Fredrik Roubert
During the years, I've written quite a few lines of source code. On this page,
I've tried to collect those tools and library functions that could be of
interest and use to others. Some of it is old and some of it is poorly written,
but everything solves a problem that I once had, and maybe it can help someone
else to solve their problems in the future. I give away the source code on this
webpage freely. Do whatever you like with it, no strings attached, no
guarantees given. But if you find something useful, I'd be happy to hear your
comments about it, and if you make improvements to any of my programs, then I'd
really appreciate if you shared those improvements with me. All C source should
compile and run on any
compliant operating system, unless otherwise stated.
The dc1000 program, that controls Panasonic digital cameras, has its own
A tool to import a MediaWiki XML dump into Google Sites.
A drop-in replacement for
that is able to automatically detect which one of a list of character encodings
the input is using. It works by first reading to end-of-file and then testing
if the input is valid for a certain encoding. The first possible encoding is
A Perl module with functions to read and write comments in GIF files. It also
contains a full GIF file format parser (but no functions to decode or encode
A Perl module with functions to read and write
meta data, like COM (comments), APP12 (information from some Olympus digital
cameras) and Exif (information from digital cameras). It also contains a full
JPEG file format parser (but no functions to decode or encode image data).
An implementation of an
for finding differences between strings. The implementation uses wide
characters (wchar_t) and should compile on all modern C implementations. This
code was initially written to highlight spelling errors, but can have other
uses as well.
- [PATCH] fix magic sysrq on strange keyboards
Some keyboards send the make and break codes immediately after another when the
SysRq key is pressed, and this behaviour makes it impossible to use the Linux
Magic SysRq Key feature. I've written a patch to the Linux kernel to work
around this problem. The patch was posted to the
Linux-Kernel mailing list,
became included in the
kernel release, and was accepted into the mainline kernel on 26 June 2006.
that creates a device named /dev/hellodev that returns the string Hello,
world! when being read from. Nice as an example, but probably not useful
for anything else.
Some old libraries written in the Simula programming language, and some
outdated information about the language itself.
A very simple assembler for the Am2910 microcontroller. An example input file
is available here:
Use iconv to automatically convert file names between different character
encodings. Recurses into directories.
A tool to be used together with the Microsoft Visual C++ compiler and NMake. It
parses the compiler output to find dependencies between source files. It can
also search directories for source files matching a shell pattern. All output
is presented in a format suitable for direct inclusion in makefiles.
Create sparse files (containing only null characters) of arbitrary length. Also
useful for creating files of zero length with specified file permissions.
Recursively download image galleries from
A wrapper around
to conveniently execute
on a remote machine, using documents on the local machine as input.
A quick hack that enables a user to take ownership of any file in a directory
where the user has write permissions.
Send ENQ (0x05) to the terminal, and print the returned string to stdout.
Useful for identifying different terminals from shell scripts.
Truncate a file to specified length.
An alternative implementation of the classic who program. This one
prints all users' full names, and lists which remote hosts they are connected
Prints out all font paths that the X server is currently configured to use.