Common functions. More...


Functions | |
Drawing functions | |
| void | sdtools_generic_rotate (serdisp_t *dd) |
| rotates the display buffer More... | |
| void | sdtools_generic_setsdpixel (serdisp_t *dd, int x, int y, SDCol sdcol) |
| changes a pixel into the display buffer More... | |
| SDCol | sdtools_generic_getsdpixel (serdisp_t *dd, int x, int y) |
| gets a pixel from the display buffer More... | |
| void | sdtools_generic_setsdpixel_greyhoriz (serdisp_t *dd, int x, int y, SDCol sdcol) |
| changes a pixel into the display buffer (horizontally organised w/o pages) More... | |
| SDCol | sdtools_generic_getsdpixel_greyhoriz (serdisp_t *dd, int x, int y) |
| gets a pixel from the display buffer (horizontally organised w/o pages) More... | |
System functions | |
| void | sdtools_nsleep (long ns) |
| sleeps for the specified number of nanoseconds More... | |
| void * | sdtools_malloc (size_t size) |
| zero-byte save malloc More... | |
| byte | sdtools_reversebits (byte b) |
| swaps bits in a byte More... | |
Conversion functions | |
| int | sdtools_contrast_norm2hw (serdisp_t *dd, int normval) |
| convert normalised contrast value to hardware contrast value More... | |
| int | sdtools_contrast_hw2norm (serdisp_t *dd, int hwval) |
| convert hardware contrast value to normalised contrast value More... | |
| int | sdtools_rotate_deg2intern (serdisp_t *dd, int degval) |
| convert rotation radius in degrees to rotation value in internal representation More... | |
| int | sdtools_rotate_intern2deg (serdisp_t *dd, int irepval) |
| convert rotation value in internal representation to radius value in degrees More... | |
| byte | sdtools_dec2bcd (byte num) |
| convert a decimal number to BCD representation More... | |
String processing | |
| char * | sdtools_strncpy (char *dest, const char *src, size_t n) |
| workaround for error-prone strncpy More... | |
| char * | sdtools_strlefttrim (const char *str) |
| trims a string More... | |
| int | sdtools_isinelemlist (const char *elemlist, const char *str, int len) |
| tests of a string is part of a comma-separated list More... | |
| char * | sdtools_nextpattern (const char *str, char delim, int *len, int *border) |
| searches next pattern in a string More... | |
| int | sdtools_ismatching (const char *str1, int len1, const char *str2, int len2) |
| compares two strings if they're matching More... | |
| int | sdtools_strtrimmedlen (const char *str, int len) |
| length of a string without trailing spaces or tabulators More... | |
| int | sdtools_strtol (const char *str, char delim, int base, long *value) |
| reads a long value until delimiter or end of string More... | |
| int | sdtools_strtosd (const char *str, char delim, double *value) |
| reads a simple double value until delimiter or end of string More... | |
Calculation functions | |
| void | sdtools_init_bbox (serdisp_t *dd, int value) |
| initialises or sets the bounding box data More... | |
| int | sdtools_calc_bbox (serdisp_t *dd, int *xt, int *yt, int *xb, int *yb) |
| calculates bounding box containing changed display information More... | |
Math function replacements which do not require math.h nor -lm | |
| double | sdtools_exp (double x) |
| base-e exponential function More... | |
| double | sdtools_log (double x) |
| calculates the natural logarithm of x More... | |
| double | sdtools_logN (double x, double base) |
| calculates the logarithm of x to base y More... | |
| double | sdtools_pow (double x, double y) |
| power function More... | |
Backward compatibility functions | |
| void | sdtools_generic_setpixel (serdisp_t *dd, int x, int y, long colour) |
| long | sdtools_generic_getpixel (serdisp_t *dd, int x, int y) |
| void | sdtools_generic_setpixel_greyhoriz (serdisp_t *dd, int x, int y, long colour) |
| long | sdtools_generic_getpixel_greyhoriz (serdisp_t *dd, int x, int y) |
1.8.11