fix up some AttrValue stuff
Brought to you by:
johnston
From: <ivt...@li...> - 2003-10-19 20:08:42
|
Patch: ivtools-030708-johnston-079 For: ivtools-1.0.7 Author: joh...@us... Subject: fix up some AttrValue stuff Requires: This is an intermediate patch to ivtools-1.0.7. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - fix up some AttrValue stuff Index: Attribute/attrvalue.c diff -c Attribute/attrvalue.c:1.1 Attribute/attrvalue.c:1.2 *** Attribute/attrvalue.c:1.1 Fri Sep 13 09:47:40 2002 --- src/Attribute/attrvalue.c Tue Jul 8 08:34:02 2003 *************** *** 92,98 **** AttributeValue::AttributeValue(unsigned int v, ValueType type) { clear(); _type = type; ! _v.dfunsval = v; } AttributeValue::AttributeValue(unsigned int kv, unsigned int kn, ValueType type) { --- 92,114 ---- AttributeValue::AttributeValue(unsigned int v, ValueType type) { clear(); _type = type; ! if ( type >= CharType && type <= UShortType ) { ! switch (type) { ! case CharType: ! _v.charval = v; ! break; ! case UCharType: ! _v.ucharval = v; ! break; ! case ShortType: ! _v.shortval = v; ! break; ! case UShortType: ! _v.ushortval = v; ! break; ! } ! } else ! _v.dfunsval = v; } AttributeValue::AttributeValue(unsigned int kv, unsigned int kn, ValueType type) { *************** *** 105,111 **** AttributeValue::AttributeValue(int v, ValueType type) { clear(); _type = type; ! _v.dfintval = v; } AttributeValue::AttributeValue(unsigned long v) { --- 121,143 ---- AttributeValue::AttributeValue(int v, ValueType type) { clear(); _type = type; ! if ( type >= CharType && type <= UShortType ) { ! switch (type) { ! case CharType: ! _v.charval = v; ! break; ! case UCharType: ! _v.ucharval = v; ! break; ! case ShortType: ! _v.shortval = v; ! break; ! case UShortType: ! _v.ushortval = v; ! break; ! } ! } else ! _v.dfintval = v; } AttributeValue::AttributeValue(unsigned long v) { *** /dev/null Tue Jul 8 08:35:42 PDT 2003 --- patches/ivtools-030708-johnston-079 *************** patches/ivtools-030708-johnston-079 *** 0 **** --- 1 ---- + ivtools-030708-johnston-079 |