Changeset 1315 for cpp/frams/param/param.cpp
- Timestamp:
- 07/11/24 17:26:06 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/param.cpp
r1302 r1315 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 2Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2024 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 21 21 #define SAVE_SELECTED_NAMES 22 22 #define WARN_MISSING_NAME 23 24 char MakeCodeGuardHappy;25 23 26 24 ParamEntry empty_paramtab[] = … … 559 557 const char* fname = f->VgetPath(); 560 558 if (fname != NULL) 561 559 { 562 560 fileinfo = SString::sprintf(" while reading from '%s'", fname); 563 561 if (options.linenum) 564 562 fileinfo += SString::sprintf(" (line %d)", *options.linenum); 565 563 } 566 564 return fileinfo; 567 565 } … … 613 611 if (seen[i]) 614 612 { 615 SString fileinfo = getFileMessageFor(f, options);613 SString fileinfo = getFileMessageFor(f, options); 616 614 logPrintf("ParamInterface", "load", LOG_WARN, "Multiple '%s.%s' properties found%s", getName(), id(i), fileinfo.c_str()); 617 615 } … … 622 620 if (p0[p_len + 1] == '~') 623 621 { 624 if (p0[p_len +2])622 if (p0[p_len + 2]) 625 623 { 626 SString fileinfo = getFileMessageFor(f, options);627 logPrintf("ParamInterface", "load", LOG_WARN, "Ignored unexpected characters after '~': '%s' in '%s:'%s", p0 +p_len+1, id(i), fileinfo.c_str());624 SString fileinfo = getFileMessageFor(f, options); 625 logPrintf("ParamInterface", "load", LOG_WARN, "Ignored unexpected characters after '~': '%s' in '%s:'%s", p0 + p_len + 1, id(i), fileinfo.c_str()); 628 626 } 629 627 630 628 SString s; 631 629 if (!readUntilTilde(f, s)) … … 939 937 { 940 938 case 'd': t += "integer"; 941 { paInt a, b, c; int n = getMinMaxIntFromTypeDef(type, a, b, c); if ((n >= 2) && (b >= a)) t += SString::sprintf(" %d..%d", a, b); if (n >= 3) t += SString::sprintf(" (default %d)", c); }939 { paInt a, b, c; int n = getMinMaxIntFromTypeDef(type, a, b, c); if ((n >= 2) && (b >= a)) t += SString::sprintf(" %d..%d", a, b); if (n >= 3) t += SString::sprintf(" (default %d)", c); } 942 940 break; 943 941 case 'f': t += "float"; 944 { double a, b, c; int n = getMinMaxDoubleFromTypeDef(type, a, b, c); if ((n >= 2) && (b >= a)) t += SString::sprintf(" %g..%g", a, b); if (n >= 3) t += SString::sprintf(" (default %g)", c); }942 { double a, b, c; int n = getMinMaxDoubleFromTypeDef(type, a, b, c); if ((n >= 2) && (b >= a)) t += SString::sprintf(" %g..%g", a, b); if (n >= 3) t += SString::sprintf(" (default %g)", c); } 945 943 break; 946 944 case 's': t += "string"; 947 { int a, b; SString c; int n = getMinMaxStringFromTypeDef(type, a, b, c); if ((n >= 2) && (b > 0)) t += SString::sprintf(", max %d chars", b); if (n >= 3) t += SString::sprintf(" (default \"%s\")", c.c_str()); }945 { int a, b; SString c; int n = getMinMaxStringFromTypeDef(type, a, b, c); if ((n >= 2) && (b > 0)) t += SString::sprintf(", max %d chars", b); if (n >= 3) t += SString::sprintf(" (default \"%s\")", c.c_str()); } 948 946 break; 949 947 case 'x': t += "untyped value"; break;
Note: See TracChangeset
for help on using the changeset viewer.