7aa9f53e9330ec5b2e716a11b3848a19fa06e53c kent Mon Dec 23 16:58:10 2013 -0800 Adding byte and ubyte to the list of numerical types handled. diff --git src/utils/raToStructGen/raToStructGen.c src/utils/raToStructGen/raToStructGen.c index 2e89faa..f4090c3 100644 --- src/utils/raToStructGen/raToStructGen.c +++ src/utils/raToStructGen/raToStructGen.c @@ -286,30 +286,32 @@ fprintf(f, " {\n"); struct asTypeInfo *lt = col->lowType; enum asTypes type = lt->type; if (col->isList) { /* For all the types we'll handle, isList means an array. */ switch (type) { /* Handle numerical and string types */ case t_float: case t_double: case t_int: case t_uint: case t_short: case t_ushort: + case t_byte: + case t_ubyte: case t_off: case t_string: case t_lstring: if (col->linkedSizeName) { struct asColumn *linkedSize = col->linkedSize; fprintf(f, " int arraySize;\n"); fprintf(f, " sql%sDynamicArray(val, &el->%s, &arraySize);\n", lt->listyName, col->name); fprintf(f, " raToStructArray%sSizer(lf, arraySize, &el->%s, \"%s\");\n", linkedSize->lowType->listyName, linkedSize->name, col->name); } else if (col->fixedSize) fprintf(f, " sql%sArray(val, el->%s, %d);\n", lt->listyName, col->name, col->fixedSize); @@ -321,30 +323,32 @@ break; } } else { /* Case of scalar (not array) variable. */ switch (type) { /* Handle numerical types */ case t_float: case t_double: case t_int: case t_uint: case t_short: case t_ushort: + case t_byte: + case t_ubyte: case t_off: if (col->isSizeLink) { fprintf(f, " %s arraySize = sql%s(val);\n", lt->cName, lt->nummyName); fprintf(f, " raToStructArray%sSizer(lf, arraySize, &el->%s, \"%s\");\n", lt->listyName, col->name, col->name); } else fprintf(f, " el->%s = sql%s(val);\n", col->name, lt->nummyName); break; /* Handle string types */ case t_string: case t_lstring: fprintf(f, " el->%s = cloneString(val);\n", col->name);