dvi2bitmap
dvi2bitmap1.0
|
Various utility functions. More...
Functions | |
string_list & | tokenise_string (string str) |
Tokenise string at whitespace. More... | |
char ** | string_list_to_array (string_list &l) |
Convert a string_list to a null-terminated array of character pointers. More... | |
void | delete_string_array (char **sl) |
Deletes the array of strings returned by string_list_to_array. More... | |
bool | parseRGB (Bitmap::BitmapColour &, const char *) |
Parse an RGB specification. More... | |
void | verbosity (const verbosities level) |
Sets the verbosity of the methods in this class. More... | |
Variables | |
verbosities | verbosity_ = normal |
Various utility functions.
void Util::delete_string_array | ( | char ** | sl) |
Deletes the array of strings returned by string_list_to_array.
sl | a null-terminated array of strings |
bool Util::parseRGB | ( | Bitmap::BitmapColour & | rgb, |
const char * | s | ||
) |
Parse an RGB specification.
This is either a sequence of three integers separated by slashes (or in fact any non-number character), or else a string of the form #RRGGBB
. Set the `rgb' structure to the resulting numbers. The integers must be in the range [0,255], and may be specified in decimal, octal, or hex.
rgb | the BitmapColour corresponding to the s argument |
s | the RGB specification |
References Bitmap::BitmapColour_s::blue, Bitmap::BitmapColour_s::green, and Bitmap::BitmapColour_s::red.
Referenced by main().
char ** Util::string_list_to_array | ( | string_list & | l) |
Convert a string_list
to a null-terminated array of character pointers.
The resulting array can conveniently be deleted using delete_string_array.
l | a string_list |
Referenced by PipeStream::PipeStream().
string_list & Util::tokenise_string | ( | string | str) |
Tokenise string at whitespace.
str | the string to be tokenised |
References normal, and verbosity_.
Referenced by main(), and PipeStream::PipeStream().
void Util::verbosity | ( | const verbosities | level) |
Sets the verbosity of the methods in this class.
level | how verbose the class's methods should be |
References verbosity_.
Referenced by main().
verbosities Util::verbosity_ = normal |
Referenced by InputByteStream::bindToFileDescriptor(), Bitmap::Bitmap(), InputByteStream::bufferSeek(), InputByteStream::close(), PkFont::fontgenCommand(), PkFont::magnification(), InputByteStream::openSourceSpec(), Bitmap::paint(), InputByteStream::reloadBuffer(), Bitmap::rule(), Bitmap::scaleDown(), Bitmap::strut(), PkFont::substitute_font_string(), tokenise_string(), verbosity(), and Bitmap::write().