]> code.citadel.org Git - citadel.git/commitdiff
* Don't run the wait indicator when in an external editor
authorArt Cancro <ajc@citadel.org>
Mon, 4 Nov 2002 21:49:53 +0000 (21:49 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 4 Nov 2002 21:49:53 +0000 (21:49 +0000)
citadel/ChangeLog
citadel/commands.c
citadel/messages.c
citadel/rooms.c
citadel/routines2.c
citadel/screen.c

index f63089d64f66ac24eafc6d343462457741b67c6e..f5427d43f79120dcc4dc555ea2fc68c112da5ac1 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 601.56  2002/11/04 21:49:53  ajc
+ * Don't run the wait indicator when in an external editor
+
  Revision 601.55  2002/11/01 04:57:56  ajc
  * Fixed .AM and .AE commands
 
@@ -4174,4 +4177,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index eb6dc1dc65d33bf6e0eb173af4af88f9d92c5f4f..ae45be8365a56a220efbb57a34fdf69816747463 100644 (file)
@@ -1218,6 +1218,7 @@ void sttybbs(int cmd)
        if (cmd == 3) {
                tcsetattr(0, TCSADRAIN, &saved_settings);
        }
+
 }
 #else
 void sttybbs(int cmd)
index 4f28119005a90a548b0254da6246300229df6b61..ecb8666647c204b7d8e470a3722eca8f2aca043d 100644 (file)
@@ -820,12 +820,12 @@ ME1:      switch (mode) {
                e_ex_code = 1;  /* start with a failed exit code */
                editor_pid = fork();
                cksum = file_checksum(filename);
+               screen_reset();
+               sttybbs(SB_RESTORE);
                if (editor_pid == 0) {
                        char tmp[SIZ];
 
                        chmod(filename, 0600);
-                       screen_reset();
-                       sttybbs(SB_RESTORE);
                        snprintf(tmp, sizeof tmp, "WINDOW_TITLE=%s", header);
                        putenv(tmp);
                        execlp(editor_path, editor_path, filename, NULL);
index dafb2af2243b1dd24815d61d418bcb83d14851db..dfca1133deea5942038cc63d16e8a4eb5cd27098 100644 (file)
@@ -1010,18 +1010,18 @@ void do_edit(CtdlIPC *ipc,
 
                snprintf(tmp, sizeof tmp, "WINDOW_TITLE=%s", desc);
                putenv(tmp);
+               screen_reset();
+               sttybbs(SB_RESTORE);
                editor_pid = fork();
                if (editor_pid == 0) {
                        chmod(temp, 0600);
-                       screen_reset();
-                       sttybbs(SB_RESTORE);
                        execlp(editor_path, editor_path, temp, NULL);
                        exit(1);
                }
                if (editor_pid > 0)
                        do {
                                editor_exit = 0;
-                               b = wait(&editor_exit);
+                               b = ka_wait(&editor_exit);
                        } while ((b != editor_pid) && (b >= 0));
                editor_pid = (-1);
                scr_printf("Executed %s\n", editor_path);
index d8076dc21a30a75ae33a54608aa5dc61d264efba..b92716e2b64392c5d16e80e0b729c2ec7ce4035d 100644 (file)
@@ -923,12 +923,12 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment)
        fclose(tempfp);
 
        e_ex_code = 1;  /* start with a failed exit code */
+       screen_reset();
+       sttybbs(SB_RESTORE);
        editor_pid = fork();
        cksum = file_checksum(filename);
        if (editor_pid == 0) {
                chmod(filename, 0600);
-               screen_reset();
-               sttybbs(SB_RESTORE);
                putenv("WINDOW_TITLE=Network configuration");
                execlp(editor_path, editor_path, filename, NULL);
                exit(1);
index ae799fe9a7630ea39f1c8dee615499e0d4250db6..fa91ce430e4869c14e0374b2e2a36c9bcb49e8e1 100644 (file)
@@ -84,7 +84,8 @@ void status_line(const char *humannode, const char *bbs_city,
  */
 #if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
 void wait_indicator(int state) {
-       if (statuswindow) {
+
+       if (!isendwin() && statuswindow) {
 
                mvwinch(statuswindow, 0, screenwidth - 2);
                switch (state) {
@@ -162,8 +163,9 @@ void screen_delete(void)
        windows_delete();
        screen_reset();
 #if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
-       if (myscreen)
+       if (myscreen) {
                delscreen(myscreen);
+       }
        myscreen = NULL;
 #endif
 }