Index: class.c ================================================================== --- class.c +++ class.c @@ -2290,10 +2290,11 @@ i-=0x100; if(datac[i].name) ParseError("Duplicate definition\n"); datac[i].name=strdup(tokenstr); if(!datac[i].name) fatal("Allocation failed\n"); datac[i].ptr=ptr; + if(Tokenf(TF_COMMA)) datac[i].sgn=1; ptr=level_table_code(ptr,hash); break; case OP_STRING: if(last) ParseError("Extra columns after fill column\n"); for(i=0;tokenstr[i];i++) if(!(tokenstr[i]&~31)) ParseError("Improper column heading\n"); @@ -2370,14 +2371,12 @@ if(aggrc[i].ag) ParseError("Duplicate definition\n"); nxttok(); if(!Tokenf(TF_NAME)) ParseError("Improper aggregate\n"); switch(tokenv) { case OP_ADD: aggrc[i].ag=1; break; - case OP_MIN: aggrc[i].ag=2; break; - case OP_MAX: aggrc[i].ag=3; break; - case OP_MIN_C: aggrc[i].ag=4; break; - case OP_MAX_C: aggrc[i].ag=5; break; + case OP_MIN_C: aggrc[i].sgn=1; case OP_MIN: aggrc[i].ag=2; break; + case OP_MAX_C: aggrc[i].sgn=1; case OP_MAX: aggrc[i].ag=3; break; default: ParseError("Improper aggregate\n"); } aggrc[i].ptr=ptr; ptr=level_table_code(ptr,hash); break; @@ -2390,10 +2389,11 @@ for(i=0;i ) Define a data column. The SQL name of the data column will be that of the label name, preceded by a underscore, and some characters will be - stripped out. + stripped out; note that SQL is case-insensitive. (Other implementations + or ports of Free Hero Mesh might not implement it as a SQL column, or + at all. For best portability, names should contain only ASCII letters, + digits, and underscores, and should not start with a digit, and you + should not define two or more data columns whose names differ only by + their case. Aggregates are not subject to this restriction, though.) + The label name must have a colon at front; if a comma is also added + then numeric values of this column are treated as signed. (