From 136412d263cc241bf9dfbe46271547615e3ba03d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 21 Nov 2015 10:19:34 -0800 Subject: 2468 - overload print-character as just 'print' --- sandbox/001-editor.mu | 6 +++--- sandbox/002-typing.mu | 6 +++--- sandbox/003-shortcuts.mu | 8 ++++---- sandbox/004-programming-environment.mu | 12 ++++++------ sandbox/005-sandbox.mu | 14 +++++++------- sandbox/009-sandbox-trace.mu | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-) (limited to 'sandbox') diff --git a/sandbox/001-editor.mu b/sandbox/001-editor.mu index f84e388a..56c98d81 100644 --- a/sandbox/001-editor.mu +++ b/sandbox/001-editor.mu @@ -193,14 +193,14 @@ recipe render screen:address:screen, editor:address:editor-data -> last-row:numb at-right?:boolean <- equal column, right break-unless at-right? # print wrap icon - print-character screen, 8617/loop-back-to-left, 245/grey + print screen, 8617/loop-back-to-left, 245/grey column <- copy left row <- add row, 1 screen <- move-cursor screen, row, column # don't increment curr loop +next-character:label } - print-character screen, c, color + print screen, c, color curr <- next curr prev <- next prev column <- add column, 1 @@ -230,7 +230,7 @@ recipe clear-line-delimited screen:address:screen, column:number, right:number - { done?:boolean <- greater-than column, right break-if done? - screen <- print-character screen, 32/space + screen <- print screen, 32/space column <- add column, 1 loop } diff --git a/sandbox/002-typing.mu b/sandbox/002-typing.mu index bc47e2d8..2b446101 100644 --- a/sandbox/002-typing.mu +++ b/sandbox/002-typing.mu @@ -224,7 +224,7 @@ recipe insert-at-cursor editor:address:editor-data, c:character, screen:address: overflow?:boolean <- and at-bottom?, at-right? break-if overflow? move-cursor screen, save-row, save-column - print-character screen, c + print screen, c go-render? <- copy 0/false reply } @@ -246,7 +246,7 @@ recipe insert-at-cursor editor:address:editor-data, c:character, screen:address: currc:character <- get *curr, value:offset at-newline?:boolean <- equal currc, 10/newline break-if at-newline? - print-character screen, currc + print screen, currc curr-column <- add curr-column, 1 curr <- next curr loop @@ -1035,7 +1035,7 @@ recipe draw-horizontal screen:address:screen, row:number, x:number, right:number { continue?:boolean <- lesser-or-equal x, right # right is inclusive, to match editor-data semantics break-unless continue? - print-character screen, style, color, bg-color + print screen, style, color, bg-color x <- add x, 1 loop } diff --git a/sandbox/003-shortcuts.mu b/sandbox/003-shortcuts.mu index 9c46c927..b3676efb 100644 --- a/sandbox/003-shortcuts.mu +++ b/sandbox/003-shortcuts.mu @@ -118,13 +118,13 @@ recipe delete-before-cursor editor:address:editor-data, screen:address:screen -> currc:character <- get *curr, value:offset at-newline?:boolean <- equal currc, 10/newline break-if at-newline? - screen <- print-character screen, currc + screen <- print screen, currc curr-column <- add curr-column, 1 curr <- next curr loop } # we're guaranteed not to be at the right margin - screen <- print-character screen, 32/space + screen <- print screen, 32/space go-render? <- copy 0/false ] @@ -358,13 +358,13 @@ recipe delete-at-cursor editor:address:editor-data, screen:address:screen -> edi currc:character <- get *curr, value:offset at-newline?:boolean <- equal currc, 10/newline break-if at-newline? - screen <- print-character screen, currc + screen <- print screen, currc curr-column <- add curr-column, 1 curr <- next curr loop } # we're guaranteed not to be at the right margin - screen <- print-character screen, 32/space + screen <- print screen, 32/space go-render? <- copy 0/false ] diff --git a/sandbox/004-programming-environment.mu b/sandbox/004-programming-environment.mu index c9cb020a..c6742397 100644 --- a/sandbox/004-programming-environment.mu +++ b/sandbox/004-programming-environment.mu @@ -223,7 +223,7 @@ recipe render screen:address:screen, s:address:array:character, left:number, rig at-right?:boolean <- equal column, right break-unless at-right? # print wrap icon - print-character screen, 8617/loop-back-to-left, 245/grey + print screen, 8617/loop-back-to-left, 245/grey column <- copy left row <- add row, 1 screen <- move-cursor screen, row, column @@ -238,7 +238,7 @@ recipe render screen:address:screen, s:address:array:character, left:number, rig { done?:boolean <- greater-than column, right break-if done? - print-character screen, 32/space + print screen, 32/space column <- add column, 1 loop } @@ -247,7 +247,7 @@ recipe render screen:address:screen, s:address:array:character, left:number, rig screen <- move-cursor screen, row, column loop +next-character:label } - print-character screen, c, color + print screen, c, color column <- add column, 1 loop } @@ -284,7 +284,7 @@ recipe render-code screen:address:screen, s:address:array:character, left:number at-right?:boolean <- equal column, right break-unless at-right? # print wrap icon - print-character screen, 8617/loop-back-to-left, 245/grey + print screen, 8617/loop-back-to-left, 245/grey column <- copy left row <- add row, 1 screen <- move-cursor screen, row, column @@ -299,7 +299,7 @@ recipe render-code screen:address:screen, s:address:array:character, left:number { done?:boolean <- greater-than column, right break-if done? - print-character screen, 32/space + print screen, 32/space column <- add column, 1 loop } @@ -308,7 +308,7 @@ recipe render-code screen:address:screen, s:address:array:character, left:number screen <- move-cursor screen, row, column loop +next-character:label } - print-character screen, c, color + print screen, c, color column <- add column, 1 loop } diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu index 0ebd079e..2fded997 100644 --- a/sandbox/005-sandbox.mu +++ b/sandbox/005-sandbox.mu @@ -234,7 +234,7 @@ recipe render-sandboxes screen:address:screen, sandbox:address:sandbox-data, lef row <- add row, 1 screen <- move-cursor screen, row, left clear-line-delimited screen, left, right - print-character screen, 120/x, 245/grey + print screen, 120/x, 245/grey # save menu row so we can detect clicks to it later starting-row:address:number <- get-address *sandbox, starting-row-on-screen:offset *starting-row <- copy row @@ -330,9 +330,9 @@ recipe render-screen screen:address:screen, sandbox-screen:address:screen, left: column <- copy left screen <- move-cursor screen, row, column # initial leader for each row: two spaces and a '.' - print-character screen, 32/space, 245/grey - print-character screen, 32/space, 245/grey - print-character screen, 46/full-stop, 245/grey + print screen, 32/space, 245/grey + print screen, 32/space, 245/grey + print screen, 46/full-stop, 245/grey column <- add left, 3 { # print row @@ -347,19 +347,19 @@ recipe render-screen screen:address:screen, sandbox-screen:address:screen, left: break-unless white? color <- copy 245/grey } - print-character screen, c, color + print screen, c, color column <- add column, 1 i <- add i, 1 loop } # print final '.' - print-character screen, 46/full-stop, 245/grey + print screen, 46/full-stop, 245/grey column <- add column, 1 { # clear rest of current line line-done?:boolean <- greater-than column, right break-if line-done? - print-character screen, 32/space + print screen, 32/space column <- add column, 1 loop } diff --git a/sandbox/009-sandbox-trace.mu b/sandbox/009-sandbox-trace.mu index 2a4cc55e..df74df47 100644 --- a/sandbox/009-sandbox-trace.mu +++ b/sandbox/009-sandbox-trace.mu @@ -25,7 +25,7 @@ scenario sandbox-click-on-code-toggles-app-trace [ ] run [ event-loop screen:address:screen, console:address:console, 2:address:programming-environment-data - print-character screen:address:screen, 9251/␣/cursor + print screen:address:screen, 9251/␣/cursor ] # trace now printed and cursor shouldn't have budged screen-should-contain [ @@ -54,7 +54,7 @@ scenario sandbox-click-on-code-toggles-app-trace [ ] run [ event-loop screen:address:screen, console:address:console, 2:address:programming-environment-data - print-character screen:address:screen, 9251/␣/cursor + print screen:address:screen, 9251/␣/cursor ] # trace hidden again screen-should-contain [ -- cgit 1.4.1-2-gfad0 181' href='#n181'>181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391