commands: Various fixes for TxPrintf() with !MAGIC_WRAPPER

!MAGIC_WRAPPER build for WASM exposes
This commit is contained in:
Darryl L. Miles 2025-10-03 22:10:25 +01:00 committed by R. Timothy Edwards
parent b1424bfaf3
commit cfd1d567bd
4 changed files with 8 additions and 8 deletions

View File

@ -431,7 +431,7 @@ CmdCalma(
#ifdef MAGIC_WRAPPER
Tcl_SetObjResult(magicinterp, Tcl_NewDoubleObj((double)CalmaMagScale));
#else
TxPrintf("Text magnification 1.0 = %g microns.\n");
TxPrintf("Text magnification 1.0 = %g microns.\n", (double)CalmaMagScale);
#endif
return;
}
@ -744,7 +744,7 @@ CmdCalma(
#ifdef MAGIC_WRAPPER
Tcl_SetObjResult(magicinterp, Tcl_NewBooleanObj(CalmaNoDuplicates));
#else
TxPrintf("Cell defs that exist before reading GDS will not be paresd.\n",
TxPrintf("Cell defs that exist before reading GDS will %sbe parsed.\n",
(CalmaNoDuplicates) ? "not " : "");
#endif
return;
@ -764,7 +764,7 @@ CmdCalma(
#ifdef MAGIC_WRAPPER
Tcl_SetObjResult(magicinterp, Tcl_NewBooleanObj(CalmaUnique));
#else
TxPrintf("Cell defs that exist before reading GDS will be renamed.\n",
TxPrintf("Cell defs that exist before reading GDS will %sbe renamed.\n",
(CalmaUnique) ? "not " : "");
#endif
return;

View File

@ -2435,14 +2435,14 @@ printPropertiesFunc(
}
else
{
keyvalue = (char *)mallocMagic(strlen(name) + strlen((char *)value) + 2);
sprintf(keyvalue, "%s %s", name, (char *)value);
keyvalue = (char *)mallocMagic(strlen(name) + strlen((const char *)value) + 2);
sprintf(keyvalue, "%s %s", name, (const char *)value);
}
Tcl_AppendElement(magicinterp, keyvalue);
freeMagic(keyvalue);
#else
TxPrintf("%s = %s\n", name, value);
TxPrintf("%s = %s\n", name, (const char *)value);
#endif
return 0; /* keep the search alive */

View File

@ -99,7 +99,7 @@ CmdRandom(
#ifdef MAGIC_WRAPPER
Tcl_SetObjResult(magicinterp, Tcl_NewIntObj(random()));
#else
TxPrintf("%d", random());
TxPrintf("%ld", random());
#endif
}
else if ((cmd->tx_argc >= 2) && (!strcmp(cmd->tx_argv[1], "seed")))

View File

@ -981,7 +981,7 @@ cmdTsrFunc(
Tile *tp)
{
if (cmdTsearchDebug)
TxPrintf("%lx\n", (intmax_t) tp);
TxPrintf("%lx\n", (intptr_t) tp);
numTilesFound++;
return 0;
}