]> diplodocus.org Git - nmh/blobdiff - sbr/geteditor.c
uip: Replace some ints that are only ever 0 or 1 with bool.
[nmh] / sbr / geteditor.c
index c8b9986b04830b185a303431c0177ac272df8118..2fbe1f56a9e850df0369d64fb40ef3eb047f1c38 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * geteditor.c -- Determine the default editor to use
+/* geteditor.c -- Determine the default editor to use
  *
  * This code is Copyright (c) 2013, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  *
  * This code is Copyright (c) 2013, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -21,8 +20,8 @@ get_default_editor(void)
 
     if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) &&
        !(str = getenv("EDITOR"))) {
 
     if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) &&
        !(str = getenv("EDITOR"))) {
-       str = DEFAULT_EDITOR;
+       str = "vi";
     }
 
     }
 
-    return (default_editor = str);
+    return default_editor = str;
 }
 }