summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-03-04 15:01:14 +0200
committerToomas Soome <tsoome@me.com>2019-04-29 18:19:42 +0300
commitc0bb4f7308f9d7f3f31eb636c73ef07c6d19b5f3 (patch)
tree6408b37686762fae0015c8ae2565f8e22f30b10a
parentc4ab0d3f46036e85ad0700125c5a83cc139f55a3 (diff)
downloadillumos-joyent-c0bb4f7308f9d7f3f31eb636c73ef07c6d19b5f3.tar.gz
10606 ficl: smatch errors: inconsistent indenting and unchecked function return
10699 loader: smatch cleanups for ficl 10885 loader: ficl pfopendir() should push FICL_FALSE in case of error Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/common/ficl/dictionary.c44
-rw-r--r--usr/src/common/ficl/emu/gfx_fb.c16
-rw-r--r--usr/src/common/ficl/emu/loader_emu.c156
-rw-r--r--usr/src/common/ficl/extras.c34
-rw-r--r--usr/src/common/ficl/ficl.h5
-rw-r--r--usr/src/common/ficl/ficlplatform/pager.c6
-rw-r--r--usr/src/common/ficl/ficltokens.h518
-rw-r--r--usr/src/common/ficl/float.c54
-rw-r--r--usr/src/common/ficl/loader.c162
-rw-r--r--usr/src/common/ficl/prefix.c2
-rw-r--r--usr/src/common/ficl/primitives.c502
-rw-r--r--usr/src/common/ficl/search.c35
-rw-r--r--usr/src/common/ficl/system.c14
-rw-r--r--usr/src/common/ficl/tools.c130
-rw-r--r--usr/src/common/ficl/vm.c276
-rw-r--r--usr/src/lib/libficl/Makefile.com3
16 files changed, 1019 insertions, 938 deletions
diff --git a/usr/src/common/ficl/dictionary.c b/usr/src/common/ficl/dictionary.c
index 39460e9144..acea6937af 100644
--- a/usr/src/common/ficl/dictionary.c
+++ b/usr/src/common/ficl/dictionary.c
@@ -679,19 +679,19 @@ ficlDictionarySee(ficlDictionary *dictionary, ficlWord *word,
switch (kind) {
case FICL_WORDKIND_INSTRUCTION:
- sprintf(trace, "%s (instruction %ld)",
+ (void) sprintf(trace, "%s (instruction %ld)",
ficlDictionaryInstructionNames[(long)word],
(long)word);
break;
case FICL_WORDKIND_INSTRUCTION_WITH_ARGUMENT:
c = *++cell;
- sprintf(trace, "%s (instruction %ld), with "
- "argument %ld (%#lx)",
+ (void) sprintf(trace, "%s (instruction %ld), "
+ "with argument %ld (%#lx)",
ficlDictionaryInstructionNames[(long)word],
(long)word, (long)c.i, (unsigned long)c.u);
break;
case FICL_WORDKIND_INSTRUCTION_WORD:
- sprintf(trace,
+ (void) sprintf(trace,
"%s :: executes %s (instruction word %ld)",
word->name,
ficlDictionaryInstructionNames[
@@ -702,25 +702,27 @@ ficlDictionarySee(ficlDictionary *dictionary, ficlWord *word,
if (ficlDictionaryIsAWord(dictionary, c.p) &&
(c.i >= ficlInstructionLast)) {
ficlWord *word = (ficlWord *)c.p;
- sprintf(trace, "%.*s ( %#lx literal )",
+ (void) sprintf(trace,
+ "%.*s ( %#lx literal )",
word->length, word->name,
(unsigned long)c.u);
} else
- sprintf(trace,
+ (void) sprintf(trace,
"literal %ld (%#lx)", (long)c.i,
(unsigned long)c.u);
break;
case FICL_WORDKIND_2LITERAL:
c = *++cell;
c2 = *++cell;
- sprintf(trace, "2literal %ld %ld (%#lx %#lx)",
+ (void) sprintf(trace,
+ "2literal %ld %ld (%#lx %#lx)",
(long)c2.i, (long)c.i, (unsigned long)c2.u,
(unsigned long)c.u);
break;
#if FICL_WANT_FLOAT
case FICL_WORDKIND_FLITERAL:
c = *++cell;
- sprintf(trace, "fliteral %f (%#lx)",
+ (void) sprintf(trace, "fliteral %f (%#lx)",
(double)c.f, (unsigned long)c.u);
break;
#endif /* FICL_WANT_FLOAT */
@@ -730,8 +732,8 @@ ficlDictionarySee(ficlDictionary *dictionary, ficlWord *word,
cell = (ficlCell *)
ficlAlignPointer(counted->text +
counted->length + 1) - 1;
- sprintf(trace, "s\" %.*s\"", counted->length,
- counted->text);
+ (void) sprintf(trace, "s\" %.*s\"",
+ counted->length, counted->text);
}
break;
case FICL_WORDKIND_CSTRING_LITERAL: {
@@ -740,54 +742,54 @@ ficlDictionarySee(ficlDictionary *dictionary, ficlWord *word,
cell = (ficlCell *)
ficlAlignPointer(counted->text +
counted->length + 1) - 1;
- sprintf(trace, "c\" %.*s\"", counted->length,
- counted->text);
+ (void) sprintf(trace, "c\" %.*s\"",
+ counted->length, counted->text);
}
break;
case FICL_WORDKIND_BRANCH0:
c = *++cell;
- sprintf(trace, "branch0 %ld",
+ (void) sprintf(trace, "branch0 %ld",
(long)(cell + c.i - param0));
break;
case FICL_WORDKIND_BRANCH:
c = *++cell;
- sprintf(trace, "branch %ld",
+ (void) sprintf(trace, "branch %ld",
(long)(cell + c.i - param0));
break;
case FICL_WORDKIND_QDO:
c = *++cell;
- sprintf(trace, "?do (leave %ld)",
+ (void) sprintf(trace, "?do (leave %ld)",
(long)((ficlCell *)c.p - param0));
break;
case FICL_WORDKIND_DO:
c = *++cell;
- sprintf(trace, "do (leave %ld)",
+ (void) sprintf(trace, "do (leave %ld)",
(long)((ficlCell *)c.p - param0));
break;
case FICL_WORDKIND_LOOP:
c = *++cell;
- sprintf(trace, "loop (branch %ld)",
+ (void) sprintf(trace, "loop (branch %ld)",
(long)(cell + c.i - param0));
break;
case FICL_WORDKIND_OF:
c = *++cell;
- sprintf(trace, "of (branch %ld)",
+ (void) sprintf(trace, "of (branch %ld)",
(long)(cell + c.i - param0));
break;
case FICL_WORDKIND_PLOOP:
c = *++cell;
- sprintf(trace, "+loop (branch %ld)",
+ (void) sprintf(trace, "+loop (branch %ld)",
(long)(cell + c.i - param0));
break;
default:
- sprintf(trace, "%.*s", word->length,
+ (void) sprintf(trace, "%.*s", word->length,
word->name);
break;
}
} else {
/* probably not a word - punt and print value */
- sprintf(trace, "%ld ( %#lx )", (long)cell->i,
+ (void) sprintf(trace, "%ld ( %#lx )", (long)cell->i,
(unsigned long)cell->u);
}
diff --git a/usr/src/common/ficl/emu/gfx_fb.c b/usr/src/common/ficl/emu/gfx_fb.c
index caed97f85f..31efcf96bc 100644
--- a/usr/src/common/ficl/emu/gfx_fb.c
+++ b/usr/src/common/ficl/emu/gfx_fb.c
@@ -76,13 +76,13 @@ gfx_framework_init(void)
/* make sure we have GFX framebuffer */
if (ioctl(fb.fd, VIS_GETIDENTIFIER, &fb.ident) < 0 ||
strcmp(fb.ident.name, "illumos_fb") != 0) {
- close(fb.fd);
+ (void) close(fb.fd);
fb.fd = -1;
return;
}
if (ioctl(fb.fd, FBIOGATTR, &attr) < 0) {
- close(fb.fd);
+ (void) close(fb.fd);
fb.fd = -1;
return;
}
@@ -112,14 +112,14 @@ gfx_framework_init(void)
MAP_SHARED, fb.fd, 0);
if (fb.fb_addr == NULL) {
- close(fb.fd);
+ (void) close(fb.fd);
fb.fd = -1;
return;
}
- snprintf(buf, sizeof (buf), "%d", fb.fb_height);
- setenv("screen-height", buf, 1);
- snprintf(buf, sizeof (buf), "%d", fb.fb_width);
- setenv("screen-width", buf, 1);
+ (void) snprintf(buf, sizeof (buf), "%d", fb.fb_height);
+ (void) setenv("screen-height", buf, 1);
+ (void) snprintf(buf, sizeof (buf), "%d", fb.fb_width);
+ (void) setenv("screen-width", buf, 1);
}
void
@@ -129,7 +129,7 @@ gfx_framework_fini(void)
return;
(void) munmap((caddr_t)fb.fb_addr, fb.fb_size);
- close(fb.fd);
+ (void) close(fb.fd);
fb.fd = -1;
}
diff --git a/usr/src/common/ficl/emu/loader_emu.c b/usr/src/common/ficl/emu/loader_emu.c
index f64f15255e..dcb2933b84 100644
--- a/usr/src/common/ficl/emu/loader_emu.c
+++ b/usr/src/common/ficl/emu/loader_emu.c
@@ -421,14 +421,15 @@ parse(int *argc, char ***argv, char *str)
} else {
q = p;
while (*q && !isspace(*q))
- ++q;
+ ++q;
}
tmp = *q;
*q = '\0';
if ((val = getenv(p)) != NULL) {
size_t len = strlen(val);
- strncpy(buf + i, val, PARSE_BUFSIZE - (i + 1));
+ (void) strncpy(buf + i, val,
+ PARSE_BUFSIZE - (i + 1));
i += min(len, PARSE_BUFSIZE - 1);
}
*q = tmp; /* restore value */
@@ -533,9 +534,10 @@ bf_command(ficlVm *vm)
*/
nstrings = ficlStackPopInteger(ficlVmGetDataStack(vm));
for (i = 0, len = 0; i < nstrings; i++)
- len += ficlStackFetch(ficlVmGetDataStack(vm), i * 2).i + 1;
+ len += ficlStackFetch(ficlVmGetDataStack(vm),
+ i * 2).i + 1;
line = malloc(strlen(name) + len + 1);
- strcpy(line, name);
+ (void) strcpy(line, name);
if (nstrings)
for (i = 0; i < nstrings; i++) {
@@ -543,8 +545,8 @@ bf_command(ficlVm *vm)
ficlVmGetDataStack(vm));
cp = ficlStackPopPointer(
ficlVmGetDataStack(vm));
- strcat(line, " ");
- strncat(line, cp, len);
+ (void) strcat(line, " ");
+ (void) strncat(line, cp, len);
}
} else {
/* Get remainder of invocation */
@@ -554,10 +556,10 @@ bf_command(ficlVm *vm)
;
line = malloc(strlen(name) + len + 2);
- strcpy(line, name);
+ (void) strcpy(line, name);
if (len > 0) {
- strcat(line, " ");
- strncat(line, tail, len);
+ (void) strcat(line, " ");
+ (void) strncat(line, tail, len);
ficlVmUpdateTib(vm, tail + len);
}
}
@@ -755,6 +757,7 @@ bf_init(const char *rc, ficlOutputFunction out)
COMMAND_SET(cmdp, "reboot", "reboot the system", command_reboot);
STAILQ_INSERT_TAIL(&commands, cmdp, next);
COMMAND_SET(cmdp, "sifting", "find words", command_sifting);
+ STAILQ_INSERT_TAIL(&commands, cmdp, next);
COMMAND_SET(cmdp, "framebuffer", "framebuffer mode management",
command_framebuffer);
STAILQ_INSERT_TAIL(&commands, cmdp, next);
@@ -800,14 +803,14 @@ bf_init(const char *rc, ficlOutputFunction out)
dict = ficlSystemGetDictionary(bf_sys);
cmdp = NULL;
STAILQ_FOREACH(cmdp, &commands, next) {
- ficlDictionaryAppendPrimitive(dict, (char *)cmdp->c_name,
+ (void) ficlDictionaryAppendPrimitive(dict, (char *)cmdp->c_name,
bf_command, FICL_WORD_DEFAULT);
rv = ficlVmEvaluate(bf_vm, "forth definitions builtins");
if (rv != FICL_VM_STATUS_OUT_OF_TEXT) {
printf("error interpreting forth: %d\n", rv);
exit(1);
}
- snprintf(create_buf, sizeof (create_buf), "builtin: %s",
+ (void) snprintf(create_buf, sizeof (create_buf), "builtin: %s",
cmdp->c_name);
rv = ficlVmEvaluate(bf_vm, create_buf);
if (rv != FICL_VM_STATUS_OUT_OF_TEXT) {
@@ -831,7 +834,7 @@ bf_init(const char *rc, ficlOutputFunction out)
* loader/host version
*/
env = ficlSystemGetEnvironment(bf_sys);
- ficlDictionarySetConstant(env, "loader_version",
+ (void) ficlDictionarySetConstant(env, "loader_version",
(bootprog_rev[0] - '0') * 10 + (bootprog_rev[2] - '0'));
/* try to load and run init file if present */
@@ -841,7 +844,7 @@ bf_init(const char *rc, ficlOutputFunction out)
fd = open(rc, O_RDONLY);
if (fd != -1) {
(void) ficlExecFD(bf_vm, fd);
- close(fd);
+ (void) close(fd);
}
}
@@ -889,7 +892,7 @@ bf_run(char *line)
}
}
- setenv("interpret", bf_vm->state ? "" : "ok", 1);
+ (void) setenv("interpret", bf_vm->state ? "" : "ok", 1);
return (result);
}
@@ -971,34 +974,34 @@ ngets(char *buf, int n)
case '\n':
case '\r':
*lp = '\0';
- putchar('\n');
- return;
+ (void) putchar('\n');
+ return;
case '\b':
case '\177':
if (lp > buf) {
lp--;
- putchar('\b');
- putchar(' ');
- putchar('\b');
+ (void) putchar('\b');
+ (void) putchar(' ');
+ (void) putchar('\b');
}
- break;
+ break;
case 'r'&037: {
char *p;
- putchar('\n');
+ (void) putchar('\n');
for (p = buf; p < lp; ++p)
- putchar(*p);
- break;
+ (void) putchar(*p);
+ break;
}
case 'u'&037:
case 'w'&037:
lp = buf;
- putchar('\n');
- break;
+ (void) putchar('\n');
+ break;
default:
if ((n < 1) || ((lp - buf) < n - 1)) {
*lp++ = c;
- putchar(c);
+ (void) putchar(c);
}
}
/*NOTREACHED*/
@@ -1048,9 +1051,9 @@ unargv(int argc, char *argv[])
cp = malloc(hlong);
cp[0] = 0;
for (i = 0; i < argc; i++) {
- strcat(cp, argv[i]);
+ (void) strcat(cp, argv[i]);
if (i < (argc - 1))
- strcat(cp, " ");
+ (void) strcat(cp, " ");
}
return (cp);
@@ -1119,19 +1122,19 @@ help_emitsummary(char *topic, char *subtopic, char *desc)
{
int i;
- pager_output(" ");
- pager_output(topic);
+ (void) pager_output(" ");
+ (void) pager_output(topic);
i = strlen(topic);
if (subtopic != NULL) {
- pager_output(" ");
- pager_output(subtopic);
+ (void) pager_output(" ");
+ (void) pager_output(subtopic);
i += strlen(subtopic) + 1;
}
if (desc != NULL) {
do {
- pager_output(" ");
+ (void) pager_output(" ");
} while (i++ < 30);
- pager_output(desc);
+ (void) pager_output(desc);
}
return (pager_output("\n"));
}
@@ -1144,7 +1147,7 @@ command_help(int argc, char *argv[])
char *topic, *subtopic, *t, *s, *d;
/* page the help text from our load path */
- snprintf(buf, sizeof (buf), "/boot/loader.help");
+ (void) snprintf(buf, sizeof (buf), "/boot/loader.help");
if ((hfd = open(buf, O_RDONLY)) < 0) {
printf("Verbose help not available, "
"use '?' to list commands\n");
@@ -1165,7 +1168,7 @@ command_help(int argc, char *argv[])
break;
default:
command_errmsg = "usage is 'help <topic> [<subtopic>]";
- close(hfd);
+ (void) close(hfd);
return (CMD_ERROR);
}
@@ -1214,9 +1217,9 @@ command_help(int argc, char *argv[])
free(s);
free(d);
pager_close();
- close(hfd);
+ (void) close(hfd);
if (!matched) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"no help available for '%s'", topic);
free(topic);
free(subtopic);
@@ -1242,10 +1245,10 @@ command_commandlist(int argc __unused, char *argv[] __unused)
if (res)
break;
if (cmdp->c_name != NULL && cmdp->c_desc != NULL) {
- snprintf(name, sizeof (name), " %-15s ",
+ (void) snprintf(name, sizeof (name), " %-15s ",
cmdp->c_name);
- pager_output(name);
- pager_output(cmdp->c_desc);
+ (void) pager_output(name);
+ (void) pager_output(cmdp->c_desc);
res = pager_output("\n");
}
}
@@ -1269,11 +1272,11 @@ command_show(int argc, char *argv[])
*/
pager_open();
for (ev = _environ; *ev != NULL; ev++) {
- pager_output(*ev);
+ (void) pager_output(*ev);
cp = getenv(*ev);
if (cp != NULL) {
- pager_output("=");
- pager_output(cp);
+ (void) pager_output("=");
+ (void) pager_output(cp);
}
if (pager_output("\n"))
break;
@@ -1283,7 +1286,7 @@ command_show(int argc, char *argv[])
if ((cp = getenv(argv[1])) != NULL) {
printf("%s\n", cp);
} else {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"variable '%s' not found", argv[1]);
return (CMD_ERROR);
}
@@ -1419,7 +1422,7 @@ command_read(int argc, char *argv[])
case 't':
timeout = strtol(optarg, &cp, 0);
if (cp == optarg) {
- snprintf(command_errbuf,
+ (void) snprintf(command_errbuf,
sizeof (command_errbuf),
"bad timeout '%s'", optarg);
return (CMD_ERROR);
@@ -1446,7 +1449,7 @@ command_read(int argc, char *argv[])
ngets(buf, sizeof (buf));
if (name != NULL)
- setenv(name, buf, 1);
+ (void) setenv(name, buf, 1);
return (CMD_OK);
}
@@ -1464,7 +1467,7 @@ command_more(int argc, char *argv[])
res = 0;
pager_open();
for (i = 1; (i < argc) && (res == 0); i++) {
- snprintf(line, sizeof (line), "*** FILE %s BEGIN ***\n",
+ (void) snprintf(line, sizeof (line), "*** FILE %s BEGIN ***\n",
argv[i]);
if (pager_output(line))
break;
@@ -1472,8 +1475,8 @@ command_more(int argc, char *argv[])
res = page_file(name);
free(name);
if (!res) {
- snprintf(line, sizeof (line), "*** FILE %s END ***\n",
- argv[i]);
+ (void) snprintf(line, sizeof (line),
+ "*** FILE %s END ***\n", argv[i]);
res = pager_output(line);
}
}
@@ -1492,7 +1495,7 @@ page_file(char *filename)
result = pager_file(filename);
if (result == -1) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"error showing %s", filename);
}
@@ -1543,8 +1546,8 @@ command_ls(int argc, char *argv[])
}
dir = fdopendir(fd);
pager_open();
- pager_output(path);
- pager_output("\n");
+ (void) pager_output(path);
+ (void) pager_output("\n");
while ((d = readdir(dir)) != NULL) {
if (strcmp(d->d_name, ".") && strcmp(d->d_name, "..")) {
@@ -1553,21 +1556,24 @@ command_ls(int argc, char *argv[])
sb.st_mode = 0;
buf = malloc(strlen(path) + strlen(d->d_name) + 2);
if (path[0] == '\0') {
- snprintf(buf, sizeof (buf), "%s", d->d_name);
- } else {
- snprintf(buf, sizeof (buf), "%s/%s", path,
+ (void) snprintf(buf, sizeof (buf), "%s",
d->d_name);
+ } else {
+ (void) snprintf(buf, sizeof (buf), "%s/%s",
+ path, d->d_name);
}
/* ignore return, could be symlink, etc. */
if (stat(buf, &sb))
sb.st_size = 0;
free(buf);
if (verbose) {
- snprintf(lbuf, sizeof (lbuf), " %c %8d %s\n",
+ (void) snprintf(lbuf, sizeof (lbuf),
+ " %c %8d %s\n",
typestr[sb.st_mode >> 12],
(int)sb.st_size, d->d_name);
} else {
- snprintf(lbuf, sizeof (lbuf), " %c %s\n",
+ (void) snprintf(lbuf, sizeof (lbuf),
+ " %c %s\n",
typestr[sb.st_mode >> 12], d->d_name);
}
if (pager_output(lbuf))
@@ -1577,7 +1583,7 @@ command_ls(int argc, char *argv[])
out:
pager_close();
if (fd != -1)
- closedir(dir);
+ (void) closedir(dir);
if (path != NULL)
free(path);
return (result);
@@ -1598,32 +1604,32 @@ ls_getdir(char **pathp)
/* one extra byte for a possible trailing slash required */
path = malloc(strlen(*pathp) + 2);
- strcpy(path, *pathp);
+ (void) strcpy(path, *pathp);
/* Make sure the path is respectable to begin with */
if ((cp = get_dev(path)) == NULL) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"bad path '%s'", path);
goto out;
}
/* If there's no path on the device, assume '/' */
if (*cp == 0)
- strcat(path, "/");
+ (void) strcat(path, "/");
fd = open(cp, O_RDONLY);
if (fd < 0) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"open '%s' failed: %s", path, strerror(errno));
goto out;
}
if (fstat(fd, &sb) < 0) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"stat failed: %s", strerror(errno));
goto out;
}
if (!S_ISDIR(sb.st_mode)) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"%s: %s", path, strerror(ENOTDIR));
goto out;
}
@@ -1637,7 +1643,7 @@ out:
free(path);
*pathp = NULL;
if (fd != -1)
- close(fd);
+ (void) close(fd);
return (-1);
}
@@ -1689,7 +1695,7 @@ include(const char *filename)
path = get_dev(filename);
if (((fd = open(path, O_RDONLY)) == -1)) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"can't open '%s': %s", filename,
strerror(errno));
free(path);
@@ -1723,12 +1729,12 @@ include(const char *filename)
script = script->next;
free(se);
}
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"file '%s' line %d: memory allocation "
"failure - aborting", filename, line);
return (CMD_ERROR);
}
- strcpy(sp->text, cp);
+ (void) strcpy(sp->text, cp);
sp->line = line;
sp->next = NULL;
@@ -1739,7 +1745,7 @@ include(const char *filename)
}
se = sp;
}
- close(fd);
+ (void) close(fd);
/*
* Execute the script
@@ -1753,7 +1759,7 @@ include(const char *filename)
for (sp = script; sp != NULL; sp = sp->next) {
res = bf_run(sp->text);
if (res != FICL_VM_STATUS_OUT_OF_TEXT) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"Error while including %s, in the line %d:\n%s",
filename, sp->line, sp->text);
res = CMD_ERROR;
@@ -1966,11 +1972,11 @@ command_load(int argc, char *argv[])
filename = file_search(argv[1]);
if (filename == NULL) {
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"can't find '%s'", argv[1]);
return (CMD_ERROR);
}
- setenv("kernelname", filename, 1);
+ (void) setenv("kernelname", filename, 1);
return (CMD_OK);
}
@@ -1978,7 +1984,7 @@ command_load(int argc, char *argv[])
static int
command_unload(int argc, char *argv[])
{
- unsetenv("kernelname");
+ (void) unsetenv("kernelname");
return (CMD_OK);
}
@@ -2026,7 +2032,7 @@ command_framebuffer(int argc, char *argv[])
if (argc == 2 && strcmp(argv[1], "off") == 0)
return (CMD_OK);
- snprintf(command_errbuf, sizeof (command_errbuf),
+ (void) snprintf(command_errbuf, sizeof (command_errbuf),
"usage: %s get | list", argv[0]);
return (CMD_ERROR);
}
diff --git a/usr/src/common/ficl/extras.c b/usr/src/common/ficl/extras.c
index 431a898ce1..2174f7a027 100644
--- a/usr/src/common/ficl/extras.c
+++ b/usr/src/common/ficl/extras.c
@@ -16,12 +16,12 @@ ficlPrimitiveSystem(ficlVm *vm)
{
ficlCountedString *counted = (ficlCountedString *)vm->pad;
- ficlVmGetString(vm, counted, '\n');
+ (void) ficlVmGetString(vm, counted, '\n');
if (FICL_COUNTED_STRING_GET_LENGTH(*counted) > 0) {
int returnValue = \
system(FICL_COUNTED_STRING_GET_POINTER(*counted));
if (returnValue) {
- sprintf(vm->pad, "System call returned %d\n",
+ (void) sprintf(vm->pad, "System call returned %d\n",
returnValue);
ficlVmTextOut(vm, vm->pad);
ficlVmThrow(vm, FICL_VM_STATUS_QUIT);
@@ -51,7 +51,7 @@ ficlPrimitiveLoad(ficlVm *vm)
ficlCell oldSourceId;
ficlString s;
- ficlVmGetString(vm, counted, '\n');
+ (void) ficlVmGetString(vm, counted, '\n');
if (FICL_COUNTED_STRING_GET_LENGTH(*counted) <= 0) {
ficlVmTextOut(vm, "Warning (load): nothing happened\n");
@@ -95,7 +95,7 @@ ficlPrimitiveLoad(ficlVm *vm)
default:
vm->sourceId = oldSourceId;
- fclose(f);
+ (void) fclose(f);
ficlVmThrowError(vm, "Error loading file <%s> line %d",
FICL_COUNTED_STRING_GET_POINTER(*counted), line);
break;
@@ -107,10 +107,10 @@ ficlPrimitiveLoad(ficlVm *vm)
*/
vm->sourceId.i = -1;
FICL_STRING_SET_FROM_CSTRING(s, "");
- ficlVmExecuteString(vm, s);
+ (void) ficlVmExecuteString(vm, s);
vm->sourceId = oldSourceId;
- fclose(f);
+ (void) fclose(f);
/* handle "bye" in loaded files. --lch */
if (result == FICL_VM_STATUS_USER_EXIT)
@@ -148,18 +148,18 @@ ficlPrimitiveSpewHash(ficlVm *vm)
word = word->link;
}
- fprintf(f, "%d\t%d", i, n);
+ (void) fprintf(f, "%d\t%d", i, n);
word = hash->table[i];
while (word) {
- fprintf(f, "\t%s", word->name);
+ (void) fprintf(f, "\t%s", word->name);
word = word->link;
}
- fprintf(f, "\n");
+ (void) fprintf(f, "\n");
}
- fclose(f);
+ (void) fclose(f);
}
static void
@@ -173,12 +173,12 @@ ficlSystemCompileExtras(ficlSystem *system)
{
ficlDictionary *dictionary = ficlSystemGetDictionary(system);
- ficlDictionarySetPrimitive(dictionary, "break", ficlPrimitiveBreak,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "load", ficlPrimitiveLoad,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "spewhash",
+ (void) ficlDictionarySetPrimitive(dictionary, "break",
+ ficlPrimitiveBreak, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "load",
+ ficlPrimitiveLoad, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "spewhash",
ficlPrimitiveSpewHash, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "system", ficlPrimitiveSystem,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "system",
+ ficlPrimitiveSystem, FICL_WORD_DEFAULT);
}
diff --git a/usr/src/common/ficl/ficl.h b/usr/src/common/ficl/ficl.h
index d2ae023304..2325715520 100644
--- a/usr/src/common/ficl/ficl.h
+++ b/usr/src/common/ficl/ficl.h
@@ -151,6 +151,7 @@ extern "C" {
#include <stdint.h>
#include <string.h>
+#define __dead2 __NORETURN
extern void pager_open(void);
extern int pager_output(const char *);
extern void pager_close(void);
@@ -1073,9 +1074,9 @@ FICL_PLATFORM_EXTERN void ficlVmReset(ficlVm *vm);
FICL_PLATFORM_EXTERN void
ficlVmSetTextOut(ficlVm *vm, ficlOutputFunction textOut);
FICL_PLATFORM_EXTERN void ficlVmThrow(ficlVm *vm, int except);
-FICL_PLATFORM_EXTERN void ficlVmThrowError(ficlVm *vm, char *fmt, ...);
+FICL_PLATFORM_EXTERN void ficlVmThrowError(ficlVm *vm, char *fmt, ...) __dead2;
FICL_PLATFORM_EXTERN void
-ficlVmThrowErrorVararg(ficlVm *vm, char *fmt, va_list list);
+ficlVmThrowErrorVararg(ficlVm *vm, char *fmt, va_list list) __dead2;
FICL_PLATFORM_EXTERN void ficlVmTextOut(ficlVm *vm, char *text);
FICL_PLATFORM_EXTERN void ficlVmErrorOut(ficlVm *vm, char *text);
diff --git a/usr/src/common/ficl/ficlplatform/pager.c b/usr/src/common/ficl/ficlplatform/pager.c
index 115353d181..0057f89cf6 100644
--- a/usr/src/common/ficl/ficlplatform/pager.c
+++ b/usr/src/common/ficl/ficlplatform/pager.c
@@ -58,7 +58,7 @@ pager_open(void)
struct termios raw;
struct winsize ws;
- tcgetattr(0, &orig_termios);
+ (void) tcgetattr(0, &orig_termios);
raw = orig_termios;
raw.c_lflag &= ~(ICANON | ECHO);
raw.c_cc[VMIN] = 1;
@@ -111,7 +111,7 @@ pager_output(const char *cp)
if (*cp == 0)
return (0);
- putchar(*cp); /* always emit character */
+ (void) putchar(*cp); /* always emit character */
if (*(cp++) == '\n') { /* got a newline? */
p_freelines--;
@@ -177,6 +177,6 @@ pager_file(const char *fname)
break;
}
}
- close(fd);
+ (void) close(fd);
return (result);
}
diff --git a/usr/src/common/ficl/ficltokens.h b/usr/src/common/ficl/ficltokens.h
index 09c0f37479..891ba05487 100644
--- a/usr/src/common/ficl/ficltokens.h
+++ b/usr/src/common/ficl/ficltokens.h
@@ -1,270 +1,312 @@
-FICL_TOKEN(ficlInstructionInvalid, "** invalid **")
-FICL_TOKEN(ficlInstruction1, "1")
-FICL_TOKEN(ficlInstruction2, "2")
-FICL_TOKEN(ficlInstruction3, "3")
-FICL_TOKEN(ficlInstruction4, "4")
-FICL_TOKEN(ficlInstruction5, "5")
-FICL_TOKEN(ficlInstruction6, "6")
-FICL_TOKEN(ficlInstruction7, "7")
-FICL_TOKEN(ficlInstruction8, "8")
-FICL_TOKEN(ficlInstruction9, "9")
-FICL_TOKEN(ficlInstruction10, "10")
-FICL_TOKEN(ficlInstruction11, "11")
-FICL_TOKEN(ficlInstruction12, "12")
-FICL_TOKEN(ficlInstruction13, "13")
-FICL_TOKEN(ficlInstruction14, "14")
-FICL_TOKEN(ficlInstruction15, "15")
-FICL_TOKEN(ficlInstruction16, "16")
-FICL_TOKEN(ficlInstruction0, "0")
-FICL_TOKEN(ficlInstructionNeg1, "-1")
-FICL_TOKEN(ficlInstructionNeg2, "-2")
-FICL_TOKEN(ficlInstructionNeg3, "-3")
-FICL_TOKEN(ficlInstructionNeg4, "-4")
-FICL_TOKEN(ficlInstructionNeg5, "-5")
-FICL_TOKEN(ficlInstructionNeg6, "-6")
-FICL_TOKEN(ficlInstructionNeg7, "-7")
-FICL_TOKEN(ficlInstructionNeg8, "-8")
-FICL_TOKEN(ficlInstructionNeg9, "-9")
-FICL_TOKEN(ficlInstructionNeg10, "-10")
-FICL_TOKEN(ficlInstructionNeg11, "-11")
-FICL_TOKEN(ficlInstructionNeg12, "-12")
-FICL_TOKEN(ficlInstructionNeg13, "-13")
-FICL_TOKEN(ficlInstructionNeg14, "-14")
-FICL_TOKEN(ficlInstructionNeg15, "-15")
-FICL_TOKEN(ficlInstructionNeg16, "-16")
+ FICL_TOKEN(ficlInstructionInvalid, "** invalid **")
+ FICL_TOKEN(ficlInstruction1, "1")
+ FICL_TOKEN(ficlInstruction2, "2")
+ FICL_TOKEN(ficlInstruction3, "3")
+ FICL_TOKEN(ficlInstruction4, "4")
+ FICL_TOKEN(ficlInstruction5, "5")
+ FICL_TOKEN(ficlInstruction6, "6")
+ FICL_TOKEN(ficlInstruction7, "7")
+ FICL_TOKEN(ficlInstruction8, "8")
+ FICL_TOKEN(ficlInstruction9, "9")
+ FICL_TOKEN(ficlInstruction10, "10")
+ FICL_TOKEN(ficlInstruction11, "11")
+ FICL_TOKEN(ficlInstruction12, "12")
+ FICL_TOKEN(ficlInstruction13, "13")
+ FICL_TOKEN(ficlInstruction14, "14")
+ FICL_TOKEN(ficlInstruction15, "15")
+ FICL_TOKEN(ficlInstruction16, "16")
+ FICL_TOKEN(ficlInstruction0, "0")
+ FICL_TOKEN(ficlInstructionNeg1, "-1")
+ FICL_TOKEN(ficlInstructionNeg2, "-2")
+ FICL_TOKEN(ficlInstructionNeg3, "-3")
+ FICL_TOKEN(ficlInstructionNeg4, "-4")
+ FICL_TOKEN(ficlInstructionNeg5, "-5")
+ FICL_TOKEN(ficlInstructionNeg6, "-6")
+ FICL_TOKEN(ficlInstructionNeg7, "-7")
+ FICL_TOKEN(ficlInstructionNeg8, "-8")
+ FICL_TOKEN(ficlInstructionNeg9, "-9")
+ FICL_TOKEN(ficlInstructionNeg10, "-10")
+ FICL_TOKEN(ficlInstructionNeg11, "-11")
+ FICL_TOKEN(ficlInstructionNeg12, "-12")
+ FICL_TOKEN(ficlInstructionNeg13, "-13")
+ FICL_TOKEN(ficlInstructionNeg14, "-14")
+ FICL_TOKEN(ficlInstructionNeg15, "-15")
+ FICL_TOKEN(ficlInstructionNeg16, "-16")
#if FICL_WANT_FLOAT
-FICL_TOKEN(ficlInstructionF0, "0.0e")
-FICL_TOKEN(ficlInstructionF1, "1.0e")
-FICL_TOKEN(ficlInstructionFNeg1, "-1.0e")
+ FICL_TOKEN(ficlInstructionF0, "0.0e")
+ FICL_TOKEN(ficlInstructionF1, "1.0e")
+ FICL_TOKEN(ficlInstructionFNeg1, "-1.0e")
#endif /* FICL_WANT_FLOAT */
-FICL_INSTRUCTION_TOKEN(ficlInstructionPlus, "+", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionMinus, "-", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction1Plus, "1+", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction1Minus, "1-", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Plus, "2+", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Minus, "2-", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionSemiParen, "(;)", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionExitParen, "(exit)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionDup, "dup", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionSwap, "swap", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionGreaterThan, ">", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionUGreaterThan, "u>", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionBranchParenWithCheck, "(branch)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionBranchParen, "(branch-final)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionBranch0ParenWithCheck, "(branch0)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionBranch0Paren, "(branch0-final)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionLiteralParen, "(literal)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionLoopParen, "(loop)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionOfParen, "(of)", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionPlusLoopParen, "(+loop)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFetch, "@", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionStore, "!", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionComma, ",", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCComma, "c,", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCells, "cells", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCellPlus, "cell+", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionNegate, "negate", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionStar, "*", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionSlash, "/", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionStarSlash, "*/", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionSlashMod, "/mod", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionStarSlashMod, "*/mod", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Star, "2*", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Slash, "2/", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionPlus, "+", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionMinus, "-", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction1Plus, "1+", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction1Minus, "1-", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Plus, "2+", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Minus, "2-", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionSemiParen, "(;)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionExitParen, "(exit)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionDup, "dup", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionSwap, "swap", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionGreaterThan, ">",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionUGreaterThan, "u>",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionBranchParenWithCheck, "(branch)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionBranchParen, "(branch-final)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionBranch0ParenWithCheck,
+ "(branch0)", FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionBranch0Paren, "(branch0-final)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionLiteralParen, "(literal)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionLoopParen, "(loop)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionOfParen, "(of)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionPlusLoopParen, "(+loop)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFetch, "@", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionStore, "!", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionComma, ",", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCComma, "c,", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCells, "cells", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCellPlus, "cell+",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionNegate, "negate",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionStar, "*", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionSlash, "/", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionStarSlash, "*/",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionSlashMod, "/mod",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionStarSlashMod, "*/mod",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Star, "2*", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Slash, "2/", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionColonParen, "** (colon) **",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionVariableParen, "(variable)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionConstantParen, "(constant)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2ConstantParen, "(2constant)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2LiteralParen, "(2literal)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionDoDoes, "** do-does **",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionDoParen, "(do)", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionDoesParen, "(does)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionQDoParen, "(?do)", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCreateParen, "(create)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionStringLiteralParen, "(.\")",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCStringLiteralParen, "(c\")",
- FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionColonParen, "** (colon) **",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionVariableParen, "(variable)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionConstantParen, "(constant)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2ConstantParen, "(2constant)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2LiteralParen, "(2literal)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionDoDoes, "** do-does **",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionDoParen, "(do)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionDoesParen, "(does)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionQDoParen, "(?do)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCreateParen, "(create)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionStringLiteralParen, "(.\")",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCStringLiteralParen, "(c\")",
+ FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionPlusStore, "+!", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction0Less, "0<", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction0Greater, "0>", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction0Equals, "0=", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Store, "2!", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Fetch, "2@", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionOver, "over", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionRot, "rot", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Drop, "2drop", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Dup, "2dup", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Over, "2over", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2Swap, "2swap", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFromRStack, "r>", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFetchRStack, "r@", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2ToR, "2>r", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2RFrom, "2r>", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstruction2RFetch, "2r@", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionLess, "<", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionEquals, "=", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionToRStack, ">r", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionQuestionDup, "?dup", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionAnd, "and", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCStore, "c!", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCFetch, "c@", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionDrop, "drop", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionPick, "pick", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionRoll, "roll", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionMinusRoll, "-roll", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionMinusRot, "-rot", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFill, "fill", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionSToD, "s>d", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionULess, "u<", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionPlusStore, "+!",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction0Less, "0<", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction0Greater, "0>", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction0Equals, "0=", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Store, "2!", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Fetch, "2@", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionOver, "over", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionRot, "rot", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Drop, "2drop", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Dup, "2dup", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Over, "2over", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2Swap, "2swap", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFromRStack, "r>",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFetchRStack, "r@",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2ToR, "2>r",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2RFrom, "2r>",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstruction2RFetch, "2r@",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionLess, "<", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionEquals, "=", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionToRStack, ">r",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionQuestionDup, "?dup",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionAnd, "and", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCStore, "c!", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCFetch, "c@", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionDrop, "drop", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionPick, "pick", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionRoll, "roll", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionMinusRoll, "-roll",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionMinusRot, "-rot",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFill, "fill", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionSToD, "s>d", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionULess, "u<", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionQuadFetch, "q@", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionQuadStore, "q!", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionWFetch, "w@", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionWStore, "w!", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionQuadFetch, "q@",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionQuadStore, "q!",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionWFetch, "w@", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionWStore, "w!", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionInvert, "invert", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionLShift, "lshift", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionMax, "max", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionMin, "min", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionMove, "move", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionOr, "or", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionRShift, "rshift", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionXor, "xor", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionInvert, "invert",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionLShift, "lshift",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionMax, "max", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionMin, "min", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionMove, "move", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionOr, "or", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionRShift, "rshift",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionXor, "xor", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionI, "i", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionJ, "j", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionK, "k", FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionI, "i", FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionJ, "j", FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionK, "k", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCompare, "compare", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionCompareInsensitive, "compare-insensitive",
- FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionRandom, "random", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionSeedRandom, "seed-random",
- FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCompare, "compare",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionCompareInsensitive,
+ "compare-insensitive", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionRandom, "random",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionSeedRandom, "seed-random",
+ FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionLeave, "leave", FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionUnloop, "unloop", FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionLeave, "leave",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionUnloop, "unloop",
+ FICL_WORD_COMPILE_ONLY)
#if FICL_WANT_USER
-FICL_INSTRUCTION_TOKEN(ficlInstructionUserParen, "(user)", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionUserParen, "(user)",
+ FICL_WORD_DEFAULT)
#endif /* FICL_WANT_USER */
#if FICL_WANT_LOCALS
-FICL_INSTRUCTION_TOKEN(ficlInstructionLinkParen, "(link)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionUnlinkParen, "(unlink)",
- FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionLinkParen, "(link)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionUnlinkParen, "(unlink)",
+ FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionGetLocalParen, "(@local)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionGet2LocalParen, "(@2Local)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionToLocalParen, "(toLocal)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionTo2LocalParen, "(to2Local)",
- FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionGetLocalParen, "(@local)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionGet2LocalParen, "(@2Local)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionToLocalParen, "(toLocal)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionTo2LocalParen, "(to2Local)",
+ FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionGetLocal0, "(@local0)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionGet2Local0, "(@2Local0)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionToLocal0, "(toLocal0)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionTo2Local0, "(To2Local0)",
- FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionGetLocal0, "(@local0)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionGet2Local0, "(@2Local0)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionToLocal0, "(toLocal0)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionTo2Local0, "(To2Local0)",
+ FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionGetLocal1, "(@local1)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionToLocal1, "(toLocal1)",
- FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionGetLocal1, "(@local1)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionToLocal1, "(toLocal1)",
+ FICL_WORD_COMPILE_ONLY)
#if FICL_WANT_FLOAT
-FICL_INSTRUCTION_TOKEN(ficlInstructionGetFLocalParen, "(@fLocal)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionGetF2LocalParen, "(@f2Local)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionToFLocalParen, "(toFLocal)",
- FICL_WORD_COMPILE_ONLY)
-FICL_INSTRUCTION_TOKEN(ficlInstructionToF2LocalParen, "(toF2Local)",
- FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionGetFLocalParen, "(@fLocal)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionGetF2LocalParen, "(@f2Local)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionToFLocalParen, "(toFLocal)",
+ FICL_WORD_COMPILE_ONLY)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionToF2LocalParen, "(toF2Local)",
+ FICL_WORD_COMPILE_ONLY)
#endif /* FICL_WANT_FLOAT */
#endif /* FICL_WANT_LOCALS */
#if FICL_WANT_FLOAT
-FICL_INSTRUCTION_TOKEN(ficlInstructionFLiteralParen, "(fliteral)",
- FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFConstantParen, "(fconstant)",
- FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF2ConstantParen, "(f2constant)",
- FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFLiteralParen, "(fliteral)",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFConstantParen, "(fconstant)",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF2ConstantParen, "(f2constant)",
+ FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFPlus, "f+", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFMinus, "f-", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFStar, "f*", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFSlash, "f/", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFNegate, "fnegate", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFPlusI, "f+i", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFMinusI, "f-i", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFStarI, "f*i", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFSlashI, "f/i", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionIMinusF, "i-f", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionISlashF, "i/f", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFPlus, "f+", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFMinus, "f-", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFStar, "f*", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFSlash, "f/", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFNegate, "fnegate",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFPlusI, "f+i", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFMinusI, "f-i", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFStarI, "f*i", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFSlashI, "f/i", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionIMinusF, "i-f", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionISlashF, "i/f", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFFrom, "float>", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionToF, ">float", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionIntToFloat, "int>float",
- FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFloatToInt, "float>int",
- FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFFrom, "float>",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionToF, ">float", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionIntToFloat, "int>float",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFloatToInt, "float>int",
+ FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFFetch, "f@", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFStore, "f!", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF2Fetch, "f2@", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF2Store, "f2!", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFPlusStore, "f+!", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFFetch, "f@", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFStore, "f!", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF2Fetch, "f2@", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF2Store, "f2!", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFPlusStore, "f+!",
+ FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFDrop, "fdrop", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF2Drop, "f2drop", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFDup, "fdup", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF2Dup, "f2dup", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFMinusRoll, "f-roll", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFMinusRot, "f-rot", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFQuestionDup, "f?dup", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFOver, "fover", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF2Over, "f2over", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFPick, "fpick", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFRoll, "froll", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFRot, "frot", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFSwap, "fswap", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF2Swap, "f2swap", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFDrop, "fdrop", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF2Drop, "f2drop",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFDup, "fdup", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF2Dup, "f2dup", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFMinusRoll, "f-roll",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFMinusRot, "f-rot",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFQuestionDup, "f?dup",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFOver, "fover", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF2Over, "f2over",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFPick, "fpick", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFRoll, "froll", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFRot, "frot", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFSwap, "fswap", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF2Swap, "f2swap",
+ FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF0Less, "f0<", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFLess, "f<", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF0Equals, "f0=", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFEquals, "f=", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionF0Greater, "f0>", FICL_WORD_DEFAULT)
-FICL_INSTRUCTION_TOKEN(ficlInstructionFGreater, "f>", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF0Less, "f0<", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFLess, "f<", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF0Equals, "f0=",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFEquals, "f=", FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionF0Greater, "f0>",
+ FICL_WORD_DEFAULT)
+ FICL_INSTRUCTION_TOKEN(ficlInstructionFGreater, "f>", FICL_WORD_DEFAULT)
#endif /* FICL_WANT_FLOAT */
-FICL_TOKEN(ficlInstructionExitInnerLoop, "** exit inner loop **")
+ FICL_TOKEN(ficlInstructionExitInnerLoop, "** exit inner loop **")
diff --git a/usr/src/common/ficl/float.c b/usr/src/common/ficl/float.c
index c19648c040..d5ec554cf7 100644
--- a/usr/src/common/ficl/float.c
+++ b/usr/src/common/ficl/float.c
@@ -60,7 +60,7 @@ ficlPrimitiveFConstant(ficlVm *vm)
FICL_STACK_CHECK(vm->floatStack, 1, 0);
- ficlDictionaryAppendWord(dictionary, name,
+ (void) ficlDictionaryAppendWord(dictionary, name,
(ficlPrimitive)ficlInstructionFConstantParen, FICL_WORD_DEFAULT);
ficlDictionaryAppendCell(dictionary, ficlStackPop(vm->floatStack));
}
@@ -98,7 +98,7 @@ ficlPrimitiveF2Constant(ficlVm *vm)
FICL_STACK_CHECK(vm->floatStack, 2, 0);
- ficlDictionaryAppendWord(dictionary, name,
+ (void) ficlDictionaryAppendWord(dictionary, name,
(ficlPrimitive)ficlInstructionF2ConstantParen, FICL_WORD_DEFAULT);
ficlDictionaryAppendCell(dictionary, ficlStackPop(vm->floatStack));
ficlDictionaryAppendCell(dictionary, ficlStackPop(vm->floatStack));
@@ -136,7 +136,7 @@ ficlPrimitiveFDot(ficlVm *vm)
FICL_STACK_CHECK(vm->floatStack, 1, 0);
f = ficlStackPopFloat(vm->floatStack);
- sprintf(vm->pad, "%#f ", f);
+ (void) sprintf(vm->pad, "%#f ", f);
ficlVmTextOut(vm, vm->pad);
}
@@ -152,7 +152,7 @@ ficlPrimitiveEDot(ficlVm *vm)
FICL_STACK_CHECK(vm->floatStack, 1, 0);
f = ficlStackPopFloat(vm->floatStack);
- sprintf(vm->pad, "%#e ", f);
+ (void) sprintf(vm->pad, "%#e ", f);
ficlVmTextOut(vm, vm->pad);
}
@@ -173,10 +173,11 @@ ficlFloatStackDisplayCallback(void *c, ficlCell *cell)
struct stackContext *context = (struct stackContext *)c;
char buffer[80];
#ifdef _LP64
- snprintf(buffer, sizeof (buffer), "[0x%016lx %3d] %20e (0x%016lx)\n",
+ (void) snprintf(buffer, sizeof (buffer),
+ "[0x%016lx %3d] %20e (0x%016lx)\n",
(unsigned long) cell, context->count++, cell->f, cell->u);
#else
- snprintf(buffer, sizeof (buffer), "[0x%08x %3d] %12e (0x%08x)\n",
+ (void) snprintf(buffer, sizeof (buffer), "[0x%08x %3d] %12e (0x%08x)\n",
(unsigned)cell, context->count++, cell->f, cell->u);
#endif
ficlVmTextOut(context->vm, buffer);
@@ -417,31 +418,31 @@ ficlSystemCompileFloat(ficlSystem *system)
FICL_SYSTEM_ASSERT(system, environment);
#if FICL_WANT_LOCALS
- ficlDictionarySetPrimitive(dictionary, "(flocal)",
+ (void) ficlDictionarySetPrimitive(dictionary, "(flocal)",
ficlPrimitiveFLocalParen, FICL_WORD_COMPILE_ONLY);
- ficlDictionarySetPrimitive(dictionary, "(f2local)",
+ (void) ficlDictionarySetPrimitive(dictionary, "(f2local)",
ficlPrimitiveF2LocalParen, FICL_WORD_COMPILE_ONLY);
#endif /* FICL_WANT_LOCALS */
#if FICL_WANT_FLOAT
- ficlDictionarySetPrimitive(dictionary, "fconstant",
+ (void) ficlDictionarySetPrimitive(dictionary, "fconstant",
ficlPrimitiveFConstant, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "fvalue",
+ (void) ficlDictionarySetPrimitive(dictionary, "fvalue",
ficlPrimitiveFConstant, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "f2constant",
+ (void) ficlDictionarySetPrimitive(dictionary, "f2constant",
ficlPrimitiveF2Constant, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "f2value",
+ (void) ficlDictionarySetPrimitive(dictionary, "f2value",
ficlPrimitiveF2Constant, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "fdepth", ficlPrimitiveFDepth,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "fliteral",
+ (void) ficlDictionarySetPrimitive(dictionary, "fdepth",
+ ficlPrimitiveFDepth, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "fliteral",
ficlPrimitiveFLiteralImmediate, FICL_WORD_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "f.", ficlPrimitiveFDot,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "f.s", ficlVmDisplayFloatStack,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "fe.", ficlPrimitiveEDot,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "f.",
+ ficlPrimitiveFDot, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "f.s",
+ ficlVmDisplayFloatStack, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "fe.",
+ ficlPrimitiveEDot, FICL_WORD_DEFAULT);
/*
* Missing words:
@@ -462,13 +463,14 @@ ficlSystemCompileFloat(ficlSystem *system)
#else
data.f = MAXFLOAT;
#endif
- ficlDictionarySetConstant(environment, "max-float", data.i);
+ (void) ficlDictionarySetConstant(environment, "max-float", data.i);
/* not all required words are present */
- ficlDictionarySetConstant(environment, "floating", FICL_FALSE);
- ficlDictionarySetConstant(environment, "floating-ext", FICL_FALSE);
- ficlDictionarySetConstant(environment, "floating-stack",
+ (void) ficlDictionarySetConstant(environment, "floating", FICL_FALSE);
+ (void) ficlDictionarySetConstant(environment, "floating-ext",
+ FICL_FALSE);
+ (void) ficlDictionarySetConstant(environment, "floating-stack",
system->stackSize);
#else
- ficlDictionarySetConstant(environment, "floating", FICL_FALSE);
+ (void) ficlDictionarySetConstant(environment, "floating", FICL_FALSE);
#endif
}
diff --git a/usr/src/common/ficl/loader.c b/usr/src/common/ficl/loader.c
index fe2268297b..f1a1827eb0 100644
--- a/usr/src/common/ficl/loader.c
+++ b/usr/src/common/ficl/loader.c
@@ -99,7 +99,7 @@ ficl_fb_putimage(ficlVm *pVM)
if (png_open(&png, name) == PNG_NO_ERROR) {
if (gfx_fb_putimage(&png, x1, y1, x2, y2, f) == 0)
ret = FICL_TRUE; /* success */
- png_close(&png);
+ (void) png_close(&png);
}
ficlFree(name);
ficlStackPushInteger(ficlVmGetDataStack(pVM), ret);
@@ -195,15 +195,15 @@ ficlSetenv(ficlVm *pVM)
name = (char *)ficlMalloc(names+1);
if (!name)
ficlVmThrowError(pVM, "Error: out of memory");
- strncpy(name, namep, names);
+ (void) strncpy(name, namep, names);
name[names] = '\0';
value = (char *)ficlMalloc(values+1);
if (!value)
ficlVmThrowError(pVM, "Error: out of memory");
- strncpy(value, valuep, values);
+ (void) strncpy(value, valuep, values);
value[values] = '\0';
- setenv(name, value, 1);
+ (void) setenv(name, value, 1);
ficlFree(name);
ficlFree(value);
}
@@ -225,16 +225,16 @@ ficlSetenvq(ficlVm *pVM)
name = (char *)ficlMalloc(names+1);
if (!name)
- ficlVmThrowError(pVM, "Error: out of memory");
- strncpy(name, namep, names);
+ (void) ficlVmThrowError(pVM, "Error: out of memory");
+ (void) strncpy(name, namep, names);
name[names] = '\0';
value = (char *)ficlMalloc(values+1);
if (!value)
ficlVmThrowError(pVM, "Error: out of memory");
- strncpy(value, valuep, values);
+ (void) strncpy(value, valuep, values);
value[values] = '\0';
- setenv(name, value, overwrite);
+ (void) setenv(name, value, overwrite);
ficlFree(name);
ficlFree(value);
}
@@ -254,7 +254,7 @@ ficlGetenv(ficlVm *pVM)
name = (char *)ficlMalloc(names+1);
if (!name)
ficlVmThrowError(pVM, "Error: out of memory");
- strncpy(name, namep, names);
+ (void) strncpy(name, namep, names);
name[names] = '\0';
value = getenv(name);
@@ -282,10 +282,10 @@ ficlUnsetenv(ficlVm *pVM)
name = (char *)ficlMalloc(names+1);
if (!name)
ficlVmThrowError(pVM, "Error: out of memory");
- strncpy(name, namep, names);
+ (void) strncpy(name, namep, names);
name[names] = '\0';
- unsetenv(name);
+ (void) unsetenv(name);
ficlFree(name);
}
@@ -538,7 +538,7 @@ static void displayCellNoPad(ficlVm *pVM)
FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 1, 0);
c = ficlStackPop(ficlVmGetDataStack(pVM));
- ficlLtoa((c).i, pVM->pad, pVM->base);
+ (void) ficlLtoa((c).i, pVM->pad, pVM->base);
ficlVmTextOut(pVM, pVM->pad);
}
@@ -626,7 +626,7 @@ pfclose(ficlVm *pVM)
fd = ficlStackPopInteger(ficlVmGetDataStack(pVM)); /* get fd */
if (fd != -1)
- close(fd);
+ (void) close(fd);
}
/*
@@ -665,7 +665,7 @@ static void pfopendir(ficlVm *pVM)
struct stat sb;
int fd;
#endif
- int count;
+ ficlInteger count;
char *ptr, *name;
ficlInteger flag = FICL_FALSE;
@@ -675,17 +675,31 @@ static void pfopendir(ficlVm *pVM)
ptr = ficlStackPopPointer(ficlVmGetDataStack(pVM)); /* get ptr */
if ((count < 0) || (ptr == NULL)) {
- ficlStackPushInteger(ficlVmGetDataStack(pVM), -1);
+ ficlStackPushInteger(ficlVmGetDataStack(pVM), flag);
return;
}
/* ensure that the string is null terminated */
- name = (char *)malloc(count+1);
+ if ((name = malloc(count + 1)) == NULL) {
+ ficlStackPushInteger(ficlVmGetDataStack(pVM), flag);
+ return;
+ }
+
bcopy(ptr, name, count);
name[count] = 0;
#ifndef _STANDALONE
tmp = get_dev(name);
free(name);
name = tmp;
+
+ dir = opendir(name);
+ if (dir == NULL) {
+ ficlStackPushInteger(ficlVmGetDataStack(pVM), flag);
+ return;
+ } else
+ flag = FICL_TRUE;
+
+ ficlStackPushPointer(ficlVmGetDataStack(pVM), dir);
+ ficlStackPushInteger(ficlVmGetDataStack(pVM), flag);
#else
fd = open(name, O_RDONLY);
free(name);
@@ -706,18 +720,6 @@ static void pfopendir(ficlVm *pVM)
close(fd);
ficlStackPushInteger(ficlVmGetDataStack(pVM), flag);
- return;
-#endif
-#ifndef _STANDALONE
- dir = opendir(name);
- if (dir == NULL) {
- ficlStackPushInteger(ficlVmGetDataStack(pVM), flag);
- return;
- } else
- flag = FICL_TRUE;
-
- ficlStackPushPointer(ficlVmGetDataStack(pVM), dir);
- ficlStackPushInteger(ficlVmGetDataStack(pVM), flag);
#endif
}
@@ -792,11 +794,11 @@ pfclosedir(ficlVm *pVM)
#ifndef _STANDALONE
dir = ficlStackPopPointer(ficlVmGetDataStack(pVM)); /* get dir */
if (dir != NULL)
- closedir(dir);
+ (void) closedir(dir);
#else
fd = ficlStackPopInteger(ficlVmGetDataStack(pVM)); /* get fd */
if (fd != -1)
- close(fd);
+ (void) close(fd);
#endif
}
@@ -813,7 +815,7 @@ static void pfload(ficlVm *pVM)
fd = ficlStackPopInteger(ficlVmGetDataStack(pVM)); /* get fd */
if (fd != -1)
- ficlExecFD(pVM, fd);
+ (void) ficlExecFD(pVM, fd);
}
/*
@@ -886,14 +888,14 @@ keyQuestion(ficlVm *pVM)
FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 0, 1);
#ifndef _STANDALONE
- tcgetattr(STDIN_FILENO, &oldt);
+ (void) tcgetattr(STDIN_FILENO, &oldt);
newt = oldt;
newt.c_lflag &= ~(ICANON | ECHO);
newt.c_cc[VMIN] = 0;
newt.c_cc[VTIME] = 0;
- tcsetattr(STDIN_FILENO, TCSANOW, &newt);
+ (void) tcsetattr(STDIN_FILENO, TCSANOW, &newt);
ch = getchar();
- tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
+ (void) tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
if (ch != -1)
(void) ungetc(ch, stdin);
@@ -935,7 +937,7 @@ ms(ficlVm *pVM)
FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 1, 0);
#ifndef _STANDALONE
- usleep(ficlStackPopUnsigned(ficlVmGetDataStack(pVM)) * 1000);
+ (void) usleep(ficlStackPopUnsigned(ficlVmGetDataStack(pVM)) * 1000);
#else
delay(ficlStackPopUnsigned(ficlVmGetDataStack(pVM)) * 1000);
#endif
@@ -984,57 +986,71 @@ ficlSystemCompilePlatform(ficlSystem *pSys)
FICL_SYSTEM_ASSERT(pSys, dp);
FICL_SYSTEM_ASSERT(pSys, env);
- ficlDictionarySetPrimitive(dp, ".#", displayCellNoPad,
+ (void) ficlDictionarySetPrimitive(dp, ".#", displayCellNoPad,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "isdir?", isdirQuestion,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "fopen", pfopen,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "fclose", pfclose,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "fread", pfread,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "fopendir", pfopendir,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "freaddir", pfreaddir,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "isdir?", isdirQuestion,
+ (void) ficlDictionarySetPrimitive(dp, "fclosedir", pfclosedir,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fopen", pfopen, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fclose", pfclose, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fread", pfread, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fopendir", pfopendir,
+ (void) ficlDictionarySetPrimitive(dp, "fload", pfload,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "freaddir", pfreaddir,
+ (void) ficlDictionarySetPrimitive(dp, "fkey", fkey,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fclosedir", pfclosedir,
+ (void) ficlDictionarySetPrimitive(dp, "fseek", pfseek,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "fwrite", pfwrite,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "key", key, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "key?", keyQuestion,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "ms", ms, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "seconds", pseconds,
+ FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "heap?", freeHeap,
+ FICL_WORD_DEFAULT);
+
+ (void) ficlDictionarySetPrimitive(dp, "setenv", ficlSetenv,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fload", pfload, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fkey", fkey, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fseek", pfseek, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fwrite", pfwrite, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "key", key, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "key?", keyQuestion, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "ms", ms, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "seconds", pseconds, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "heap?", freeHeap, FICL_WORD_DEFAULT);
-
- ficlDictionarySetPrimitive(dp, "setenv", ficlSetenv, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "setenv?", ficlSetenvq,
+ (void) ficlDictionarySetPrimitive(dp, "setenv?", ficlSetenvq,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "getenv", ficlGetenv, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "unsetenv", ficlUnsetenv,
+ (void) ficlDictionarySetPrimitive(dp, "getenv", ficlGetenv,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "copyin", ficlCopyin, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "copyout", ficlCopyout,
+ (void) ficlDictionarySetPrimitive(dp, "unsetenv", ficlUnsetenv,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "findfile", ficlFindfile,
+ (void) ficlDictionarySetPrimitive(dp, "copyin", ficlCopyin,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "ccall", ficlCcall, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "uuid-from-string", ficlUuidFromString,
+ (void) ficlDictionarySetPrimitive(dp, "copyout", ficlCopyout,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "uuid-to-string", ficlUuidToString,
+ (void) ficlDictionarySetPrimitive(dp, "findfile", ficlFindfile,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fb-setpixel", ficl_fb_setpixel,
+ (void) ficlDictionarySetPrimitive(dp, "ccall", ficlCcall,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fb-line", ficl_fb_line,
+ (void) ficlDictionarySetPrimitive(dp, "uuid-from-string",
+ ficlUuidFromString, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "uuid-to-string",
+ ficlUuidToString, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "fb-setpixel", ficl_fb_setpixel,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fb-bezier", ficl_fb_bezier,
+ (void) ficlDictionarySetPrimitive(dp, "fb-line", ficl_fb_line,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fb-drawrect", ficl_fb_drawrect,
+ (void) ficlDictionarySetPrimitive(dp, "fb-bezier", ficl_fb_bezier,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "fb-putimage", ficl_fb_putimage,
+ (void) ficlDictionarySetPrimitive(dp, "fb-drawrect", ficl_fb_drawrect,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dp, "term-drawrect", ficl_term_drawrect,
+ (void) ficlDictionarySetPrimitive(dp, "fb-putimage", ficl_fb_putimage,
FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "term-drawrect",
+ ficl_term_drawrect, FICL_WORD_DEFAULT);
#ifdef _STANDALONE
/* Register words from linker set. */
SET_FOREACH(fnpp, Xficl_compile_set)
@@ -1042,11 +1058,11 @@ ficlSystemCompilePlatform(ficlSystem *pSys)
#endif
#if defined(__i386__) || defined(__amd64__)
- ficlDictionarySetConstant(env, "arch-i386", FICL_TRUE);
- ficlDictionarySetConstant(env, "arch-sparc", FICL_FALSE);
+ (void) ficlDictionarySetConstant(env, "arch-i386", FICL_TRUE);
+ (void) ficlDictionarySetConstant(env, "arch-sparc", FICL_FALSE);
#endif
#ifdef __sparc
- ficlDictionarySetConstant(env, "arch-i386", FICL_FALSE);
- ficlDictionarySetConstant(env, "arch-sparc", FICL_TRUE);
+ (void) ficlDictionarySetConstant(env, "arch-i386", FICL_FALSE);
+ (void) ficlDictionarySetConstant(env, "arch-sparc", FICL_TRUE);
#endif
}
diff --git a/usr/src/common/ficl/prefix.c b/usr/src/common/ficl/prefix.c
index 8e396d92cb..8d46fb5c0f 100644
--- a/usr/src/common/ficl/prefix.c
+++ b/usr/src/common/ficl/prefix.c
@@ -155,7 +155,7 @@ ficlSystemCompilePrefix(ficlSystem *system)
/*
* Put __tempbase in the forth-wordlist
*/
- ficlDictionarySetPrimitive(dictionary, "__tempbase",
+ (void) ficlDictionarySetPrimitive(dictionary, "__tempbase",
ficlPrimitiveTempBase, FICL_WORD_DEFAULT);
/*
diff --git a/usr/src/common/ficl/primitives.c b/usr/src/common/ficl/primitives.c
index 63ec19c377..ba5ec42697 100644
--- a/usr/src/common/ficl/primitives.c
+++ b/usr/src/common/ficl/primitives.c
@@ -182,7 +182,7 @@ ficlPrimitiveColon(ficlVm *vm)
vm->state = FICL_VM_STATE_COMPILE;
markControlTag(vm, colonTag);
- ficlDictionaryAppendWord(dictionary, name,
+ (void) ficlDictionaryAppendWord(dictionary, name,
(ficlPrimitive)ficlInstructionColonParen,
FICL_WORD_DEFAULT | FICL_WORD_SMUDGED);
@@ -252,7 +252,7 @@ ficlPrimitiveConstant(ficlVm *vm)
FICL_STACK_CHECK(vm->dataStack, 1, 0);
- ficlDictionaryAppendConstantInstruction(dictionary, name,
+ (void) ficlDictionaryAppendConstantInstruction(dictionary, name,
ficlInstructionConstantParen, ficlStackPopInteger(vm->dataStack));
}
@@ -264,7 +264,7 @@ ficlPrimitive2Constant(ficlVm *vm)
FICL_STACK_CHECK(vm->dataStack, 2, 0);
- ficlDictionaryAppend2ConstantInstruction(dictionary, name,
+ (void) ficlDictionaryAppend2ConstantInstruction(dictionary, name,
ficlInstruction2ConstantParen, ficlStackPop2Integer(vm->dataStack));
}
@@ -281,8 +281,8 @@ ficlPrimitiveDot(ficlVm *vm)
FICL_STACK_CHECK(vm->dataStack, 1, 0);
c = ficlStackPop(vm->dataStack);
- ficlLtoa((c).i, vm->pad, vm->base);
- strcat(vm->pad, " ");
+ (void) ficlLtoa((c).i, vm->pad, vm->base);
+ (void) strcat(vm->pad, " ");
ficlVmTextOut(vm, vm->pad);
}
@@ -294,8 +294,8 @@ ficlPrimitiveUDot(ficlVm *vm)
FICL_STACK_CHECK(vm->dataStack, 1, 0);
u = ficlStackPopUnsigned(vm->dataStack);
- ficlUltoa(u, vm->pad, vm->base);
- strcat(vm->pad, " ");
+ (void) ficlUltoa(u, vm->pad, vm->base);
+ (void) strcat(vm->pad, " ");
ficlVmTextOut(vm, vm->pad);
}
@@ -307,8 +307,8 @@ ficlPrimitiveHexDot(ficlVm *vm)
FICL_STACK_CHECK(vm->dataStack, 1, 0);
u = ficlStackPopUnsigned(vm->dataStack);
- ficlUltoa(u, vm->pad, 16);
- strcat(vm->pad, " ");
+ (void) ficlUltoa(u, vm->pad, 16);
+ (void) strcat(vm->pad, " ");
ficlVmTextOut(vm, vm->pad);
}
@@ -427,9 +427,10 @@ ficlPrimitiveSprintf(ficlVm *vm)
int integer;
integer = ficlStackPopInteger(vm->dataStack);
if (unsignedInteger)
- ficlUltoa(integer, scratch, base);
+ (void) ficlUltoa(integer, scratch,
+ base);
else
- ficlLtoa(integer, scratch, base);
+ (void) ficlLtoa(integer, scratch, base);
base = 10;
unsignedInteger = 0; /* false */
source = scratch;
@@ -545,7 +546,7 @@ ficlPrimitiveBackslash(ficlVm *vm)
static void
ficlPrimitiveParenthesis(ficlVm *vm)
{
- ficlVmParseStringEx(vm, ')', 0);
+ (void) ficlVmParseStringEx(vm, ')', 0);
}
/*
@@ -868,7 +869,7 @@ ficlPrimitiveInterpret(ficlVm *vm)
FICL_STRING_GET_POINTER(s));
ficlStackPushUnsigned(vm->dataStack,
FICL_STRING_GET_LENGTH(s));
- ficlVmExecuteXT(vm, word);
+ (void) ficlVmExecuteXT(vm, word);
if (ficlStackPopInteger(vm->dataStack))
return;
}
@@ -922,7 +923,7 @@ ficlPrimitiveAddParseStep(ficlVm *vm)
pStep = (ficlWord *)(ficlStackPop(vm->dataStack).p);
if ((pStep != NULL) && ficlDictionaryIsAWord(dictionary, pStep))
- ficlSystemAddParseStep(vm->callback.system, pStep);
+ (void) ficlSystemAddParseStep(vm->callback.system, pStep);
}
/*
@@ -1089,7 +1090,7 @@ ficlPrimitiveVariable(ficlVm *vm)
ficlDictionary *dictionary = ficlVmGetDictionary(vm);
ficlString name = ficlVmGetWord(vm);
- ficlDictionaryAppendWord(dictionary, name,
+ (void) ficlDictionaryAppendWord(dictionary, name,
(ficlPrimitive)ficlInstructionVariableParen, FICL_WORD_DEFAULT);
ficlVmDictionaryAllotCells(vm, dictionary, 1);
}
@@ -1100,7 +1101,7 @@ ficlPrimitive2Variable(ficlVm *vm)
ficlDictionary *dictionary = ficlVmGetDictionary(vm);
ficlString name = ficlVmGetWord(vm);
- ficlDictionaryAppendWord(dictionary, name,
+ (void) ficlDictionaryAppendWord(dictionary, name,
(ficlPrimitive)ficlInstructionVariableParen, FICL_WORD_DEFAULT);
ficlVmDictionaryAllotCells(vm, dictionary, 2);
}
@@ -1285,7 +1286,7 @@ ficlPrimitiveCountedStringQuoteIm(ficlVm *vm)
ficlCountedString *counted = (ficlCountedString *)
dictionary->here;
- ficlVmGetString(vm, counted, '\"');
+ (void) ficlVmGetString(vm, counted, '\"');
ficlStackPushPointer(vm->dataStack, counted);
/*
@@ -1411,7 +1412,7 @@ ficlPrimitiveCreate(ficlVm *vm)
ficlDictionary *dictionary = ficlVmGetDictionary(vm);
ficlString name = ficlVmGetWord(vm);
- ficlDictionaryAppendWord(dictionary, name,
+ (void) ficlDictionaryAppendWord(dictionary, name,
(ficlPrimitive)ficlInstructionCreateParen, FICL_WORD_DEFAULT);
ficlVmDictionaryAllotCells(vm, dictionary, 1);
}
@@ -1564,7 +1565,7 @@ ficlPrimitiveNumberSignGreater(ficlVm *vm)
counted = FICL_POINTER_TO_COUNTED_STRING(vm->pad);
counted->text[counted->length] = 0;
- ficlStringReverse(counted->text);
+ (void) ficlStringReverse(counted->text);
ficlStackDrop(vm->dataStack, 2);
ficlStackPushPointer(vm->dataStack, counted->text);
ficlStackPushUnsigned(vm->dataStack, counted->length);
@@ -2030,7 +2031,7 @@ ficlPrimitiveStringQuoteIm(ficlVm *vm)
if (vm->state == FICL_VM_STATE_INTERPRET) {
ficlCountedString *counted;
counted = (ficlCountedString *)dictionary->here;
- ficlVmGetString(vm, counted, '\"');
+ (void) ficlVmGetString(vm, counted, '\"');
ficlStackPushPointer(vm->dataStack, counted->text);
ficlStackPushUnsigned(vm->dataStack, counted->length);
} else { /* FICL_VM_STATE_COMPILE state */
@@ -2069,7 +2070,7 @@ ficlPrimitiveType(ficlVm *vm)
if (s[length] != 0) {
char *here = (char *)ficlVmGetDictionary(vm)->here;
if (s != here)
- strncpy(here, s, length);
+ (void) strncpy(here, s, length);
here[length] = '\0';
s = here;
@@ -2109,7 +2110,7 @@ ficlPrimitiveWord(ficlVm *vm)
FICL_STRING_SET_LENGTH(name, FICL_PAD_SIZE - 1);
counted->length = (ficlUnsigned8)FICL_STRING_GET_LENGTH(name);
- strncpy(counted->text, FICL_STRING_GET_POINTER(name),
+ (void) strncpy(counted->text, FICL_STRING_GET_POINTER(name),
FICL_STRING_GET_LENGTH(name));
/*
@@ -2336,7 +2337,7 @@ ficlPrimitiveUser(ficlVm *vm)
ficlVmThrowError(vm, "Error - out of user space");
}
- ficlDictionaryAppendWord(dictionary, name,
+ (void) ficlDictionaryAppendWord(dictionary, name,
(ficlPrimitive)ficlInstructionUserParen, FICL_WORD_DEFAULT);
ficlDictionaryAppendCell(dictionary, c);
}
@@ -2505,7 +2506,7 @@ ficlLocalParen(ficlVm *vm, int isDouble, int isFloat)
instruction = ficlInstructionToLocalParen;
}
- ficlDictionaryAppendWord(locals, name, code,
+ (void) ficlDictionaryAppendWord(locals, name, code,
FICL_WORD_COMPILE_ONLY_IMMEDIATE);
ficlDictionaryAppendUnsigned(locals,
vm->callback.system->localsCount);
@@ -2605,7 +2606,6 @@ ficlPrimitiveToValue(ficlVm *vm)
"to %.*s : local is of unknown type",
FICL_STRING_GET_LENGTH(name),
FICL_STRING_GET_POINTER(name));
- return;
}
nLocal = word->param[0].i;
@@ -2648,30 +2648,30 @@ TO_GLOBAL:
instruction = ficlInstructionStore;
stack = vm->dataStack;
isDouble = FICL_FALSE;
- break;
+ break;
case ficlInstruction2ConstantParen:
instruction = ficlInstruction2Store;
stack = vm->dataStack;
isDouble = FICL_TRUE;
- break;
+ break;
#if FICL_WANT_FLOAT
case ficlInstructionFConstantParen:
instruction = ficlInstructionFStore;
stack = vm->floatStack;
isDouble = FICL_FALSE;
- break;
+ break;
case ficlInstructionF2ConstantParen:
instruction = ficlInstructionF2Store;
stack = vm->floatStack;
isDouble = FICL_TRUE;
- break;
+ break;
#endif /* FICL_WANT_FLOAT */
default:
ficlVmThrowError(vm,
"to %.*s : value/constant is of unknown type",
FICL_STRING_GET_LENGTH(name),
FICL_STRING_GET_POINTER(name));
- return;
+ break;
}
if (vm->state == FICL_VM_STATE_INTERPRET) {
@@ -3104,7 +3104,8 @@ ficlSystemCompileCore(ficlSystem *system)
#define FICL_TOKEN(token, description)
#define FICL_INSTRUCTION_TOKEN(token, description, flags) \
- ficlDictionarySetInstruction(dictionary, description, token, flags);
+ (void) ficlDictionarySetInstruction(dictionary, description, token, \
+ flags);
#include "ficltokens.h"
#undef FICL_TOKEN
#undef FICL_INSTRUCTION_TOKEN
@@ -3113,208 +3114,208 @@ ficlSystemCompileCore(ficlSystem *system)
* The Core word set
* see softcore.c for definitions of: abs bl space spaces abort"
*/
- ficlDictionarySetPrimitive(dictionary, "#", ficlPrimitiveNumberSign,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "#>",
+ (void) ficlDictionarySetPrimitive(dictionary, "#",
+ ficlPrimitiveNumberSign, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "#>",
ficlPrimitiveNumberSignGreater, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "#s", ficlPrimitiveNumberSignS,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "\'", ficlPrimitiveTick,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "(", ficlPrimitiveParenthesis,
- FICL_WORD_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "+loop",
+ (void) ficlDictionarySetPrimitive(dictionary, "#s",
+ ficlPrimitiveNumberSignS, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "\'",
+ ficlPrimitiveTick, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "(",
+ ficlPrimitiveParenthesis, FICL_WORD_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "+loop",
ficlPrimitivePlusLoopCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, ".", ficlPrimitiveDot,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, ".\"",
+ (void) ficlDictionarySetPrimitive(dictionary, ".",
+ ficlPrimitiveDot, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, ".\"",
ficlPrimitiveDotQuoteCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, ":", ficlPrimitiveColon,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, ";", ficlPrimitiveSemicolonCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "<#",
+ (void) ficlDictionarySetPrimitive(dictionary, ":",
+ ficlPrimitiveColon, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, ";",
+ ficlPrimitiveSemicolonCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "<#",
ficlPrimitiveLessNumberSign, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, ">body", ficlPrimitiveToBody,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, ">in", ficlPrimitiveToIn,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, ">number", ficlPrimitiveToNumber,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "abort", ficlPrimitiveAbort,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "accept", ficlPrimitiveAccept,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "align", ficlPrimitiveAlign,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "aligned", ficlPrimitiveAligned,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "allot", ficlPrimitiveAllot,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "base", ficlPrimitiveBase,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "begin", ficlPrimitiveBeginCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "case", ficlPrimitiveCaseCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "char", ficlPrimitiveChar,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "char+", ficlPrimitiveCharPlus,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "chars", ficlPrimitiveChars,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "constant",
+ (void) ficlDictionarySetPrimitive(dictionary, ">body",
+ ficlPrimitiveToBody, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, ">in",
+ ficlPrimitiveToIn, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, ">number",
+ ficlPrimitiveToNumber, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "abort",
+ ficlPrimitiveAbort, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "accept",
+ ficlPrimitiveAccept, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "align",
+ ficlPrimitiveAlign, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "aligned",
+ ficlPrimitiveAligned, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "allot",
+ ficlPrimitiveAllot, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "base",
+ ficlPrimitiveBase, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "begin",
+ ficlPrimitiveBeginCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "case",
+ ficlPrimitiveCaseCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "char",
+ ficlPrimitiveChar, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "char+",
+ ficlPrimitiveCharPlus, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "chars",
+ ficlPrimitiveChars, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "constant",
ficlPrimitiveConstant, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "count", ficlPrimitiveCount,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "cr", ficlPrimitiveCR,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "create", ficlPrimitiveCreate,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "decimal", ficlPrimitiveDecimal,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "depth", ficlPrimitiveDepth,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "do", ficlPrimitiveDoCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "does>", ficlPrimitiveDoesCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "else", ficlPrimitiveElseCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "emit", ficlPrimitiveEmit,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "endcase",
+ (void) ficlDictionarySetPrimitive(dictionary, "count",
+ ficlPrimitiveCount, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "cr",
+ ficlPrimitiveCR, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "create",
+ ficlPrimitiveCreate, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "decimal",
+ ficlPrimitiveDecimal, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "depth",
+ ficlPrimitiveDepth, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "do",
+ ficlPrimitiveDoCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "does>",
+ ficlPrimitiveDoesCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "else",
+ ficlPrimitiveElseCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "emit",
+ ficlPrimitiveEmit, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "endcase",
ficlPrimitiveEndcaseCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "endof", ficlPrimitiveEndofCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "environment?",
+ (void) ficlDictionarySetPrimitive(dictionary, "endof",
+ ficlPrimitiveEndofCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "environment?",
ficlPrimitiveEnvironmentQ, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "evaluate",
+ (void) ficlDictionarySetPrimitive(dictionary, "evaluate",
ficlPrimitiveEvaluate, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "execute", ficlPrimitiveExecute,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "exit", ficlPrimitiveExitCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "fallthrough",
+ (void) ficlDictionarySetPrimitive(dictionary, "execute",
+ ficlPrimitiveExecute, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "exit",
+ ficlPrimitiveExitCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "fallthrough",
ficlPrimitiveFallthroughCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "find", ficlPrimitiveCFind,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "fm/mod",
+ (void) ficlDictionarySetPrimitive(dictionary, "find",
+ ficlPrimitiveCFind, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "fm/mod",
ficlPrimitiveFMSlashMod, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "here", ficlPrimitiveHere,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "hold", ficlPrimitiveHold,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "if", ficlPrimitiveIfCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "immediate",
+ (void) ficlDictionarySetPrimitive(dictionary, "here",
+ ficlPrimitiveHere, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "hold",
+ ficlPrimitiveHold, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "if",
+ ficlPrimitiveIfCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "immediate",
ficlPrimitiveImmediate, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "literal",
+ (void) ficlDictionarySetPrimitive(dictionary, "literal",
ficlPrimitiveLiteralIm, FICL_WORD_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "loop", ficlPrimitiveLoopCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "m*", ficlPrimitiveMStar,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "mod", ficlPrimitiveMod,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "of", ficlPrimitiveOfCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "postpone",
+ (void) ficlDictionarySetPrimitive(dictionary, "loop",
+ ficlPrimitiveLoopCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "m*",
+ ficlPrimitiveMStar, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "mod",
+ ficlPrimitiveMod, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "of",
+ ficlPrimitiveOfCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "postpone",
ficlPrimitivePostponeCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "quit", ficlPrimitiveQuit,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "recurse",
+ (void) ficlDictionarySetPrimitive(dictionary, "quit",
+ ficlPrimitiveQuit, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "recurse",
ficlPrimitiveRecurseCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "repeat",
+ (void) ficlDictionarySetPrimitive(dictionary, "repeat",
ficlPrimitiveRepeatCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "s\"",
+ (void) ficlDictionarySetPrimitive(dictionary, "s\"",
ficlPrimitiveStringQuoteIm, FICL_WORD_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "sign", ficlPrimitiveSign,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "sm/rem",
+ (void) ficlDictionarySetPrimitive(dictionary, "sign",
+ ficlPrimitiveSign, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "sm/rem",
ficlPrimitiveSMSlashRem, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "source", ficlPrimitiveSource,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "state", ficlPrimitiveState,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "then", ficlPrimitiveEndifCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "type", ficlPrimitiveType,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "u.", ficlPrimitiveUDot,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "um*", ficlPrimitiveUMStar,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "um/mod",
+ (void) ficlDictionarySetPrimitive(dictionary, "source",
+ ficlPrimitiveSource, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "state",
+ ficlPrimitiveState, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "then",
+ ficlPrimitiveEndifCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "type",
+ ficlPrimitiveType, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "u.",
+ ficlPrimitiveUDot, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "um*",
+ ficlPrimitiveUMStar, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "um/mod",
ficlPrimitiveUMSlashMod, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "until",
+ (void) ficlDictionarySetPrimitive(dictionary, "until",
ficlPrimitiveUntilCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "variable",
+ (void) ficlDictionarySetPrimitive(dictionary, "variable",
ficlPrimitiveVariable, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "while",
+ (void) ficlDictionarySetPrimitive(dictionary, "while",
ficlPrimitiveWhileCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "word", ficlPrimitiveWord,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "[",
+ (void) ficlDictionarySetPrimitive(dictionary, "word",
+ ficlPrimitiveWord, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "[",
ficlPrimitiveLeftBracketCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "[\']",
+ (void) ficlDictionarySetPrimitive(dictionary, "[\']",
ficlPrimitiveBracketTickCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "[char]", ficlPrimitiveCharCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "]", ficlPrimitiveRightBracket,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "[char]",
+ ficlPrimitiveCharCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "]",
+ ficlPrimitiveRightBracket, FICL_WORD_DEFAULT);
/*
* The Core Extensions word set...
* see softcore.fr for other definitions
*/
/* "#tib" */
- ficlDictionarySetPrimitive(dictionary, ".(", ficlPrimitiveDotParen,
- FICL_WORD_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, ".(",
+ ficlPrimitiveDotParen, FICL_WORD_IMMEDIATE);
/* ".r" is in softcore */
- ficlDictionarySetPrimitive(dictionary, ":noname",
+ (void) ficlDictionarySetPrimitive(dictionary, ":noname",
ficlPrimitiveColonNoName, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "?do", ficlPrimitiveQDoCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "again", ficlPrimitiveAgainCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "c\"",
+ (void) ficlDictionarySetPrimitive(dictionary, "?do",
+ ficlPrimitiveQDoCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "again",
+ ficlPrimitiveAgainCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "c\"",
ficlPrimitiveCountedStringQuoteIm, FICL_WORD_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "hex", ficlPrimitiveHex,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "pad", ficlPrimitivePad,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "parse", ficlPrimitiveParse,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "hex",
+ ficlPrimitiveHex, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "pad",
+ ficlPrimitivePad, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "parse",
+ ficlPrimitiveParse, FICL_WORD_DEFAULT);
/*
* query restore-input save-input tib u.r u> unused
* [FICL_VM_STATE_COMPILE]
*/
- ficlDictionarySetPrimitive(dictionary, "refill", ficlPrimitiveRefill,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "source-id",
+ (void) ficlDictionarySetPrimitive(dictionary, "refill",
+ ficlPrimitiveRefill, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "source-id",
ficlPrimitiveSourceID, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "to", ficlPrimitiveToValue,
- FICL_WORD_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "value", ficlPrimitiveConstant,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "\\", ficlPrimitiveBackslash,
- FICL_WORD_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "to",
+ ficlPrimitiveToValue, FICL_WORD_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "value",
+ ficlPrimitiveConstant, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "\\",
+ ficlPrimitiveBackslash, FICL_WORD_IMMEDIATE);
/*
* Environment query values for the Core word set
*/
- ficlDictionarySetConstant(environment, "/counted-string",
+ (void) ficlDictionarySetConstant(environment, "/counted-string",
FICL_COUNTED_STRING_MAX);
- ficlDictionarySetConstant(environment, "/hold", FICL_PAD_SIZE);
- ficlDictionarySetConstant(environment, "/pad", FICL_PAD_SIZE);
- ficlDictionarySetConstant(environment, "address-unit-bits", 8);
- ficlDictionarySetConstant(environment, "core", FICL_TRUE);
- ficlDictionarySetConstant(environment, "core-ext", FICL_FALSE);
- ficlDictionarySetConstant(environment, "floored", FICL_FALSE);
- ficlDictionarySetConstant(environment, "max-char", UCHAR_MAX);
- ficlDictionarySetConstant(environment, "max-n", LONG_MAX);
- ficlDictionarySetConstant(environment, "max-u", ULONG_MAX);
+ (void) ficlDictionarySetConstant(environment, "/hold", FICL_PAD_SIZE);
+ (void) ficlDictionarySetConstant(environment, "/pad", FICL_PAD_SIZE);
+ (void) ficlDictionarySetConstant(environment, "address-unit-bits", 8);
+ (void) ficlDictionarySetConstant(environment, "core", FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "core-ext", FICL_FALSE);
+ (void) ficlDictionarySetConstant(environment, "floored", FICL_FALSE);
+ (void) ficlDictionarySetConstant(environment, "max-char", UCHAR_MAX);
+ (void) ficlDictionarySetConstant(environment, "max-n", LONG_MAX);
+ (void) ficlDictionarySetConstant(environment, "max-u", ULONG_MAX);
{
ficl2Integer id;
@@ -3323,25 +3324,25 @@ ficlSystemCompileCore(ficlSystem *system)
low = ULONG_MAX;
high = LONG_MAX;
FICL_2INTEGER_SET(high, low, id);
- ficlDictionarySet2Constant(environment, "max-d", id);
+ (void) ficlDictionarySet2Constant(environment, "max-d", id);
high = ULONG_MAX;
FICL_2INTEGER_SET(high, low, id);
- ficlDictionarySet2Constant(environment, "max-ud", id);
+ (void) ficlDictionarySet2Constant(environment, "max-ud", id);
}
- ficlDictionarySetConstant(environment, "return-stack-cells",
+ (void) ficlDictionarySetConstant(environment, "return-stack-cells",
FICL_DEFAULT_STACK_SIZE);
- ficlDictionarySetConstant(environment, "stack-cells",
+ (void) ficlDictionarySetConstant(environment, "stack-cells",
FICL_DEFAULT_STACK_SIZE);
/*
* The optional Double-Number word set (partial)
*/
- ficlDictionarySetPrimitive(dictionary, "2constant",
+ (void) ficlDictionarySetPrimitive(dictionary, "2constant",
ficlPrimitive2Constant, FICL_WORD_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "2literal",
+ (void) ficlDictionarySetPrimitive(dictionary, "2literal",
ficlPrimitive2LiteralIm, FICL_WORD_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "2variable",
+ (void) ficlDictionarySetPrimitive(dictionary, "2variable",
ficlPrimitive2Variable, FICL_WORD_IMMEDIATE);
/*
* D+ D- D. D.R D0< D0= D2* D2/ in softcore
@@ -3353,51 +3354,54 @@ ficlSystemCompileCore(ficlSystem *system)
/*
* DOUBLE EXT
*/
- ficlDictionarySetPrimitive(dictionary, "2rot",
+ (void) ficlDictionarySetPrimitive(dictionary, "2rot",
ficlPrimitive2Rot, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "2value",
+ (void) ficlDictionarySetPrimitive(dictionary, "2value",
ficlPrimitive2Constant, FICL_WORD_IMMEDIATE);
/* du< in softcore */
/*
* The optional Exception and Exception Extensions word set
*/
- ficlDictionarySetPrimitive(dictionary, "catch", ficlPrimitiveCatch,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "throw", ficlPrimitiveThrow,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "catch",
+ ficlPrimitiveCatch, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "throw",
+ ficlPrimitiveThrow, FICL_WORD_DEFAULT);
- ficlDictionarySetConstant(environment, "exception", FICL_TRUE);
- ficlDictionarySetConstant(environment, "exception-ext", FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "exception", FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "exception-ext",
+ FICL_TRUE);
/*
* The optional Locals and Locals Extensions word set
* see softcore.c for implementation of locals|
*/
#if FICL_WANT_LOCALS
- ficlDictionarySetPrimitive(dictionary, "doLocal",
+ (void) ficlDictionarySetPrimitive(dictionary, "doLocal",
ficlPrimitiveDoLocalIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "(local)",
+ (void) ficlDictionarySetPrimitive(dictionary, "(local)",
ficlPrimitiveLocalParen, FICL_WORD_COMPILE_ONLY);
- ficlDictionarySetPrimitive(dictionary, "(2local)",
+ (void) ficlDictionarySetPrimitive(dictionary, "(2local)",
ficlPrimitive2LocalParen, FICL_WORD_COMPILE_ONLY);
- ficlDictionarySetConstant(environment, "locals", FICL_TRUE);
- ficlDictionarySetConstant(environment, "locals-ext", FICL_TRUE);
- ficlDictionarySetConstant(environment, "#locals", FICL_MAX_LOCALS);
+ (void) ficlDictionarySetConstant(environment, "locals", FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "locals-ext", FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "#locals",
+ FICL_MAX_LOCALS);
#endif
/*
* The optional Memory-Allocation word set
*/
- ficlDictionarySetPrimitive(dictionary, "allocate",
+ (void) ficlDictionarySetPrimitive(dictionary, "allocate",
ficlPrimitiveAllocate, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "free", ficlPrimitiveFree,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "resize", ficlPrimitiveResize,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "free",
+ ficlPrimitiveFree, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "resize",
+ ficlPrimitiveResize, FICL_WORD_DEFAULT);
- ficlDictionarySetConstant(environment, "memory-alloc", FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "memory-alloc",
+ FICL_TRUE);
/*
* The optional Search-Order word set
@@ -3420,41 +3424,41 @@ ficlSystemCompileCore(ficlSystem *system)
/*
* Ficl extras
*/
- ficlDictionarySetPrimitive(dictionary, ".ver", ficlPrimitiveVersion,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, ">name", ficlPrimitiveToName,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "add-parse-step",
+ (void) ficlDictionarySetPrimitive(dictionary, ".ver",
+ ficlPrimitiveVersion, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, ">name",
+ ficlPrimitiveToName, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "add-parse-step",
ficlPrimitiveAddParseStep, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "body>", ficlPrimitiveFromBody,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "compile-only",
+ (void) ficlDictionarySetPrimitive(dictionary, "body>",
+ ficlPrimitiveFromBody, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "compile-only",
ficlPrimitiveCompileOnly, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "endif", ficlPrimitiveEndifCoIm,
- FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "last-word",
+ (void) ficlDictionarySetPrimitive(dictionary, "endif",
+ ficlPrimitiveEndifCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
+ (void) ficlDictionarySetPrimitive(dictionary, "last-word",
ficlPrimitiveLastWord, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "hash", ficlPrimitiveHash,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "objectify",
+ (void) ficlDictionarySetPrimitive(dictionary, "hash",
+ ficlPrimitiveHash, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "objectify",
ficlPrimitiveSetObjectFlag, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "?object",
+ (void) ficlDictionarySetPrimitive(dictionary, "?object",
ficlPrimitiveIsObject, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "parse-word",
+ (void) ficlDictionarySetPrimitive(dictionary, "parse-word",
ficlPrimitiveParseNoCopy, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "sfind", ficlPrimitiveSFind,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "sliteral",
+ (void) ficlDictionarySetPrimitive(dictionary, "sfind",
+ ficlPrimitiveSFind, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "sliteral",
ficlPrimitiveSLiteralCoIm, FICL_WORD_COMPILE_ONLY_IMMEDIATE);
- ficlDictionarySetPrimitive(dictionary, "sprintf", ficlPrimitiveSprintf,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "strlen", ficlPrimitiveStrlen,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "x.", ficlPrimitiveHexDot,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "sprintf",
+ ficlPrimitiveSprintf, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "strlen",
+ ficlPrimitiveStrlen, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "x.",
+ ficlPrimitiveHexDot, FICL_WORD_DEFAULT);
#if FICL_WANT_USER
- ficlDictionarySetPrimitive(dictionary, "user", ficlPrimitiveUser,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "user",
+ ficlPrimitiveUser, FICL_WORD_DEFAULT);
#endif
/*
@@ -3462,9 +3466,9 @@ ficlSystemCompileCore(ficlSystem *system)
*/
interpret = ficlDictionarySetPrimitive(dictionary, "interpret",
ficlPrimitiveInterpret, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "lookup", ficlPrimitiveLookup,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "(parse-step)",
+ (void) ficlDictionarySetPrimitive(dictionary, "lookup",
+ ficlPrimitiveLookup, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "(parse-step)",
ficlPrimitiveParseStepParen, FICL_WORD_DEFAULT);
system->exitInnerWord = ficlDictionarySetPrimitive(dictionary,
"exit-inner", ficlPrimitiveExitInner, FICL_WORD_DEFAULT);
@@ -3475,7 +3479,7 @@ ficlSystemCompileCore(ficlSystem *system)
* By default you only get the numbers (fi0, fiNeg1, etc).
*/
#define FICL_TOKEN(token, description) \
- ficlDictionarySetConstant(dictionary, #token, token);
+ (void) ficlDictionarySetConstant(dictionary, #token, token);
#if 0
#define FICL_INSTRUCTION_TOKEN(token, description, flags) \
ficlDictionarySetConstant(dictionary, #token, token);
diff --git a/usr/src/common/ficl/search.c b/usr/src/common/ficl/search.c
index ae5f4a3cf6..3834b3c68f 100644
--- a/usr/src/common/ficl/search.c
+++ b/usr/src/common/ficl/search.c
@@ -351,37 +351,40 @@ ficlSystemCompileSearch(ficlSystem *system)
/*
* optional SEARCH-ORDER word set
*/
- ficlDictionarySetPrimitive(dictionary, ">search",
+ (void) ficlDictionarySetPrimitive(dictionary, ">search",
ficlPrimitiveSearchPush, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "search>",
+ (void) ficlDictionarySetPrimitive(dictionary, "search>",
ficlPrimitiveSearchPop, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "definitions",
+ (void) ficlDictionarySetPrimitive(dictionary, "definitions",
ficlPrimitiveDefinitions, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "forth-wordlist",
+ (void) ficlDictionarySetPrimitive(dictionary, "forth-wordlist",
ficlPrimitiveForthWordlist, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "get-current",
+ (void) ficlDictionarySetPrimitive(dictionary, "get-current",
ficlPrimitiveGetCurrent, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "get-order",
+ (void) ficlDictionarySetPrimitive(dictionary, "get-order",
ficlPrimitiveGetOrder, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "search-wordlist",
+ (void) ficlDictionarySetPrimitive(dictionary, "search-wordlist",
ficlPrimitiveSearchWordlist, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "set-current",
+ (void) ficlDictionarySetPrimitive(dictionary, "set-current",
ficlPrimitiveSetCurrent, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "set-order",
+ (void) ficlDictionarySetPrimitive(dictionary, "set-order",
ficlPrimitiveSetOrder, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "ficl-wordlist",
+ (void) ficlDictionarySetPrimitive(dictionary, "ficl-wordlist",
ficlPrimitiveFiclWordlist, FICL_WORD_DEFAULT);
/*
* Set SEARCH environment query values
*/
- ficlDictionarySetConstant(environment, "search-order", FICL_TRUE);
- ficlDictionarySetConstant(environment, "search-order-ext", FICL_TRUE);
- ficlDictionarySetConstant(environment, "wordlists", FICL_MAX_WORDLISTS);
- ficlDictionarySetPrimitive(dictionary, "wid-get-name",
+ (void) ficlDictionarySetConstant(environment, "search-order",
+ FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "search-order-ext",
+ FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "wordlists",
+ FICL_MAX_WORDLISTS);
+ (void) ficlDictionarySetPrimitive(dictionary, "wid-get-name",
ficlPrimitiveWidGetName, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "wid-set-name",
+ (void) ficlDictionarySetPrimitive(dictionary, "wid-set-name",
ficlPrimitiveWidSetName, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "wid-set-super",
+ (void) ficlDictionarySetPrimitive(dictionary, "wid-set-super",
ficlPrimitiveSetParentWid, FICL_WORD_DEFAULT);
}
diff --git a/usr/src/common/ficl/system.c b/usr/src/common/ficl/system.c
index 6423a46a0c..a6e1fb5483 100644
--- a/usr/src/common/ficl/system.c
+++ b/usr/src/common/ficl/system.c
@@ -83,8 +83,10 @@ ficlSystemSetVersion(ficlSystem *system)
ficl2Integer combined;
ficlDictionary *environment = ficlSystemGetEnvironment(system);
FICL_2INTEGER_SET(major, minor, combined);
- ficlDictionarySet2Constant(environment, "ficl-version", combined);
- ficlDictionarySetConstant(environment, "ficl-robust", FICL_ROBUST);
+ (void) ficlDictionarySet2Constant(environment, "ficl-version",
+ combined);
+ (void) ficlDictionarySetConstant(environment, "ficl-robust",
+ FICL_ROBUST);
}
/*
@@ -211,9 +213,9 @@ ficlSystemCreate(ficlSystemInformation *fsi)
* presence of INTERPRET in the dictionary, so a VM can be created
* before the dictionary is built. It just can't do much...
*/
- ficlSystemCreateVm(system);
+ (void) ficlSystemCreateVm(system);
#define ADD_COMPILE_FLAG(name) \
- ficlDictionarySetConstant(environment, #name, name)
+ (void) ficlDictionarySetConstant(environment, #name, name)
ADD_COMPILE_FLAG(FICL_WANT_LZ4_SOFTCORE);
ADD_COMPILE_FLAG(FICL_WANT_FILE);
ADD_COMPILE_FLAG(FICL_WANT_FLOAT);
@@ -232,7 +234,7 @@ ficlSystemCreate(ficlSystemInformation *fsi)
ADD_COMPILE_FLAG(FICL_ROBUST);
#define ADD_COMPILE_STRING(name) \
- ficlDictionarySetConstantString(environment, #name, name)
+ (void) ficlDictionarySetConstantString(environment, #name, name)
ADD_COMPILE_STRING(FICL_PLATFORM_ARCHITECTURE);
ADD_COMPILE_STRING(FICL_PLATFORM_OS);
@@ -319,7 +321,7 @@ ficlSystemAddPrimitiveParseStep(ficlSystem *system, char *name,
c.fn = (void (*)(void))pStep;
ficlDictionaryAppendCell(dictionary, c);
- ficlSystemAddParseStep(system, word);
+ (void) ficlSystemAddParseStep(system, word);
}
/*
diff --git a/usr/src/common/ficl/tools.c b/usr/src/common/ficl/tools.c
index 11f17505cc..53969f6b80 100644
--- a/usr/src/common/ficl/tools.c
+++ b/usr/src/common/ficl/tools.c
@@ -70,7 +70,7 @@ ficlCallbackAssert(ficlCallback *callback, int expression,
#if FICL_ROBUST >= 1
if (!expression) {
static char buffer[256];
- sprintf(buffer, "ASSERTION FAILED at %s:%d: \"%s\"\n",
+ (void) sprintf(buffer, "ASSERTION FAILED at %s:%d: \"%s\"\n",
filename, line, expressionString);
ficlCallbackTextOut(callback, buffer);
exit(-1);
@@ -107,9 +107,9 @@ static void
ficlDebugPrompt(bool debug)
{
if (debug)
- setenv("prompt", "dbg> ", 1);
+ (void) setenv("prompt", "dbg> ", 1);
else
- setenv("prompt", "${interpret}", 1);
+ (void) setenv("prompt", "${interpret}", 1);
}
#if 0
@@ -184,7 +184,7 @@ ficlPrimitiveHashSummary(ficlVm *vm)
nDepth = size * (nAvg * (nAvg+1))/2 + (nAvg+1)*nRem;
best = (double)nDepth/nWords;
- sprintf(vm->pad, "%d bins, %2.0f%% filled, Depth: "
+ (void) sprintf(vm->pad, "%d bins, %2.0f%% filled, Depth: "
"Max=%d, Avg=%2.1f, Best=%2.1f, Score: %2.0f%%\n",
size, (double)nFilled * 100.0 / size, nMax,
avg, best, 100.0 * best / avg);
@@ -212,7 +212,7 @@ ficlPrimitiveSeeXT(ficlVm *vm)
switch (kind) {
case FICL_WORDKIND_COLON:
- sprintf(vm->pad, ": %.*s\n", word->length, word->name);
+ (void) sprintf(vm->pad, ": %.*s\n", word->length, word->name);
ficlVmTextOut(vm, vm->pad);
ficlDictionarySee(ficlVmGetDictionary(vm), word,
&(vm->callback));
@@ -226,24 +226,24 @@ ficlPrimitiveSeeXT(ficlVm *vm)
ficlVmTextOut(vm, "create\n");
break;
case FICL_WORDKIND_VARIABLE:
- sprintf(vm->pad, "variable = %ld (%#lx)\n",
+ (void) sprintf(vm->pad, "variable = %ld (%#lx)\n",
(long)word->param->i, (long unsigned)word->param->u);
ficlVmTextOut(vm, vm->pad);
break;
#if FICL_WANT_USER
case FICL_WORDKIND_USER:
- sprintf(vm->pad, "user variable %ld (%#lx)\n",
+ (void) sprintf(vm->pad, "user variable %ld (%#lx)\n",
(long)word->param->i, (long unsigned)word->param->u);
ficlVmTextOut(vm, vm->pad);
break;
#endif
case FICL_WORDKIND_CONSTANT:
- sprintf(vm->pad, "constant = %ld (%#lx)\n",
+ (void) sprintf(vm->pad, "constant = %ld (%#lx)\n",
(long)word->param->i, (long unsigned)word->param->u);
ficlVmTextOut(vm, vm->pad);
break;
case FICL_WORDKIND_2CONSTANT:
- sprintf(vm->pad, "constant = %ld %ld (%#lx %#lx)\n",
+ (void) sprintf(vm->pad, "constant = %ld %ld (%#lx %#lx)\n",
(long)word->param[1].i, (long)word->param->i,
(long unsigned)word->param[1].u,
(long unsigned)word->param->u);
@@ -251,7 +251,7 @@ ficlPrimitiveSeeXT(ficlVm *vm)
break;
default:
- sprintf(vm->pad, "%.*s is a primitive\n", word->length,
+ (void) sprintf(vm->pad, "%.*s is a primitive\n", word->length,
word->name);
ficlVmTextOut(vm, vm->pad);
break;
@@ -405,7 +405,7 @@ ficlPrimitiveStepBreak(ficlVm *vm)
*/
pOnStep = ficlSystemLookup(vm->callback.system, "on-step");
if (pOnStep)
- ficlVmExecuteXT(vm, pOnStep);
+ (void) ficlVmExecuteXT(vm, pOnStep);
/*
* Print the name of the next instruction
@@ -414,11 +414,11 @@ ficlPrimitiveStepBreak(ficlVm *vm)
if ((((ficlInstruction)word) > ficlInstructionInvalid) &&
(((ficlInstruction)word) < ficlInstructionLast))
- sprintf(vm->pad, "next: %s (instruction %ld)\n",
+ (void) sprintf(vm->pad, "next: %s (instruction %ld)\n",
ficlDictionaryInstructionNames[(long)word],
(long)word);
else {
- sprintf(vm->pad, "next: %s\n", word->name);
+ (void) sprintf(vm->pad, "next: %s\n", word->name);
if (strcmp(word->name, "interpret") == 0)
debug = false;
}
@@ -538,11 +538,13 @@ ficlStackDisplayCallback(void *c, ficlCell *cell)
char buffer[80];
#ifdef _LP64
- snprintf(buffer, sizeof (buffer), "[0x%016lx %3d]: %20ld (0x%016lx)\n",
+ (void) snprintf(buffer, sizeof (buffer),
+ "[0x%016lx %3d]: %20ld (0x%016lx)\n",
(unsigned long)cell, context->count++, (long)cell->i,
(unsigned long)cell->u);
#else
- snprintf(buffer, sizeof (buffer), "[0x%08x %3d]: %12d (0x%08x)\n",
+ (void) snprintf(buffer, sizeof (buffer),
+ "[0x%08x %3d]: %12d (0x%08x)\n",
(unsigned)cell, context->count++, cell->i, cell->u);
#endif
@@ -561,10 +563,10 @@ ficlStackDisplay(ficlStack *stack, ficlStackWalkFunction callback,
FICL_STACK_CHECK(stack, 0, 0);
#ifdef _LP64
- sprintf(buffer, "[%s stack has %d entries, top at 0x%016lx]\n",
+ (void) sprintf(buffer, "[%s stack has %d entries, top at 0x%016lx]\n",
stack->name, ficlStackDepth(stack), (unsigned long)stack->top);
#else
- sprintf(buffer, "[%s stack has %d entries, top at 0x%08x]\n",
+ (void) sprintf(buffer, "[%s stack has %d entries, top at 0x%08x]\n",
stack->name, ficlStackDepth(stack), (unsigned)stack->top);
#endif
ficlVmTextOut(vm, buffer);
@@ -578,10 +580,10 @@ ficlStackDisplay(ficlStack *stack, ficlStackWalkFunction callback,
ficlStackWalk(stack, callback, context, FICL_FALSE);
#ifdef _LP64
- sprintf(buffer, "[%s stack base at 0x%016lx]\n", stack->name,
+ (void) sprintf(buffer, "[%s stack base at 0x%016lx]\n", stack->name,
(unsigned long)stack->base);
#else
- sprintf(buffer, "[%s stack base at 0x%08x]\n", stack->name,
+ (void) sprintf(buffer, "[%s stack base at 0x%08x]\n", stack->name,
(unsigned)stack->base);
#endif
ficlVmTextOut(vm, buffer);
@@ -599,7 +601,8 @@ ficlStackDisplaySimpleCallback(void *c, ficlCell *cell)
struct stackContext *context = (struct stackContext *)c;
char buffer[32];
- sprintf(buffer, "%s%ld", context->count ? " " : "", (long)cell->i);
+ (void) sprintf(buffer, "%s%ld", context->count ? " " : "",
+ (long)cell->i);
context->count++;
ficlVmTextOut(context->vm, buffer);
return (FICL_TRUE);
@@ -614,7 +617,7 @@ ficlVmDisplayDataStackSimple(ficlVm *vm)
FICL_STACK_CHECK(stack, 0, 0);
- sprintf(buffer, "[%d] ", ficlStackDepth(stack));
+ (void) sprintf(buffer, "[%d] ", ficlStackDepth(stack));
ficlVmTextOut(vm, buffer);
context.vm = vm;
@@ -630,10 +633,10 @@ ficlReturnStackDisplayCallback(void *c, ficlCell *cell)
char buffer[128];
#ifdef _LP64
- sprintf(buffer, "[0x%016lx %3d] %20ld (0x%016lx)", (unsigned long)cell,
- context->count++, cell->i, cell->u);
+ (void) sprintf(buffer, "[0x%016lx %3d] %20ld (0x%016lx)",
+ (unsigned long)cell, context->count++, cell->i, cell->u);
#else
- sprintf(buffer, "[0x%08x %3d] %12d (0x%08x)", (unsigned)cell,
+ (void) sprintf(buffer, "[0x%08x %3d] %12d (0x%08x)", (unsigned)cell,
context->count++, cell->i, cell->u);
#endif
@@ -648,11 +651,11 @@ ficlReturnStackDisplayCallback(void *c, ficlCell *cell)
cell->p);
if (word) {
int offset = (ficlCell *)cell->p - &word->param[0];
- sprintf(buffer + strlen(buffer), ", %s + %d ",
+ (void) sprintf(buffer + strlen(buffer), ", %s + %d ",
word->name, offset);
}
}
- strcat(buffer, "\n");
+ (void) strcat(buffer, "\n");
ficlVmTextOut(context->vm, buffer);
return (FICL_TRUE);
}
@@ -751,9 +754,10 @@ ficlPrimitiveWordsBackend(ficlVm *vm, ficlDictionary *dictionary,
if (ss != NULL && strstr(wp->name, ss) == NULL)
continue;
if (ss != NULL && dWords == 0) {
- sprintf(pPad, " In vocabulary %s\n",
+ (void) sprintf(pPad,
+ " In vocabulary %s\n",
hash->name ? hash->name : "<unknown>");
- pager_output(pPad);
+ (void) pager_output(pPad);
}
dWords++;
@@ -799,11 +803,11 @@ ficlPrimitiveWordsBackend(ficlVm *vm, ficlDictionary *dictionary,
}
if (ss == NULL) {
- sprintf(pPad,
+ (void) sprintf(pPad,
"Dictionary: %d words, %ld cells used of %u total\n",
nWords, (long)(dictionary->here - dictionary->base),
dictionary->size);
- pager_output(pPad);
+ (void) pager_output(pPad);
}
pager_done:
@@ -846,16 +850,17 @@ ficlPrimitiveListEnv(ficlVm *vm)
for (i = 0; i < hash->size; i++) {
for (word = hash->table[i]; word != NULL;
word = word->link, counter++) {
- sprintf(vm->pad, "%s\n", word->name);
+ (void) sprintf(vm->pad, "%s\n", word->name);
if (pager_output(vm->pad))
goto pager_done;
}
}
- sprintf(vm->pad, "Environment: %d words, %ld cells used of %u total\n",
+ (void) sprintf(vm->pad,
+ "Environment: %d words, %ld cells used of %u total\n",
counter, (long)(dictionary->here - dictionary->base),
dictionary->size);
- pager_output(vm->pad);
+ (void) pager_output(vm->pad);
pager_done:
pager_close();
@@ -894,9 +899,10 @@ ficlPrimitiveEnvConstant(ficlVm *vm)
unsigned value;
FICL_STACK_CHECK(vm->dataStack, 1, 0);
- ficlVmGetWordToPad(vm);
+ (void) ficlVmGetWordToPad(vm);
value = ficlStackPopUnsigned(vm->dataStack);
- ficlDictionarySetConstant(ficlSystemGetEnvironment(vm->callback.system),
+ (void) ficlDictionarySetConstant(
+ ficlSystemGetEnvironment(vm->callback.system),
vm->pad, (ficlUnsigned)value);
}
@@ -907,9 +913,9 @@ ficlPrimitiveEnv2Constant(ficlVm *vm)
FICL_STACK_CHECK(vm->dataStack, 2, 0);
- ficlVmGetWordToPad(vm);
+ (void) ficlVmGetWordToPad(vm);
value = ficlStackPop2Integer(vm->dataStack);
- ficlDictionarySet2Constant(
+ (void) ficlDictionarySet2Constant(
ficlSystemGetEnvironment(vm->callback.system), vm->pad, value);
}
@@ -931,49 +937,49 @@ ficlSystemCompileTools(ficlSystem *system)
/*
* TOOLS and TOOLS EXT
*/
- ficlDictionarySetPrimitive(dictionary, ".s", ficlVmDisplayDataStack,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, ".s-simple",
+ (void) ficlDictionarySetPrimitive(dictionary, ".s",
+ ficlVmDisplayDataStack, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, ".s-simple",
ficlVmDisplayDataStackSimple, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "bye", ficlPrimitiveBye,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "forget", ficlPrimitiveForget,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "see", ficlPrimitiveSee,
+ (void) ficlDictionarySetPrimitive(dictionary, "bye", ficlPrimitiveBye,
FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "words", ficlPrimitiveWords,
+ (void) ficlDictionarySetPrimitive(dictionary, "forget",
+ ficlPrimitiveForget, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "see", ficlPrimitiveSee,
FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "words",
+ ficlPrimitiveWords, FICL_WORD_DEFAULT);
/*
* Set TOOLS environment query values
*/
- ficlDictionarySetConstant(environment, "tools", FICL_TRUE);
- ficlDictionarySetConstant(environment, "tools-ext", FICL_FALSE);
+ (void) ficlDictionarySetConstant(environment, "tools", FICL_TRUE);
+ (void) ficlDictionarySetConstant(environment, "tools-ext", FICL_FALSE);
/*
* Ficl extras
*/
- ficlDictionarySetPrimitive(dictionary, "r.s", ficlVmDisplayReturnStack,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, ".env", ficlPrimitiveListEnv,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "env-constant",
+ (void) ficlDictionarySetPrimitive(dictionary, "r.s",
+ ficlVmDisplayReturnStack, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, ".env",
+ ficlPrimitiveListEnv, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "env-constant",
ficlPrimitiveEnvConstant, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "env-2constant",
+ (void) ficlDictionarySetPrimitive(dictionary, "env-2constant",
ficlPrimitiveEnv2Constant, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "debug-xt", ficlPrimitiveDebugXT,
- FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "parse-order",
+ (void) ficlDictionarySetPrimitive(dictionary, "debug-xt",
+ ficlPrimitiveDebugXT, FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "parse-order",
ficlPrimitiveParseStepList, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "step-break",
+ (void) ficlDictionarySetPrimitive(dictionary, "step-break",
ficlPrimitiveStepBreak, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "forget-wid",
+ (void) ficlDictionarySetPrimitive(dictionary, "forget-wid",
ficlPrimitiveForgetWid, FICL_WORD_DEFAULT);
- ficlDictionarySetPrimitive(dictionary, "see-xt", ficlPrimitiveSeeXT,
- FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dictionary, "see-xt",
+ ficlPrimitiveSeeXT, FICL_WORD_DEFAULT);
#if FICL_WANT_FLOAT
- ficlDictionarySetPrimitive(dictionary, ".hash",
+ (void) ficlDictionarySetPrimitive(dictionary, ".hash",
ficlPrimitiveHashSummary, FICL_WORD_DEFAULT);
#endif
}
diff --git a/usr/src/common/ficl/vm.c b/usr/src/common/ficl/vm.c
index 7ca803f2ff..e6db0e3a73 100644
--- a/usr/src/common/ficl/vm.c
+++ b/usr/src/common/ficl/vm.c
@@ -293,7 +293,7 @@ AGAIN:
case ficlInstructionInvalid:
ficlVmThrowError(vm,
"Error: NULL instruction executed!");
- return;
+ break;
case ficlInstruction1:
case ficlInstruction2:
@@ -313,7 +313,7 @@ AGAIN:
case ficlInstruction16:
CHECK_STACK(0, 1);
(++dataTop)->i = instruction;
- continue;
+ continue;
case ficlInstruction0:
case ficlInstructionNeg1:
@@ -334,7 +334,7 @@ AGAIN:
case ficlInstructionNeg16:
CHECK_STACK(0, 1);
(++dataTop)->i = ficlInstruction0 - instruction;
- continue;
+ continue;
/*
* stringlit: Fetch the count from the dictionary, then push
@@ -354,7 +354,7 @@ AGAIN:
cp += length + 1;
cp = ficlAlignPointer(cp);
ip = (void *)cp;
- continue;
+ continue;
}
case ficlInstructionCStringLiteralParen:
@@ -365,7 +365,7 @@ AGAIN:
cp = ficlAlignPointer(cp);
ip = (void *)cp;
(++dataTop)->p = s;
- continue;
+ continue;
#if FICL_WANT_OPTIMIZE == FICL_OPTIMIZE_FOR_SIZE
#if FICL_WANT_FLOAT
@@ -374,16 +374,16 @@ FLOAT_PUSH_CELL_POINTER_DOUBLE_MINIPROC:
/* intentional fall-through */
FLOAT_PUSH_CELL_POINTER_MINIPROC:
*++floatTop = cell[0];
- continue;
+ continue;
FLOAT_POP_CELL_POINTER_MINIPROC:
cell[0] = *floatTop--;
- continue;
+ continue;
FLOAT_POP_CELL_POINTER_DOUBLE_MINIPROC:
cell[0] = *floatTop--;
cell[1] = *floatTop--;
- continue;
+ continue;
#define FLOAT_PUSH_CELL_POINTER_DOUBLE(cp) \
cell = (cp); goto FLOAT_PUSH_CELL_POINTER_DOUBLE_MINIPROC
@@ -404,15 +404,15 @@ PUSH_CELL_POINTER_DOUBLE_MINIPROC:
/* intentional fall-through */
PUSH_CELL_POINTER_MINIPROC:
*++dataTop = cell[0];
- continue;
+ continue;
POP_CELL_POINTER_MINIPROC:
cell[0] = *dataTop--;
- continue;
+ continue;
POP_CELL_POINTER_DOUBLE_MINIPROC:
cell[0] = *dataTop--;
cell[1] = *dataTop--;
- continue;
+ continue;
#define PUSH_CELL_POINTER_DOUBLE(cp) \
cell = (cp); goto PUSH_CELL_POINTER_DOUBLE_MINIPROC
@@ -425,13 +425,13 @@ POP_CELL_POINTER_DOUBLE_MINIPROC:
BRANCH_MINIPROC:
ip += *(ficlInteger *)ip;
- continue;
+ continue;
#define BRANCH() goto BRANCH_MINIPROC
EXIT_FUNCTION_MINIPROC:
ip = (ficlInstruction *)((returnTop--)->p);
- continue;
+ continue;
#define EXIT_FUNCTION goto EXIT_FUNCTION_MINIPROC
@@ -473,14 +473,14 @@ EXIT_FUNCTION_MINIPROC:
case ficlInstructionLiteralParen:
CHECK_STACK(0, 1);
(++dataTop)->i = *ip++;
- continue;
+ continue;
case ficlInstruction2LiteralParen:
CHECK_STACK(0, 2);
(++dataTop)->i = ip[1];
(++dataTop)->i = ip[0];
ip += 2;
- continue;
+ continue;
#if FICL_WANT_LOCALS
/*
@@ -496,7 +496,7 @@ EXIT_FUNCTION_MINIPROC:
(++returnTop)->p = frame;
frame = returnTop + 1;
returnTop += nCells;
- continue;
+ continue;
}
/*
@@ -507,7 +507,7 @@ EXIT_FUNCTION_MINIPROC:
case ficlInstructionUnlinkParen:
returnTop = frame - 1;
frame = (returnTop--)->p;
- continue;
+ continue;
/*
* Immediate - cfa of a local while compiling - when executed,
@@ -574,33 +574,33 @@ EXIT_FUNCTION_MINIPROC:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i += i;
- continue;
+ continue;
case ficlInstructionMinus:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i -= i;
- continue;
+ continue;
case ficlInstruction1Plus:
CHECK_STACK(1, 1);
dataTop->i++;
- continue;
+ continue;
case ficlInstruction1Minus:
CHECK_STACK(1, 1);
dataTop->i--;
- continue;
+ continue;
case ficlInstruction2Plus:
CHECK_STACK(1, 1);
dataTop->i += 2;
- continue;
+ continue;
case ficlInstruction2Minus:
CHECK_STACK(1, 1);
dataTop->i -= 2;
- continue;
+ continue;
case ficlInstructionDup: {
ficlInteger i = dataTop->i;
@@ -617,7 +617,7 @@ EXIT_FUNCTION_MINIPROC:
dataTop++;
}
- continue;
+ continue;
case ficlInstructionSwap: {
ficlCell swap;
@@ -625,38 +625,38 @@ EXIT_FUNCTION_MINIPROC:
swap = dataTop[0];
dataTop[0] = dataTop[-1];
dataTop[-1] = swap;
+ continue;
}
- continue;
case ficlInstructionDrop:
CHECK_STACK(1, 0);
dataTop--;
- continue;
+ continue;
case ficlInstruction2Drop:
CHECK_STACK(2, 0);
dataTop -= 2;
- continue;
+ continue;
case ficlInstruction2Dup:
CHECK_STACK(2, 4);
dataTop[1] = dataTop[-1];
dataTop[2] = *dataTop;
dataTop += 2;
- continue;
+ continue;
case ficlInstructionOver:
CHECK_STACK(2, 3);
dataTop[1] = dataTop[-1];
dataTop++;
- continue;
+ continue;
case ficlInstruction2Over:
CHECK_STACK(4, 6);
dataTop[1] = dataTop[-3];
dataTop[2] = dataTop[-2];
dataTop += 2;
- continue;
+ continue;
case ficlInstructionPick:
CHECK_STACK(1, 0);
@@ -665,7 +665,7 @@ EXIT_FUNCTION_MINIPROC:
continue;
CHECK_STACK(i + 2, i + 3);
*dataTop = dataTop[-i - 1];
- continue;
+ continue;
/*
* Do stack rot.
@@ -673,7 +673,7 @@ EXIT_FUNCTION_MINIPROC:
*/
case ficlInstructionRot:
i = 2;
- goto ROLL;
+ goto ROLL;
/*
* Do stack roll.
@@ -692,7 +692,7 @@ ROLL:
memmove(dataTop - i, dataTop - (i - 1),
i * sizeof (ficlCell));
*dataTop = c;
- continue;
+ continue;
/*
* Do stack -rot.
@@ -700,7 +700,7 @@ ROLL:
*/
case ficlInstructionMinusRot:
i = 2;
- goto MINUSROLL;
+ goto MINUSROLL;
/*
* Do stack -roll.
@@ -720,7 +720,7 @@ MINUSROLL:
i * sizeof (ficlCell));
dataTop[-i] = c;
- continue;
+ continue;
/*
* Do stack 2swap
@@ -738,7 +738,7 @@ MINUSROLL:
dataTop[-2] = c;
dataTop[-3] = c2;
- continue;
+ continue;
}
case ficlInstructionPlusStore: {
@@ -746,7 +746,7 @@ MINUSROLL:
CHECK_STACK(2, 0);
cell = (ficlCell *)(dataTop--)->p;
cell->i += (dataTop--)->i;
- continue;
+ continue;
}
case ficlInstructionQuadFetch: {
@@ -754,7 +754,7 @@ MINUSROLL:
CHECK_STACK(1, 1);
integer32 = (ficlUnsigned32 *)dataTop->i;
dataTop->u = (ficlUnsigned)*integer32;
- continue;
+ continue;
}
case ficlInstructionQuadStore: {
@@ -762,7 +762,7 @@ MINUSROLL:
CHECK_STACK(2, 0);
integer32 = (ficlUnsigned32 *)(dataTop--)->p;
*integer32 = (ficlUnsigned32)((dataTop--)->u);
- continue;
+ continue;
}
case ficlInstructionWFetch: {
@@ -770,7 +770,7 @@ MINUSROLL:
CHECK_STACK(1, 1);
integer16 = (ficlUnsigned16 *)dataTop->p;
dataTop->u = ((ficlUnsigned)*integer16);
- continue;
+ continue;
}
case ficlInstructionWStore: {
@@ -778,7 +778,7 @@ MINUSROLL:
CHECK_STACK(2, 0);
integer16 = (ficlUnsigned16 *)(dataTop--)->p;
*integer16 = (ficlUnsigned16)((dataTop--)->u);
- continue;
+ continue;
}
case ficlInstructionCFetch: {
@@ -786,7 +786,7 @@ MINUSROLL:
CHECK_STACK(1, 1);
integer8 = (ficlUnsigned8 *)dataTop->p;
dataTop->u = ((ficlUnsigned)*integer8);
- continue;
+ continue;
}
case ficlInstructionCStore: {
@@ -794,7 +794,7 @@ MINUSROLL:
CHECK_STACK(2, 0);
integer8 = (ficlUnsigned8 *)(dataTop--)->p;
*integer8 = (ficlUnsigned8)((dataTop--)->u);
- continue;
+ continue;
}
@@ -805,58 +805,58 @@ MINUSROLL:
case ficlInstruction0Equals:
CHECK_STACK(1, 1);
dataTop->i = FICL_BOOL(dataTop->i == 0);
- continue;
+ continue;
case ficlInstruction0Less:
CHECK_STACK(1, 1);
dataTop->i = FICL_BOOL(dataTop->i < 0);
- continue;
+ continue;
case ficlInstruction0Greater:
CHECK_STACK(1, 1);
dataTop->i = FICL_BOOL(dataTop->i > 0);
- continue;
+ continue;
case ficlInstructionEquals:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i = FICL_BOOL(dataTop->i == i);
- continue;
+ continue;
case ficlInstructionLess:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i = FICL_BOOL(dataTop->i < i);
- continue;
+ continue;
case ficlInstructionULess:
CHECK_STACK(2, 1);
u = (dataTop--)->u;
dataTop->i = FICL_BOOL(dataTop->u < u);
- continue;
+ continue;
case ficlInstructionAnd:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i = dataTop->i & i;
- continue;
+ continue;
case ficlInstructionOr:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i = dataTop->i | i;
- continue;
+ continue;
case ficlInstructionXor:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i = dataTop->i ^ i;
- continue;
+ continue;
case ficlInstructionInvert:
CHECK_STACK(1, 1);
dataTop->i = ~dataTop->i;
- continue;
+ continue;
/*
* r e t u r n s t a c k
@@ -865,19 +865,19 @@ MINUSROLL:
CHECK_STACK(1, 0);
CHECK_RETURN_STACK(0, 1);
*++returnTop = *dataTop--;
- continue;
+ continue;
case ficlInstructionFromRStack:
CHECK_STACK(0, 1);
CHECK_RETURN_STACK(1, 0);
*++dataTop = *returnTop--;
- continue;
+ continue;
case ficlInstructionFetchRStack:
CHECK_STACK(0, 1);
CHECK_RETURN_STACK(1, 1);
*++dataTop = *returnTop;
- continue;
+ continue;
case ficlInstruction2ToR:
CHECK_STACK(2, 0);
@@ -885,7 +885,7 @@ MINUSROLL:
*++returnTop = dataTop[-1];
*++returnTop = dataTop[0];
dataTop -= 2;
- continue;
+ continue;
case ficlInstruction2RFrom:
CHECK_STACK(0, 2);
@@ -893,14 +893,14 @@ MINUSROLL:
*++dataTop = returnTop[-1];
*++dataTop = returnTop[0];
returnTop -= 2;
- continue;
+ continue;
case ficlInstruction2RFetch:
CHECK_STACK(0, 2);
CHECK_RETURN_STACK(2, 2);
*++dataTop = returnTop[-1];
*++dataTop = returnTop[0];
- continue;
+ continue;
/*
* f i l l
@@ -921,7 +921,7 @@ MINUSROLL:
* solution. --lch
*/
memset(memory, c, u);
- continue;
+ continue;
}
/*
@@ -948,7 +948,7 @@ MINUSROLL:
nBits = (dataTop--)->u;
x1 = dataTop->u;
dataTop->u = x1 << nBits;
- continue;
+ continue;
}
case ficlInstructionRShift: {
@@ -974,7 +974,7 @@ MINUSROLL:
n1 = dataTop->i;
dataTop->i = ((n1 > n2) ? n1 : n2);
- continue;
+ continue;
}
case ficlInstructionMin: {
@@ -983,7 +983,7 @@ MINUSROLL:
CHECK_STACK(2, 1);
n2 = (dataTop--)->i;
- n1 = dataTop->i;
+ n1 = dataTop->i;
dataTop->i = ((n1 < n2) ? n1 : n2);
continue;
@@ -1019,7 +1019,7 @@ MINUSROLL:
*/
/* Which ANSI C's memmove() does for you! Yay! --lch */
memmove(addr2, addr1, u);
- continue;
+ continue;
}
/*
@@ -1036,7 +1036,7 @@ MINUSROLL:
/* sign extend to 64 bits.. */
(++dataTop)->i = (s < 0) ? -1 : 0;
- continue;
+ continue;
}
/*
@@ -1098,7 +1098,7 @@ COMPARE:
n = 1;
(++dataTop)->i = n;
- continue;
+ continue;
}
/*
@@ -1123,15 +1123,14 @@ COMPARE:
y = (dataTop--)->i;
x = dataTop->i;
dataTop->i = FICL_BOOL(x > y);
- continue;
+ continue;
+ }
case ficlInstructionUGreaterThan:
CHECK_STACK(2, 1);
u = (dataTop--)->u;
dataTop->i = FICL_BOOL(dataTop->u > u);
- continue;
-
- }
+ continue;
/*
* This function simply pops the previous instruction
@@ -1210,7 +1209,7 @@ BRANCH_PAREN:
BRANCH();
}
- continue;
+ continue;
}
case ficlInstructionDoParen: {
@@ -1226,7 +1225,7 @@ BRANCH_PAREN:
*++returnTop = limit;
*++returnTop = index;
- continue;
+ continue;
}
case ficlInstructionQDoParen: {
@@ -1248,7 +1247,7 @@ BRANCH_PAREN:
*++returnTop = index;
}
- continue;
+ continue;
}
case ficlInstructionLoopParen:
@@ -1279,7 +1278,7 @@ BRANCH_PAREN:
BRANCH();
}
- continue;
+ continue;
}
@@ -1296,19 +1295,19 @@ BRANCH_PAREN:
case ficlInstructionUnloop:
returnTop -= 3;
- continue;
+ continue;
case ficlInstructionI:
*++dataTop = *returnTop;
- continue;
+ continue;
case ficlInstructionJ:
*++dataTop = returnTop[-3];
- continue;
+ continue;
case ficlInstructionK:
*++dataTop = returnTop[-6];
- continue;
+ continue;
case ficlInstructionDoesParen: {
ficlDictionary *dictionary = ficlVmGetDictionary(vm);
@@ -1316,7 +1315,7 @@ BRANCH_PAREN:
(ficlPrimitive)ficlInstructionDoDoes;
dictionary->smudge->param[0].p = ip;
ip = (ficlInstruction *)((returnTop--)->p);
- continue;
+ continue;
}
case ficlInstructionDoDoes: {
@@ -1330,7 +1329,7 @@ BRANCH_PAREN:
(++dataTop)->p = (cell + 1);
(++returnTop)->p = (void *)ip;
ip = (ficlInstruction *)tempIP;
- continue;
+ continue;
}
#if FICL_WANT_FLOAT
@@ -1400,7 +1399,7 @@ BRANCH_PAREN:
dictionary = ficlVmGetDictionary(vm);
ficlDictionaryAppendCell(dictionary, *dataTop--);
- continue;
+ continue;
}
case ficlInstructionCComma: {
@@ -1411,35 +1410,35 @@ BRANCH_PAREN:
dictionary = ficlVmGetDictionary(vm);
c = (char)(dataTop--)->i;
ficlDictionaryAppendCharacter(dictionary, c);
- continue;
+ continue;
}
case ficlInstructionCells:
CHECK_STACK(1, 1);
dataTop->i *= sizeof (ficlCell);
- continue;
+ continue;
case ficlInstructionCellPlus:
CHECK_STACK(1, 1);
dataTop->i += sizeof (ficlCell);
- continue;
+ continue;
case ficlInstructionStar:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i *= i;
- continue;
+ continue;
case ficlInstructionNegate:
CHECK_STACK(1, 1);
dataTop->i = - dataTop->i;
- continue;
+ continue;
case ficlInstructionSlash:
CHECK_STACK(2, 1);
i = (dataTop--)->i;
dataTop->i /= i;
- continue;
+ continue;
/*
* slash-mod CORE ( n1 n2 -- n3 n4 )
@@ -1464,18 +1463,18 @@ BRANCH_PAREN:
qr = ficl2IntegerDivideSymmetric(n1, n2);
dataTop[-1].i = qr.remainder;
dataTop[0].i = FICL_2UNSIGNED_GET_LOW(qr.quotient);
- continue;
+ continue;
}
case ficlInstruction2Star:
CHECK_STACK(1, 1);
dataTop->i <<= 1;
- continue;
+ continue;
case ficlInstruction2Slash:
CHECK_STACK(1, 1);
dataTop->i >>= 1;
- continue;
+ continue;
case ficlInstructionStarSlash: {
ficlInteger x, y, z;
@@ -1489,7 +1488,7 @@ BRANCH_PAREN:
prod = ficl2IntegerMultiply(x, y);
dataTop->i = FICL_2UNSIGNED_GET_LOW(
ficl2IntegerDivideSymmetric(prod, z).quotient);
- continue;
+ continue;
}
case ficlInstructionStarSlashMod: {
@@ -1515,17 +1514,17 @@ BRANCH_PAREN:
case ficlInstructionF0:
CHECK_FLOAT_STACK(0, 1);
(++floatTop)->f = 0.0f;
- continue;
+ continue;
case ficlInstructionF1:
CHECK_FLOAT_STACK(0, 1);
(++floatTop)->f = 1.0f;
- continue;
+ continue;
case ficlInstructionFNeg1:
CHECK_FLOAT_STACK(0, 1);
(++floatTop)->f = -1.0f;
- continue;
+ continue;
/*
* Floating point literal execution word.
@@ -1538,7 +1537,7 @@ BRANCH_PAREN:
* but it's really a float. --lch
*/
(++floatTop)->i = *ip++;
- continue;
+ continue;
/*
* Do float addition r1 + r2.
@@ -1549,7 +1548,7 @@ BRANCH_PAREN:
f = (floatTop--)->f;
floatTop->f += f;
- continue;
+ continue;
/*
* Do float subtraction r1 - r2.
@@ -1560,7 +1559,7 @@ BRANCH_PAREN:
f = (floatTop--)->f;
floatTop->f -= f;
- continue;
+ continue;
/*
* Do float multiplication r1 * r2.
@@ -1571,7 +1570,7 @@ BRANCH_PAREN:
f = (floatTop--)->f;
floatTop->f *= f;
- continue;
+ continue;
/*
* Do float negation.
@@ -1581,7 +1580,7 @@ BRANCH_PAREN:
CHECK_FLOAT_STACK(1, 1);
floatTop->f = -(floatTop->f);
- continue;
+ continue;
/*
* Do float division r1 / r2.
@@ -1592,7 +1591,7 @@ BRANCH_PAREN:
f = (floatTop--)->f;
floatTop->f /= f;
- continue;
+ continue;
/*
* Do float + integer r + n.
@@ -1604,7 +1603,7 @@ BRANCH_PAREN:
f = (ficlFloat)(dataTop--)->f;
floatTop->f += f;
- continue;
+ continue;
/*
* Do float - integer r - n.
@@ -1616,7 +1615,7 @@ BRANCH_PAREN:
f = (ficlFloat)(dataTop--)->f;
floatTop->f -= f;
- continue;
+ continue;
/*
* Do float * integer r * n.
@@ -1628,7 +1627,7 @@ BRANCH_PAREN:
f = (ficlFloat)(dataTop--)->f;
floatTop->f *= f;
- continue;
+ continue;
/*
* Do float / integer r / n.
@@ -1652,7 +1651,7 @@ BRANCH_PAREN:
f = (ficlFloat)(dataTop--)->f;
floatTop->f = f - floatTop->f;
- continue;
+ continue;
/*
* Do integer / float n / r.
@@ -1664,7 +1663,7 @@ BRANCH_PAREN:
f = (ficlFloat)(dataTop--)->f;
floatTop->f = f / floatTop->f;
- continue;
+ continue;
/*
* Do integer to float conversion.
@@ -1675,7 +1674,7 @@ BRANCH_PAREN:
CHECK_FLOAT_STACK(0, 1);
(++floatTop)->f = ((dataTop--)->f);
- continue;
+ continue;
/*
* Do float to integer conversion.
@@ -1686,7 +1685,7 @@ BRANCH_PAREN:
CHECK_FLOAT_STACK(1, 0);
(++dataTop)->i = ((floatTop--)->i);
- continue;
+ continue;
/*
* Add a floating point number to contents of a variable.
@@ -1700,7 +1699,7 @@ BRANCH_PAREN:
cell = (ficlCell *)(dataTop--)->p;
cell->f += (floatTop--)->f;
- continue;
+ continue;
}
/*
@@ -1710,7 +1709,7 @@ BRANCH_PAREN:
case ficlInstructionFDrop:
CHECK_FLOAT_STACK(1, 0);
floatTop--;
- continue;
+ continue;
/*
* Do float stack ?dup.
@@ -1722,7 +1721,7 @@ BRANCH_PAREN:
if (floatTop->f != 0)
goto FDUP;
- continue;
+ continue;
/*
* Do float stack dup.
@@ -1746,7 +1745,7 @@ FDUP:
c = floatTop[0];
floatTop[0] = floatTop[-1];
floatTop[-1] = c;
- continue;
+ continue;
/*
* Do float stack 2drop.
@@ -1756,7 +1755,7 @@ FDUP:
CHECK_FLOAT_STACK(2, 0);
floatTop -= 2;
- continue;
+ continue;
/*
* Do float stack 2dup.
@@ -1768,7 +1767,7 @@ FDUP:
floatTop[1] = floatTop[-1];
floatTop[2] = *floatTop;
floatTop += 2;
- continue;
+ continue;
/*
* Do float stack over.
@@ -1779,7 +1778,7 @@ FDUP:
floatTop[1] = floatTop[-1];
floatTop++;
- continue;
+ continue;
/*
* Do float stack 2over.
@@ -1791,7 +1790,7 @@ FDUP:
floatTop[1] = floatTop[-2];
floatTop[2] = floatTop[-1];
floatTop += 2;
- continue;
+ continue;
/*
* Do float stack pick.
@@ -1803,7 +1802,7 @@ FDUP:
CHECK_FLOAT_STACK(c.i+2, c.i+3);
floatTop[1] = floatTop[- c.i - 1];
- continue;
+ continue;
/*
* Do float stack rot.
@@ -1831,7 +1830,7 @@ FROLL:
i * sizeof (ficlCell));
*floatTop = c;
- continue;
+ continue;
/*
* Do float stack -rot.
@@ -1860,7 +1859,7 @@ FMINUSROLL:
i * sizeof (ficlCell));
floatTop[-i] = c;
- continue;
+ continue;
/*
* Do float stack 2swap
@@ -1878,7 +1877,7 @@ FMINUSROLL:
floatTop[-2] = c;
floatTop[-3] = c2;
- continue;
+ continue;
}
/*
@@ -1890,7 +1889,7 @@ FMINUSROLL:
CHECK_STACK(0, 1);
(++dataTop)->i = FICL_BOOL((floatTop--)->f != 0.0f);
- continue;
+ continue;
/*
* Do float 0< comparison r < 0.0.
@@ -1901,7 +1900,7 @@ FMINUSROLL:
CHECK_STACK(0, 1);
(++dataTop)->i = FICL_BOOL((floatTop--)->f < 0.0f);
- continue;
+ continue;
/*
* Do float 0> comparison r > 0.0.
@@ -1912,7 +1911,7 @@ FMINUSROLL:
CHECK_STACK(0, 1);
(++dataTop)->i = FICL_BOOL((floatTop--)->f > 0.0f);
- continue;
+ continue;
/*
* Do float = comparison r1 = r2.
@@ -1924,7 +1923,7 @@ FMINUSROLL:
f = (floatTop--)->f;
(++dataTop)->i = FICL_BOOL((floatTop--)->f == f);
- continue;
+ continue;
/*
* Do float < comparison r1 < r2.
@@ -1936,7 +1935,7 @@ FMINUSROLL:
f = (floatTop--)->f;
(++dataTop)->i = FICL_BOOL((floatTop--)->f < f);
- continue;
+ continue;
/*
* Do float > comparison r1 > r2.
@@ -1948,7 +1947,7 @@ FMINUSROLL:
f = (floatTop--)->f;
(++dataTop)->i = FICL_BOOL((floatTop--)->f > f);
- continue;
+ continue;
/*
@@ -1960,14 +1959,14 @@ FMINUSROLL:
CHECK_STACK(0, 1);
*++dataTop = *floatTop--;
- continue;
+ continue;
case ficlInstructionToF:
CHECK_FLOAT_STACK(0, 1);
CHECK_STACK(1, 0);
*++floatTop = *dataTop--;
- continue;
+ continue;
#endif /* FICL_WANT_FLOAT */
@@ -1985,17 +1984,17 @@ FMINUSROLL:
case ficlInstructionColonParen:
(++returnTop)->p = (void *)ip;
ip = (ficlInstruction *)(fw->param);
- continue;
+ continue;
case ficlInstructionCreateParen:
CHECK_STACK(0, 1);
(++dataTop)->p = (fw->param + 1);
- continue;
+ continue;
case ficlInstructionVariableParen:
CHECK_STACK(0, 1);
(++dataTop)->p = fw->param;
- continue;
+ continue;
/*
* c o n s t a n t P a r e n
@@ -2025,7 +2024,7 @@ FMINUSROLL:
case ficlInstructionUserParen: {
ficlInteger i = fw->param[0].i;
(++dataTop)->p = &vm->user[i];
- continue;
+ continue;
}
#endif
@@ -2049,7 +2048,7 @@ FMINUSROLL:
(vm)->runningWord = fw;
fw->code(vm);
LOCAL_VARIABLE_REFILL;
- continue;
+ continue;
}
}
@@ -2085,7 +2084,7 @@ ficlVmGetString(ficlVm *vm, ficlCountedString *counted, char delimiter)
FICL_STRING_SET_LENGTH(s, FICL_COUNTED_STRING_MAX);
}
- strncpy(counted->text, FICL_STRING_GET_POINTER(s),
+ (void) strncpy(counted->text, FICL_STRING_GET_POINTER(s),
FICL_STRING_GET_LENGTH(s));
counted->text[FICL_STRING_GET_LENGTH(s)] = '\0';
counted->length = (ficlUnsigned8)FICL_STRING_GET_LENGTH(s);
@@ -2169,7 +2168,8 @@ ficlVmGetWordToPad(ficlVm *vm)
if (FICL_STRING_GET_LENGTH(s) > FICL_PAD_SIZE)
FICL_STRING_SET_LENGTH(s, FICL_PAD_SIZE);
- strncpy(pad, FICL_STRING_GET_POINTER(s), FICL_STRING_GET_LENGTH(s));
+ (void) strncpy(pad, FICL_STRING_GET_POINTER(s),
+ FICL_STRING_GET_LENGTH(s));
pad[FICL_STRING_GET_LENGTH(s)] = '\0';
return ((int)(FICL_STRING_GET_LENGTH(s)));
}
@@ -2357,9 +2357,9 @@ ficlVmThrowError(ficlVm *vm, char *fmt, ...)
va_list list;
va_start(list, fmt);
- vsprintf(vm->pad, fmt, list);
+ (void) vsprintf(vm->pad, fmt, list);
va_end(list);
- strcat(vm->pad, "\n");
+ (void) strcat(vm->pad, "\n");
ficlVmErrorOut(vm, vm->pad);
longjmp(*(vm->exceptionHandler), FICL_VM_STATUS_ERROR_EXIT);
@@ -2368,13 +2368,13 @@ ficlVmThrowError(ficlVm *vm, char *fmt, ...)
void
ficlVmThrowErrorVararg(ficlVm *vm, char *fmt, va_list list)
{
- vsprintf(vm->pad, fmt, list);
+ (void) vsprintf(vm->pad, fmt, list);
/*
* well, we can try anyway, we're certainly not
* returning to our caller!
*/
va_end(list);
- strcat(vm->pad, "\n");
+ (void) strcat(vm->pad, "\n");
ficlVmErrorOut(vm, vm->pad);
longjmp(*(vm->exceptionHandler), FICL_VM_STATUS_ERROR_EXIT);
diff --git a/usr/src/lib/libficl/Makefile.com b/usr/src/lib/libficl/Makefile.com
index 65dd141b23..788b02dee4 100644
--- a/usr/src/lib/libficl/Makefile.com
+++ b/usr/src/lib/libficl/Makefile.com
@@ -43,9 +43,6 @@ pics/vm.o := CERRWARN += -_gcc=-Wno-clobbered
LDLIBS += -luuid -lz -lc -lm -lumem
-# not linted
-SMATCH=off
-
HEADERS= $(FICLDIR)/ficl.h $(FICLDIR)/ficltokens.h ../ficllocal.h \
$(FICLDIR)/ficlplatform/unix.h $(PNGLITE)/pnglite.h