Cube  Check-in [caec4df75e]

Overview
Comment:Fix concatword
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: caec4df75e9c54b7c66522456f6e916a130185f1e33a93284dfb72c0d6c9b8c7
User & Date: js on 2025-03-08 14:48:53
Other Links: manifest | tags
Context
2025-03-08
23:52
worldio.mm: Fix wrong format specifiers check-in: 369bbd2b80 user: js tags: trunk
14:48
Fix concatword check-in: caec4df75e user: js tags: trunk
14:04
commands.mm: More cleanups check-in: dab8760d1e user: js tags: trunk
Changes

Modified src/commands.mm from [07eb61aa1c] to [bdc0c01493].

218
219
220
221
222
223
224
225
226


227
228
229
230
231
232
233
			}

			p += strcspn(p, ";\n\0");
			// more statements if this isn't the end of the string
			cont = *p++ != 0;
			OFString *c = w[0];
			// strip irc-style command prefix
			if ([c hasPrefix:@"/"])
				c = [c substringFromIndex:1];


			// empty statement
			if (c.length == 0)
				continue;

			__kindof Identifier *identifier = identifiers[c];
			if (identifier == nil) {
				@try {







|

>
>







218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
			}

			p += strcspn(p, ";\n\0");
			// more statements if this isn't the end of the string
			cont = *p++ != 0;
			OFString *c = w[0];
			// strip irc-style command prefix
			if ([c hasPrefix:@"/"]) {
				c = [c substringFromIndex:1];
				w[0] = c;
			}
			// empty statement
			if (c.length == 0)
				continue;

			__kindof Identifier *identifier = identifiers[c];
			if (identifier == nil) {
				@try {
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
{
	alias(@"s", s);
}

void
concatword(OFString *s)
{
	// The original used this code which does nothing:
	// for (char *a = s, *b = s; *a = *b; b++)
	//	if (*a != ' ')
	//		a++;
	concat(s);
}

int
listlen(OFString *a_)
{
	@autoreleasepool {
		const char *a = a_.UTF8String;







<
<
<
<
|







467
468
469
470
471
472
473




474
475
476
477
478
479
480
481
{
	alias(@"s", s);
}

void
concatword(OFString *s)
{




	concat([s stringByReplacingOccurrencesOfString:@" " withString:@""]);
}

int
listlen(OFString *a_)
{
	@autoreleasepool {
		const char *a = a_.UTF8String;