Differences From Artifact [5ae3539b0c]:
- File src/commands.m — part of check-in [46c5779570] at 2025-03-20 21:52:26 on branch trunk — Convert more files to pure Objective-C (user: js, size: 11421) [annotate] [blame] [check-ins using]
To Artifact [4117ae0f6a]:
- File
src/commands.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 11474) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
236 237 238 239 240 241 242 | char *p = copy; const int MAXWORDS = 25; // limit, remove OFString *w[MAXWORDS]; int val = 0; for (bool cont = true; cont;) { // for each ; seperated statement int numargs = MAXWORDS; | | < | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | char *p = copy; const int MAXWORDS = 25; // limit, remove OFString *w[MAXWORDS]; int val = 0; for (bool cont = true; cont;) { // for each ; seperated statement int numargs = MAXWORDS; for (int i = 0; i < MAXWORDS; i++) { // collect all argument values w[i] = @""; if (i > numargs) continue; // parse and evaluate exps char *s = parseword(&p); if (!s) { |
︙ | ︙ | |||
417 418 419 420 421 422 423 | } void loopa(OFString *times, OFString *body) { int t = times.cube_intValue; | | < | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | } void loopa(OFString *times, OFString *body) { int t = times.cube_intValue; for (int i = 0; i < t; i++) { intset(@"i", i); execute(body, true); } } void whilea(OFString *cond, OFString *body) |
︙ | ︙ | |||
473 474 475 476 477 478 479 | void at(OFString *s_, OFString *pos) { int n = pos.cube_intValue; char *copy __attribute__((__cleanup__(cleanup))) = strdup(s_.UTF8String); char *s = copy; | | < | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | void at(OFString *s_, OFString *pos) { int n = pos.cube_intValue; char *copy __attribute__((__cleanup__(cleanup))) = strdup(s_.UTF8String); char *s = copy; for (int i = 0; i < n; i++) { s += strcspn(s, " \0"); s += strspn(s, " "); } s[strcspn(s, " \0")] = 0; concat(@(s)); } |
︙ | ︙ |