commandline
char *commandline;
commandline = malloc(strlen(editor) + strlen(edit_path) + 2);
if (commandline == NULL)
sprintf(commandline, "%s %s", editor, edit_path);
if (system(commandline) == -1)
free(commandline);
reparse(buffer, commandline);
strcpy(commandline, buffer); /* make a copy */
printf("%4d: %s", file_line, commandline);
char commandline[BUFSIZE]; /* issue command from here */
sprintf(commandline, "%s %s", editor, tempfile); /* create an edit command */
status = system(commandline); /* do it */
struct commandline cmd;
memset(&cmd, 0, sizeof (struct commandline));
static int parseargs(int, const char **, struct commandline *);
static void mkfile_output(struct commandline *);
mkfile_output(struct commandline *cmd)
parseargs(int argc, const char **argv, struct commandline *cmd)