Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+ case XA_CARDINAL:
+ switch(act_format)
+ {
+ case 8:
+ printf("%u", *((unsigned char*)ptr));
+ break;
+ case 16:
+ printf("%u", *((unsigned short*)ptr));
+ break;
+ case 32:
+ printf("%lu", *((unsigned long*)ptr));
+ break;
+ }
+ break;
case XA_STRING:
if (act_format != 8)
{
case XA_STRING:
if (act_format != 8)
{
for (i = 0; i < nelements; i++)
{
for (i = 0; i < nelements; i++)
{
- if (type == XA_INTEGER) {
+ if (type == XA_INTEGER || type == XA_CARDINAL) {
switch (format)
{
case 8:
switch (format)
{
case 8:
+ case XA_CARDINAL:
+ switch(act_format)
+ {
+ case 8:
+ printf("%u", *((uint8_t*)ptr));
+ break;
+ case 16:
+ printf("%u", *((uint16_t*)ptr));
+ break;
+ case 32:
+ printf("%u", *((uint32_t*)ptr));
+ break;
+ }
+ break;
case XA_STRING:
if (act_format != 8)
{
case XA_STRING:
if (act_format != 8)
{
for (i = 0; i < nelements; i++)
{
for (i = 0; i < nelements; i++)
{
- if (type == XA_INTEGER) {
+ if (type == XA_INTEGER || type == XA_CARDINAL) {
switch (format)
{
case 8:
switch (format)
{
case 8: