Add a new misc.c function needed by Slide's colour setup. [originally from svn r7552]