#include "rooms.h"
#include "commands.h"
#include "messages.h"
+#include "tuiconfig.h"
#ifndef HAVE_SNPRINTF
#include "snprintf.h"
#endif
char cmd[SIZ];
int b, cksum, editor_exit;
- if (IsEmptyStr(editor_paths[0])) {
+ if (IsEmptyStr(editor_path)) {
scr_printf("Do you wish to re-enter %s? ", desc);
if (yesno() == 0)
return;
return;
}
- if (!IsEmptyStr(editor_paths[0])) {
+ if (!IsEmptyStr(editor_path)) {
CtdlIPC_chat_send(ipc, read_cmd);
CtdlIPC_chat_recv(ipc, cmd);
if (cmd[0] == '1') {
cksum = file_checksum(temp);
- if (!IsEmptyStr(editor_paths[0])) {
+ if (!IsEmptyStr(editor_path)) {
char tmp[SIZ];
snprintf(tmp, sizeof tmp, "WINDOW_TITLE=%s", desc);
editor_pid = fork();
if (editor_pid == 0) {
chmod(temp, 0600);
- execlp(editor_paths[0], editor_paths[0], temp, NULL);
+ execlp(editor_path, editor_path, temp, NULL);
exit(1);
}
if (editor_pid > 0)
b = ka_wait(&editor_exit);
} while ((b != editor_pid) && (b >= 0));
editor_pid = (-1);
- scr_printf("Executed %s\n", editor_paths[0]);
+ scr_printf("Executed %s\n", editor_path);
stty_ctdl(0);
} else {
scr_printf("Entering %s. Press return twice when finished.\n", desc);