/*************************************************************************
* This program is copyright (C) 1985, 1986 by Jonathan Payne. It is *
* provided to you without charge for use only on a licensed Unix *
* system. You may copy JOVE provided that this notice is included with *
* the copy. You may not sell copies of this program or versions *
* modified for use on microcomputer systems, unless the copies are *
* included with a Unix system distribution and the source is provided. *
*************************************************************************/
#undef putchar /* From jove.h via funcdefs.c, conflicts with STDIO */
register struct cmd choices
[];
for (i
= 0; choices
[i
].Name
!= 0; i
++) {
if (*what
!= *choices
[i
].Name
)
if (strncmp(what
, choices
[i
].Name
, len
) == 0)
(void) sprintf(cp
, "C-%c", c
+ '@');
(void) sprintf(cp
, "%c", c
);
from
+= 2; /* Past tab and first double quote. */
while ((*into
= *from
++) != '"')
if (ifile
== NULL
|| of
== NULL
) {
printf("Cannot read input or write output.\n");
while (fgets(line
, sizeof line
, ifile
) != NULL
) {
if (strncmp(line
, "\t\"", 2) != 0) {
if (strcmp(comname
, "unbound") == 0)
comnum
= match(commands
, comname
);
fprintf(stderr
, "Cannot find command \"%s\".\n", comname
);
fprintf(of
, " (data_obj *) 0, /* %s */\n", PPchar(ch
++));
fprintf(of
, " (data_obj *) &commands[%d], /* %s */\n", comnum
, PPchar(ch
++));