]> diplodocus.org Git - nmh/blobdiff - sbr/geteditor.c
fmt_new.c: Move interface to own file.
[nmh] / sbr / geteditor.c
index 80602af34ad479d87dddf9cc56f147a7c690f95e..3b472ec1233aeba79b4471cf30c6d764cb5c3a1b 100644 (file)
@@ -5,8 +5,10 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/utils.h>
+#include "h/mh.h"
+#include "geteditor.h"
+#include "context_find.h"
+#include "h/utils.h"
 
 static char *default_editor = NULL;
 
@@ -20,8 +22,8 @@ get_default_editor(void)
 
     if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) &&
        !(str = getenv("EDITOR"))) {
-       str = DEFAULT_EDITOR;
+       str = "vi";
     }
 
-    return (default_editor = str);
+    return default_editor = str;
 }