From 2b803b4558371a127901d099302c63986e226c85 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 2 Apr 2009 00:24:38 +0000 Subject: [PATCH] drop the ansi command, make the ui command use ansi if vty is not available --- Options.hs | 5 ++--- Version.hs | 3 +-- hledger.hs | 8 +++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Options.hs b/Options.hs index 7d8e1f9f5..73b522984 100644 --- a/Options.hs +++ b/Options.hs @@ -31,9 +31,8 @@ usagehdr = printf ( " register - show register transactions\n" ++ #ifdef VTY " ui - run a simple curses-based text ui\n" ++ -#endif -#ifdef ANSI - " ansi - run a simple ansi-based text ui\n" ++ +#elif ANSI + " ui - run a simple ansi-based text ui\n" ++ #endif #ifdef HAPPS " web - run a simple web ui\n" ++ diff --git a/Version.hs b/Version.hs index 5510d0ac9..d6e5df763 100644 --- a/Version.hs +++ b/Version.hs @@ -39,8 +39,7 @@ versionmsg = progname ++ " " ++ versionstr ++ configmsg ++ "\n" configflags = tail ["" #ifdef VTY ,"vty" -#endif -#ifdef ANSI +#elif ANSI ,"ansi" #endif #ifdef HAPPS diff --git a/hledger.hs b/hledger.hs index 47787730a..4bf10c395 100644 --- a/hledger.hs +++ b/hledger.hs @@ -60,8 +60,7 @@ import PrintCommand import RegisterCommand #ifdef VTY import UICommand -#endif -#ifdef ANSI +#elif ANSI import ANSICommand #endif #ifdef HAPPS @@ -82,9 +81,8 @@ main = do | cmd `isPrefixOf` "register" = parseLedgerAndDo opts args register #ifdef VTY | cmd `isPrefixOf` "ui" = parseLedgerAndDo opts args ui -#endif -#ifdef ANSI - | cmd `isPrefixOf` "ansi" = parseLedgerAndDo opts args ansi +#elif ANSI + | cmd `isPrefixOf` "ui" = parseLedgerAndDo opts args ansi #endif #ifdef HAPPS | cmd `isPrefixOf` "web" = parseLedgerAndDo opts args web