MCPcopy Create free account
hub / github.com/SimHacker/micropolis / EditorCmdAutoSpeed

Function EditorCmdAutoSpeed

micropolis-activity/src/sim/w_editor.c:548–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546
547
548int EditorCmdAutoSpeed(VIEW_ARGS)
549{
550 int speed;
551
552 if ((argc != 2) && (argc != 3)) {
553 return TCL_ERROR;
554 }
555
556 if (argc == 3) {
557 if ((Tcl_GetInt(interp, argv[2], &speed) != TCL_OK) ||
558 (speed < 1)) {
559 return TCL_ERROR;
560 }
561
562 view->auto_speed = speed;
563 }
564
565 sprintf(interp->result, "%d", view->auto_speed);
566 return TCL_OK;
567}
568
569
570int EditorCmdAutoGoal(VIEW_ARGS)

Callers

nothing calls this directly

Calls 1

Tcl_GetIntFunction · 0.85

Tested by

no test coverage detected