[PATCH] bc Version 1.1
Denys Vlasenko
vda.linux at googlemail.com
Mon Dec 3 17:49:29 UTC 2018
On Sat, Nov 3, 2018 at 6:17 PM Gavin Howard <gavin.d.howard at gmail.com> wrote:
>
> Hello,
>
> After making changes to the bc for Denys' requests, I have a better
> version of the bc.
>
> This version, pasted at https://pastebin.com/0M9sMhtM and raw at
> https://pastebin.com/raw/0M9sMhtM, has fulfilled every one of Denys'
> requests except for a few.
+static BcStatus bc_lex_comment(BcLex *l)
+{
+ size_t i, nls = 0;
+ const char *buf = l->buf;
+ bool end = false;
+ char c;
+
+ l->t.t = BC_LEX_WHITESPACE;
+
+ for (i = ++l->i; !end; i += !end) {
+
+ for (c = buf[i]; c != '*' && c != 0; c = buf[++i]) nls += (c == '\n');
+
+ if (c == 0 || buf[i + 1] == '\0') {
+ l->i = i;
+ return BC_STATUS_LEX_NO_COMMENT_END;
+ }
+
+ end = buf[i + 1] == '/';
+ }
This is rather unreadable.
More information about the busybox
mailing list