Unified · Split
| @@ -513,7 +513,8 @@ consoleproc(ctxt: ref Draw->Context, sync: chan of string) · 512 unmodified lines | |||
| 513 | " -y " + string (r.dy() / 3 + top.screenr.min.y)); | 513 | " -y " + string (r.dy() / 3 + top.screenr.min.y)); |
| 514 | 514 | ||
| 515 | tkclient->startinput(top, "ptr"::"kbd"::nil); | 515 | tkclient->startinput(top, "ptr"::"kbd"::nil); |
| 516 | # tkclient->onscreen(top, "onscreen"); | 516 | tkclient->onscreen(top, "onscreen"); |
| 517 | tkclient->wmctl(top, "task"); | ||
| 517 | 518 | ||
| 518 | for(;;) alt { | 519 | for(;;) alt { |
| 519 | c := <-titlectl or | 520 | c := <-titlectl or |
| @@ -9,7 +9,7 @@ tkclient.m · 8 unmodified lines | |||
| 9 | sh.m | 9 | sh.m |
| 10 | string.m | 10 | string.m |
| 11 | arg.m | 11 | arg.m |
| 12 | 1091 | 12 | 1101 |
| 13 | 45.13,21 0 | 13 | 45.13,21 0 |
| 14 | 13,21 0 | 14 | 13,21 0 |
| 15 | 13,21 0 | 15 | 13,21 0 |
| @@ -951,156 +951,166 @@ arg.m · 935 unmodified lines | |||
| 951 | 27,44 325 | 951 | 27,44 325 |
| 952 | 27,44 326 | 952 | 27,44 326 |
| 953 | 1,45 325 | 953 | 1,45 325 |
| 954 | 519.8,16 327 | 954 | 516.1,36 327 |
| 955 | 8,16 327 | 955 | 20,23 327 |
| 956 | 520.7,15 327 | 956 | 25,35 327 |
| 957 | 7,15 327 | 957 | 1,36 327 |
| 958 | 521.7,15 327 | 958 | 517.1,29 328 |
| 959 | 7,19 327 | 959 | 17,20 328 |
| 960 | 7,19 328 | 960 | 22,28 328 |
| 961 | 7,19 327 | 961 | 1,29 328 |
| 962 | 525.8,16 327 | 962 | 1,29 328 |
| 963 | 8,20 327 | 963 | 1,29 329 |
| 964 | 8,20 329 | 964 | 520.8,16 330 |
| 965 | 8,20 327 | 965 | 8,16 330 |
| 966 | 527.8,16 327 | 966 | 521.7,15 330 |
| 967 | 8,20 327 | 967 | 7,15 330 |
| 968 | 522.7,15 330 | ||
| 969 | 7,19 330 | ||
| 970 | 7,19 331 | ||
| 971 | 7,19 330 | ||
| 972 | 526.8,16 330 | ||
| 968 | 8,20 330 | 973 | 8,20 330 |
| 969 | 8,20 327 | 974 | 8,20 332 |
| 970 | 529.26,39 327 | 975 | 8,20 330 |
| 971 | 26,39 327 | 976 | 528.8,16 330 |
| 972 | 532.26,39 327 | 977 | 8,20 330 |
| 973 | 26,39 327 | 978 | 8,20 333 |
| 974 | 535.27,41 327 | 979 | 8,20 330 |
| 975 | 27,41 327 | 980 | 530.26,39 330 |
| 976 | 537.27,41 327 | 981 | 26,39 330 |
| 977 | 27,41 327 | 982 | 533.26,39 330 |
| 978 | 518.9,15 327 | 983 | 26,39 330 |
| 979 | 9,15 327 | 984 | 536.27,41 330 |
| 980 | 9,15 327 | 985 | 27,41 330 |
| 981 | 9,15 327 | 986 | 538.27,41 330 |
| 982 | 9,15 327 | 987 | 27,41 330 |
| 983 | 9,15 327 | 988 | 519.9,15 330 |
| 984 | 522.5,16 331 | 989 | 9,15 330 |
| 985 | 523.3,13 332 | 990 | 9,15 330 |
| 986 | 524.2,25 333 | 991 | 9,15 330 |
| 987 | 18,21 333 | 992 | 9,15 330 |
| 988 | 23,24 333 | 993 | 9,15 330 |
| 989 | 2,25 333 | 994 | 523.5,16 334 |
| 990 | 2,25 333 | 995 | 524.3,13 335 |
| 991 | 2,25 334 | 996 | 525.2,25 336 |
| 992 | 2,25 335 | 997 | 18,21 336 |
| 993 | 2,25 327 | 998 | 23,24 336 |
| 994 | 526.2,22 336 | 999 | 2,25 336 |
| 995 | 15,18 336 | 1000 | 2,25 336 |
| 996 | 20,21 336 | 1001 | 2,25 337 |
| 997 | 2,22 336 | 1002 | 2,25 338 |
| 998 | 2,22 327 | 1003 | 2,25 330 |
| 999 | 528.2,22 337 | 1004 | 527.2,22 339 |
| 1000 | 14,17 337 | 1005 | 15,18 339 |
| 1001 | 19,21 337 | 1006 | 20,21 339 |
| 1002 | 2,22 337 | 1007 | 2,22 339 |
| 1003 | 2,22 338 | 1008 | 2,22 330 |
| 1004 | 2,22 327 | 1009 | 529.2,22 340 |
| 1005 | 529.17,19 327 | 1010 | 14,17 340 |
| 1006 | 17,19 339 | 1011 | 19,21 340 |
| 1007 | 530.5,14 340 | 1012 | 2,22 340 |
| 1008 | 531.11,14 341 | 1013 | 2,22 341 |
| 1009 | 16,43 341 | 1014 | 2,22 330 |
| 1010 | 3,44 341 | 1015 | 530.17,19 330 |
| 1011 | 3,44 342 | 1016 | 17,19 342 |
| 1012 | 3,44 343 | 1017 | 531.5,14 343 |
| 1018 | 532.11,14 344 | ||
| 1019 | 16,43 344 | ||
| 1013 | 3,44 344 | 1020 | 3,44 344 |
| 1014 | 3,44 327 | 1021 | 3,44 345 |
| 1015 | 532.17,19 327 | 1022 | 3,44 346 |
| 1016 | 17,19 345 | ||
| 1017 | 533.5,14 346 | ||
| 1018 | 534.11,14 347 | ||
| 1019 | 16,43 347 | ||
| 1020 | 3,44 347 | 1023 | 3,44 347 |
| 1021 | 3,44 348 | 1024 | 3,44 330 |
| 1022 | 3,44 349 | 1025 | 533.17,19 330 |
| 1026 | 17,19 348 | ||
| 1027 | 534.5,14 349 | ||
| 1028 | 535.11,14 350 | ||
| 1029 | 16,43 350 | ||
| 1023 | 3,44 350 | 1030 | 3,44 350 |
| 1024 | 3,44 327 | 1031 | 3,44 351 |
| 1025 | 535.7,11 327 | 1032 | 3,44 352 |
| 1026 | 18,20 327 | 1033 | 3,44 353 |
| 1027 | 18,20 351 | 1034 | 3,44 330 |
| 1028 | 18,20 352 | 1035 | 536.7,11 330 |
| 1029 | 536.2,23 353 | 1036 | 18,20 330 |
| 1030 | 9,12 353 | 1037 | 18,20 354 |
| 1031 | 14,18 353 | 1038 | 18,20 355 |
| 1032 | 20,22 353 | 1039 | 537.2,23 356 |
| 1033 | 2,23 353 | 1040 | 9,12 356 |
| 1034 | 2,23 354 | 1041 | 14,18 356 |
| 1035 | 2,23 355 | 1042 | 20,22 356 |
| 1036 | 2,23 327 | 1043 | 2,23 356 |
| 1037 | 537.7,11 327 | 1044 | 2,23 357 |
| 1038 | 18,20 327 | ||
| 1039 | 18,20 356 | ||
| 1040 | 18,20 357 | ||
| 1041 | 538.2,23 358 | ||
| 1042 | 9,12 358 | ||
| 1043 | 14,18 358 | ||
| 1044 | 20,22 358 | ||
| 1045 | 2,23 358 | 1045 | 2,23 358 |
| 1046 | 539.5,14 359 | 1046 | 2,23 330 |
| 1047 | 540.3,33 360 | 1047 | 538.7,11 330 |
| 1048 | 19,22 360 | 1048 | 18,20 330 |
| 1049 | 24,32 360 | 1049 | 18,20 359 |
| 1050 | 3,33 360 | 1050 | 18,20 360 |
| 1051 | 3,33 360 | 1051 | 539.2,23 361 |
| 1052 | 3,33 361 | 1052 | 9,12 361 |
| 1053 | 3,33 362 | 1053 | 14,18 361 |
| 1054 | 20,22 361 | ||
| 1055 | 2,23 361 | ||
| 1056 | 540.5,14 362 | ||
| 1057 | 541.3,33 363 | ||
| 1058 | 19,22 363 | ||
| 1059 | 24,32 363 | ||
| 1060 | 3,33 363 | ||
| 1054 | 3,33 363 | 1061 | 3,33 363 |
| 1055 | 3,33 327 | 1062 | 3,33 364 |
| 1056 | 546.4,13 364 | 1063 | 3,33 365 |
| 1057 | 547.2,8 365 | 1064 | 3,33 366 |
| 1058 | 549.1,17 366 | 1065 | 3,33 330 |
| 1059 | 550.1,40 367 | 1066 | 547.4,13 367 |
| 1060 | 9,12 367 | 1067 | 548.2,8 368 |
| 1061 | 14,39 367 | 1068 | 550.1,17 369 |
| 1062 | 1,40 367 | 1069 | 551.1,40 370 |
| 1063 | 1,40 367 | 1070 | 9,12 370 |
| 1064 | 1,40 368 | 1071 | 14,39 370 |
| 1065 | 552.1,3 369 | 1072 | 1,40 370 |
| 1066 | 9,17 369 | 1073 | 1,40 370 |
| 1067 | 19,22 369 | 1074 | 1,40 371 |
| 1068 | 1,3 369 | 1075 | 553.1,3 372 |
| 1069 | 551.1,7 369 | 1076 | 9,17 372 |
| 1070 | 1,7 369 | 1077 | 19,22 372 |
| 1071 | 1,7 369 | 1078 | 1,3 372 |
| 1072 | 1,7 369 | 1079 | 552.1,7 372 |
| 1073 | 1,7 370 | 1080 | 1,7 372 |
| 1074 | 1,7 369 | 1081 | 1,7 372 |
| 1075 | 1,7 369 | 1082 | 1,7 372 |
| 1076 | 556.5,11 371 | 1083 | 1,7 373 |
| 1077 | 17,22 372 | 1084 | 1,7 372 |
| 1078 | 13,22 372 | 1085 | 1,7 372 |
| 1079 | 557.5,9 373 | 1086 | 557.5,11 374 |
| 1080 | 5,17 373 | 1087 | 17,22 375 |
| 1081 | 558.3,11 374 | 1088 | 13,22 375 |
| 1082 | 556.24,27 375 | 1089 | 558.5,9 376 |
| 1083 | 24,27 375 | 1090 | 5,17 376 |
| 1084 | 559.4,28 376 | 1091 | 559.3,11 377 |
| 1085 | 560.2,68 377 | 1092 | 557.24,27 378 |
| 1086 | 6,9 377 | 1093 | 24,27 378 |
| 1087 | 42,52 377 | 1094 | 560.4,28 379 |
| 1088 | 35,52 377 | 1095 | 561.2,68 380 |
| 1089 | 11,52 377 | 1096 | 6,9 380 |
| 1090 | 11,67 377 | 1097 | 42,52 380 |
| 1091 | 11,67 378 | 1098 | 35,52 380 |
| 1092 | 2,68 377 | 1099 | 11,52 380 |
| 1093 | 2,68 377 | 1100 | 11,67 380 |
| 1094 | 2,68 379 | 1101 | 11,67 381 |
| 1095 | 561.12,22 380 | 1102 | 2,68 380 |
| 1096 | 2,22 380 | 1103 | 2,68 380 |
| 1097 | 564.1,40 381 | 1104 | 2,68 382 |
| 1098 | 9,12 381 | 1105 | 562.12,22 383 |
| 1099 | 14,39 381 | 1106 | 2,22 383 |
| 1100 | 1,40 381 | 1107 | 565.1,40 384 |
| 1101 | 1,40 381 | 1108 | 9,12 384 |
| 1102 | 1,40 382 | 1109 | 14,39 384 |
| 1103 | 565.0,1 383 | 1110 | 1,40 384 |
| 1111 | 1,40 384 | ||
| 1112 | 1,40 385 | ||
| 1113 | 566.0,1 386 | ||
| 1104 | 24 | 1114 | 24 |
| 1105 | aSys->Dir 1:26.1,39.2 64 | 1115 | aSys->Dir 1:26.1,39.2 64 |
| 1106 | 11 | 1116 | 11 |
| @@ -1473,37 +1483,37 @@ n849:consoleproc · 366 unmodified lines | |||
| 1473 | 40:top:507.2,5 R@12 | 1483 | 40:top:507.2,5 R@12 |
| 1474 | 1484 | ||
| 1475 | 44:titlectl:7,15 Cs | 1485 | 44:titlectl:7,15 Cs |
| 1476 | 48:c:519.1,2 s | 1486 | 48:c:520.1,2 s |
| 1477 | 52:i:508.5,6 i | 1487 | 52:i:508.5,6 i |
| 1478 | 56:iostderr:499.1,9 R@22 | 1488 | 56:iostderr:499.1,9 R@22 |
| 1479 | 1489 | ||
| 1480 | 60:iostdout:494.1,9 R@22 | 1490 | 60:iostdout:494.1,9 R@22 |
| 1481 | 1491 | ||
| 1482 | 64:rc:529.17,19 @23 | 1492 | 64:rc:530.17,19 @23 |
| 1483 | 1493 | ||
| 1484 | 68:rc:532.17,19 @23 | 1494 | 68:rc:533.17,19 @23 |
| 1485 | 1495 | ||
| 1486 | 72:wc:537.18,20 @21 | 1496 | 72:wc:538.18,20 @21 |
| 1487 | 1497 | ||
| 1488 | 76:c:525.1,2 i | 1498 | 76:c:526.1,2 i |
| 1489 | 80:data:535.7,11 Ab | 1499 | 80:data:536.7,11 Ab |
| 1490 | 84:data:537.7,11 Ab | 1500 | 84:data:538.7,11 Ab |
| 1491 | 88:p:527.1,2 R@10 | 1501 | 88:p:528.1,2 R@10 |
| 1492 | 1502 | ||
| 1493 | 92:wc:535.18,20 @21 | 1503 | 92:wc:536.18,20 @21 |
| 1494 | 1504 | ||
| 1495 | 124:r:511.1,2 @6 | 1505 | 124:r:511.1,2 @6 |
| 1496 | 1506 | ||
| 1497 | n1043:conout | 1507 | n1053:conout |
| 1498 | 3 | 1508 | 3 |
| 1499 | 32:top:544.7,10 R@12 | 1509 | 32:top:545.7,10 R@12 |
| 1500 | 1510 | ||
| 1501 | 36:data:30,34 Ab | 1511 | 36:data:30,34 Ab |
| 1502 | 40:wc:51,53 @21 | 1512 | 40:wc:51,53 @21 |
| 1503 | 1513 | ||
| 1504 | 2 | 1514 | 2 |
| 1505 | 44:i:556.5,6 i | 1515 | 44:i:557.5,6 i |
| 1506 | 48:s:549.1,2 s | 1516 | 48:s:550.1,2 s |
| 1507 | n11 | 1517 | n11 |
| 1508 | 436:con_cfg:477.0,7 As | 1518 | 436:con_cfg:477.0,7 As |
| 1509 | 456:draw:5.1,5 mDraw | 1519 | 456:draw:5.1,5 mDraw |
| @@ -1513,22 +1523,22 @@ n11 · 3 unmodified lines | |||
| 1513 | 5:97.0,106.1 0 | 1523 | 5:97.0,106.1 0 |
| 1514 | 1524 | ||
| 1515 | 532:nlines:0:490.0,6 i | 1525 | 532:nlines:0:490.0,6 i |
| 1516 | 556:screenr:41.0,7 @6 | 1526 | 560:screenr:41.0,7 @6 |
| 1517 | 1527 | ||
| 1518 | 572:shell:12.1,6 mSh | 1528 | 576:shell:12.1,6 mSh |
| 1519 | 5:8.0,95.1 0 | 1529 | 5:8.0,95.1 0 |
| 1520 | 1530 | ||
| 1521 | 580:str:0:15.1,4 mString | 1531 | 584:str:0:15.1,4 mString |
| 1522 | 6:1.0,40.1 0 | 1532 | 6:1.0,40.1 0 |
| 1523 | 1533 | ||
| 1524 | 584:sys:0:3.1,4 mSys | 1534 | 588:sys:0:3.1,4 mSys |
| 1525 | 1:4.0,161.1 0 | 1535 | 1:4.0,161.1 0 |
| 1526 | 1536 | ||
| 1527 | 592:tbtop:0:40.0,5 R@12 | 1537 | 596:tbtop:0:40.0,5 R@12 |
| 1528 | 1538 | ||
| 1529 | 596:tk:8.1,3 mTk | 1539 | 600:tk:8.1,3 mTk |
| 1530 | 3:1.0,25.1 0 | 1540 | 3:1.0,25.1 0 |
| 1531 | 1541 | ||
| 1532 | 604:tkclient:0:10.1,9 mTkclient | 1542 | 608:tkclient:0:10.1,9 mTkclient |
| 1533 | 4:1.0,26.1 0 | 1543 | 4:1.0,26.1 0 |
| 1534 | 1544 | ||
| @@ -493,55 +493,55 @@ nlines := 0; # transcript length · 492 unmodified lines | |||
| 493 | 493 | ||
| 494 | consoleproc(ctxt: ref Draw->Context, sync: chan of string) | 494 | consoleproc(ctxt: ref Draw->Context, sync: chan of string) |
| 495 | { | 495 | { |
| 496 | iostdout := sys->file2chan("/chan", "wmstdout"); | 496 | # iostdout := sys->file2chan("/chan", "wmstdout"); |
| 497 | if(iostdout == nil){ | 497 | # if(iostdout == nil){ |
| 498 | sync <-= sys->sprint("cannot make /chan/wmstdout: %r"); | 498 | # sync <-= sys->sprint("cannot make /chan/wmstdout: %r"); |
| 499 | return; | 499 | # return; |
| 500 | } | 500 | # } |
| 501 | iostderr := sys->file2chan("/chan", "wmstderr"); | 501 | # iostderr := sys->file2chan("/chan", "wmstderr"); |
| 502 | if(iostderr == nil){ | 502 | # if(iostderr == nil){ |
| 503 | sync <-= sys->sprint("cannot make /chan/wmstdout: %r"); | 503 | # sync <-= sys->sprint("cannot make /chan/wmstdout: %r"); |
| 504 | return; | 504 | # return; |
| 505 | } | 505 | # } |
| 506 | 506 | ||
| 507 | sync <-= nil; | 507 | sync <-= nil; |
| 508 | 508 | ||
| 509 | (top, titlectl) := tkclient->toplevel(ctxt, "", "Log", tkclient->Appl); | 509 | # (top, titlectl) := tkclient->toplevel(ctxt, "", "Log", tkclient->Appl); |
| 510 | for(i := 0; i < len con_cfg; i++) | 510 | # for(i := 0; i < len con_cfg; i++) |
| 511 | cmd(top, con_cfg[i]); | 511 | # cmd(top, con_cfg[i]); |
| 512 | 512 | ||
| 513 | r := tk->rect(top, ".", Tk->Border|Tk->Required); | 513 | # r := tk->rect(top, ".", Tk->Border|Tk->Required); |
| 514 | cmd(top, ". configure -x " + string ((top.screenr.dx() - r.dx()) / 2 + top.screenr.min.x) + | 514 | # cmd(top, ". configure -x " + string ((top.screenr.dx() - r.dx()) / 2 + top.screenr.min.x) + |
| 515 | " -y " + string (r.dy() / 3 + top.screenr.min.y)); | 515 | # " -y " + string (r.dy() / 3 + top.screenr.min.y)); |
| 516 | 516 | ||
| 517 | tkclient->startinput(top, "ptr"::"kbd"::nil); | 517 | # tkclient->startinput(top, "ptr"::"kbd"::nil); |
| 518 | tkclient->onscreen(top, "onscreen"); | 518 | # tkclient->onscreen(top, "onscreen"); |
| 519 | tkclient->wmctl(top, "task"); | 519 | # tkclient->wmctl(top, "task"); |
| 520 | 520 | ||
| 521 | for(;;) alt { | 521 | # for(;;) alt { |
| 522 | c := <-titlectl or | 522 | # c := <-titlectl or |
| 523 | c = <-top.wreq or | 523 | # c = <-top.wreq or |
| 524 | c = <-top.ctxt.ctl => | 524 | # c = <-top.ctxt.ctl => |
| 525 | if(c == "exit") | 525 | # if(c == "exit") |
| 526 | c = "task"; | 526 | # c = "task"; |
| 527 | tkclient->wmctl(top, c); | 527 | # tkclient->wmctl(top, c); |
| 528 | c := <-top.ctxt.kbd => | 528 | # c := <-top.ctxt.kbd => |
| 529 | tk->keyboard(top, c); | 529 | # tk->keyboard(top, c); |
| 530 | p := <-top.ctxt.ptr => | 530 | # p := <-top.ctxt.ptr => |
| 531 | tk->pointer(top, *p); | 531 | # tk->pointer(top, *p); |
| 532 | (nil, nil, nil, rc) := <-iostdout.read => | 532 | # (nil, nil, nil, rc) := <-iostdout.read => |
| 533 | if(rc != nil) | 533 | # if(rc != nil) |
| 534 | rc <-= (nil, "inappropriate use of file"); | 534 | # rc <-= (nil, "inappropriate use of file"); |
| 535 | (nil, nil, nil, rc) := <-iostderr.read => | 535 | # (nil, nil, nil, rc) := <-iostderr.read => |
| 536 | if(rc != nil) | 536 | # if(rc != nil) |
| 537 | rc <-= (nil, "inappropriate use of file"); | 537 | # rc <-= (nil, "inappropriate use of file"); |
| 538 | (nil, data, nil, wc) := <-iostdout.write => | 538 | # (nil, data, nil, wc) := <-iostdout.write => |
| 539 | conout(top, data, wc); | 539 | # conout(top, data, wc); |
| 540 | (nil, data, nil, wc) := <-iostderr.write => | 540 | # (nil, data, nil, wc) := <-iostderr.write => |
| 541 | conout(top, data, wc); | 541 | # conout(top, data, wc); |
| 542 | if(wc != nil) | 542 | # if(wc != nil) |
| 543 | tkclient->wmctl(top, "untask"); | 543 | # tkclient->wmctl(top, "untask"); |
| 544 | } | 544 | # } |
| 545 | } | 545 | } |
| 546 | 546 | ||
| 547 | conout(top: ref Tk->Toplevel, data: array of byte, wc: Sys->Rwrite) | 547 | conout(top: ref Tk->Toplevel, data: array of byte, wc: Sys->Rwrite) |
Binary file not shown.