From cf384676e8d6f801154e5bdbc90abfcf03376ff7 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sun, 8 Jan 2006 04:11:15 +0000 Subject: [PATCH] (xuloadrow): Add support for NSC_SHORT. --- src/lib/common/xundump.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index e5160754..b94128a1 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -368,6 +368,19 @@ xuloadrow(int type, int row, struct value values[]) ((long *)row_ref)[k] = (long) values[j].v_field.v_double; break; + case NSC_SHORT: + if (ca[i].ca_flags & NSC_CONST) { + if (((short *)row_ref)[k] != + (short)values[j].v_field.v_double) + gripe("Field %s must be same, " + "read %d != expected %d", + ca[i].ca_name, + ((short *)row_ref)[k], + (short)values[j].v_field.v_double); + } else + ((short *)row_ref)[k] = (short) + values[j].v_field.v_double; + break; case NSC_USHORT: if (ca[i].ca_flags & NSC_CONST) { if (((unsigned short *)row_ref)[k] != @@ -433,6 +446,7 @@ xuloadrow(int type, int row, struct value values[]) break; case NSC_INT: case NSC_LONG: + case NSC_SHORT: case NSC_USHORT: case NSC_UCHAR: case NSC_FLOAT: