Skip to content

Category Archives: Programming

underscore t reserved!

Through a recent stackoverflow question I learned that Posix reserves any identifier ending in “_t”. News to me! I really liked naming my classes starting with a lowercase letter and ending in an “_t”. This permits code like: class list_t { }; … int main(int argc, char *argv[]) { list_t list; } This pretty much [...]

Building Qt with OpenSSL support using the Windows SDK

Install perl (needed for building OpenSSL). Follow OpenSSL instructions to build and install (README.W32 or README.W64, use the masm target). I installed OpenSSL into the same prefix that I’m using for Qt. Copy the Qt mkspeks directory to the Qt prefix directory. Run configure, something like: ./configure -release -no-qt3support -prefix C:\qt\4.5.2 -qt-libjpeg -qt-libpng -openssl -I [...]

Using Pygments with docutils

Pygments has a very short tutorial for integrating itself with docutils here: http://pygments.org/docs/rstdirective/. However, that was not enough info to get me started using Pygments with rst2html.py. Here are the missing steps: Copy the Pygments supplied rst-directive.py to your docutils installation. Something like: cp Pygments/external/rst-directive.py \ …/site-packages/docutils/parsers/rst/directives/rst_directive.py Notice that rst-directive.py became rst_directive.py (dash changed to [...]

Preparing for jEdit plugin development

When I started using jEdit it took me a while to figure out how to begin building and developing jEdit and its plugins. I don’t know of a well documented tutorial, so I’m documenting the way I get started here. I typically develop on Windows, but most steps equally apply on Linux. I strongly recommend [...]

Multithreading and fork()

Prevent hangs in multi-threaded/multi-process code by minimizing code that runs in the child process after a fork.

Embedded manifests in Windows 7

Getting “invalid windows image” when trying to use mt.exe on Windows 7? The likely cause is an issue with embedding a manifest resource before an existing resource section is present. This is documented in section 5.3.6 of the Windows 7 SDK release notes.