From 1340705456b3f4a6a8ca025e30df751d202db154 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Wed, 11 Aug 1993 17:17:02 +0000 Subject: [PATCH] handle enums as unsigned short --- src/util/ca_test.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/util/ca_test.c b/src/util/ca_test.c index b57ea9738..f938b96a6 100644 --- a/src/util/ca_test.c +++ b/src/util/ca_test.c @@ -397,7 +397,6 @@ static print_returned(type,pbuffer,count) } break; case (DBR_SHORT): - case (DBR_ENUM): { short *pvalue = (short *)pbuffer; for (i = 0; i < count; i++,pvalue++){ @@ -406,6 +405,15 @@ static print_returned(type,pbuffer,count) } break; } + case (DBR_ENUM): + { + unsigned short *pvalue = (unsigned short *)pbuffer; + for (i = 0; i < count; i++,pvalue++){ + if(count!=1 && (i%10 == 0)) printf("\n"); + printf("%d ",*pvalue); + } + break; + } case (DBR_FLOAT): { float *pvalue = (float *)pbuffer;