[Igarden-commit] Garden/source/SourceMaterialDB Length.cpp, 1.9, 1.9.2.1
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2007-01-09 02:46:00
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv24990 Modified Files: Tag: Release_branch_v1 Length.cpp Log Message: Fix sharing of units between items of a range (ex: 2-3') Index: Length.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/Length.cpp,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** Length.cpp 6 Apr 2006 00:41:47 -0000 1.9 --- Length.cpp 9 Jan 2007 02:45:58 -0000 1.9.2.1 *************** *** 480,485 **** if(*end == '\'') { ! result[n] *= 12.0*25.4; ! multiplier[n] = 1.0; end++; if(*end == '-') --- 480,484 ---- if(*end == '\'') { ! multiplier[n] = 12.0*25.4; end++; if(*end == '-') *************** *** 489,494 **** x = strtod(end, &ptr2); if(*ptr2 == '"') ! result[n] += x*25.4; ! multiplier[n] = 1.0; end = ptr2; } --- 488,492 ---- x = strtod(end, &ptr2); if(*ptr2 == '"') ! result[n] += x/12.0; end = ptr2; } *************** *** 506,509 **** --- 504,509 ---- if(strncmp(end, "cm", 2) == 0) { + if(ftAbrev) + success = false; multiplier[n] = 10.0; end += 2; *************** *** 511,514 **** --- 511,516 ---- else if(strncmp(end, "mm", 2) == 0) { + if(ftAbrev) + success = false; multiplier[n] = 1.0; end += 2; *************** *** 516,519 **** --- 518,523 ---- else if(strncmp(end, "m", 1) == 0) { + if(ftAbrev) + success = false; multiplier[n] = 1000.0; end += 1; *************** *** 536,539 **** --- 540,545 ---- else if(strncmp(end, "ft", 1) == 0) { + if(ftAbrev) + success = false; multiplier[n] = 12.0*25.4; end += 2; *************** *** 541,544 **** --- 547,552 ---- else if(strncmp(end, "feet", 1) == 0 || strncmp(end, "foot", 1) == 0) { + if(ftAbrev) + success = false; multiplier[n] = 12.0*25.4; end += 4; |