big number support
This commit is contained in:
@@ -13,6 +13,7 @@ v.0.5dev (ongoing development)
|
|||||||
* fix cellwidth in iMon driver
|
* fix cellwidth in iMon driver
|
||||||
+ graphics character support in iMon driver (John Saunders)
|
+ graphics character support in iMon driver (John Saunders)
|
||||||
* try harder to find a shell in lcdexec
|
* try harder to find a shell in lcdexec
|
||||||
|
+ big number support in CwLnx driver
|
||||||
|
|
||||||
v.0.5.1
|
v.0.5.1
|
||||||
+ config file support in lcdproc client (Andrew Foss)
|
+ config file support in lcdproc client (Andrew Foss)
|
||||||
|
|||||||
+20
-5
@@ -63,7 +63,7 @@
|
|||||||
#include "report.h"
|
#include "report.h"
|
||||||
#include "lcd_lib.h"
|
#include "lcd_lib.h"
|
||||||
|
|
||||||
/* for the icon definitions */
|
/* for the icon definitions & the big numbers */
|
||||||
#include "adv_bignum.h"
|
#include "adv_bignum.h"
|
||||||
|
|
||||||
#define ValidX(x) if ((x) > p->width) { (x) = p->width; } else (x) = (x) < 1 ? 1 : (x);
|
#define ValidX(x) if ((x) > p->width) { (x) = p->width; } else (x) = (x) < 1 ? 1 : (x);
|
||||||
@@ -1017,15 +1017,30 @@ CwLnx_hbar(Driver *drvthis, int x, int y, int len, int promille, int options)
|
|||||||
* \param x Horizontal character position (column).
|
* \param x Horizontal character position (column).
|
||||||
* \param num Character to write (0 - 10 with 10 representing ':')
|
* \param num Character to write (0 - 10 with 10 representing ':')
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
MODULE_EXPORT void
|
MODULE_EXPORT void
|
||||||
CwLnx_num(Driver *drvthis, int x, int num)
|
CwLnx_num(Driver *drvthis, int x, int num)
|
||||||
{
|
{
|
||||||
// needs work in bignum library: accept offset for the custom characters
|
int do_init = 0;
|
||||||
// similar to lib_{h,v}bar_static().
|
|
||||||
|
if ((num < 0) || (num > 10))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (p->ccmode != bignum) {
|
||||||
|
if (p->ccmode != standard) {
|
||||||
|
/* Not supported (yet) */
|
||||||
|
report(RPT_WARNING, "%s: num: cannot combine two modes using user-defined characters",
|
||||||
|
drvthis->name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
p->ccmode = bignum;
|
||||||
|
|
||||||
|
do_init = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lib_adv_bignum does everything needed to show the bignumbers.
|
||||||
|
lib_adv_bignum(drvthis, x, num, 1, do_init);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user