packages feed

timeplot 0.3.11 → 0.3.12

raw patch · 2 files changed

+21/−2 lines, 2 files

Files

Tools/TimePlot.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE ScopedTypeVariables, TypeFamilies, ParallelListComp #-}+{-# LANGUAGE ScopedTypeVariables, TypeFamilies, ParallelListComp, CPP #-} module Main where  import Control.Monad@@ -29,7 +29,11 @@ import Data.Accessor  import Graphics.Rendering.Chart++#ifdef HAVE_GTK import Graphics.Rendering.Chart.Gtk+#endif+ import Graphics.Rendering.Chart.Grid import Graphics.Rendering.Chart.Plot import Graphics.Rendering.Chart.Event@@ -63,7 +67,9 @@              deriving (Show)  data OutFormat = PNG | PDF | PS | SVG+#ifdef HAVE_GTK                | Window+#endif  class HasDelta t where   type Delta t :: *@@ -170,7 +176,9 @@         outFile     = single "output file" "-o"  (error "No output file (-o) specified")         outFormat   = maybe PNG id $ lookup (single "output format" "-of" (name2format outFile)) $             [("png",PNG), ("pdf",PDF), ("ps",PS), ("svg",SVG)+#ifdef HAVE_GTK                         , ("x",Window)+#endif                         ]           where             name2format = reverse . takeWhile (/='.') . reverse@@ -698,6 +706,7 @@ showHelp = mapM_ putStrLn [ "",   "tplot - a tool for drawing timing diagrams.",   "        See http://www.haskell.org/haskellwiki/Timeplot",+#ifdef HAVE_GTK     "Usage: tplot [-o OFILE] [-of {png|pdf|ps|svg|x}] [-or 640x480]",   "             -if IFILE [-tf TF] ",   "             [{+|-}k Pat1 Kind1 {+|-}k Pat2 Kind2 ...] [{+|-}dk KindN]",@@ -705,6 +714,14 @@   "  -o  OFILE  - output file (required if -of is not x)",   "  -of        - output format (x means draw result in a window, default:",   "               extension of -o)",+#else+  "Usage: tplot [-o OFILE] [-of {png|pdf|ps|svg}] [-or 640x480]",+  "             -if IFILE [-tf TF] ",+  "             [{+|-}k Pat1 Kind1 {+|-}k Pat2 Kind2 ...] [{+|-}dk KindN]",+  "             [-fromTime TIME] [-toTime TIME] [-baseTime TIME]",+  "  -o  OFILE  - output file",+  "  -of        - output format (default: extension of -o)",+#endif   "  -or        - output resolution (default 640x480)",   "  -if IFILE  - input file; '-' means 'read from stdin'",   "  -tf TF     - time format: -tf 'date PATTERN' means that times are dates in the format",@@ -823,7 +840,9 @@       PDF    -> renderableToPDFFile ;       PS     -> renderableToPSFile  ;       SVG    -> renderableToSVGFile ;+#ifdef HAVE_GTK                 Window -> \c w h f -> renderableToWindow c w h+#endif               }   case conf of     ConcreteConf {
timeplot.cabal view
@@ -1,5 +1,5 @@ name: timeplot-version: 0.3.11+version: 0.3.12 cabal-version: >=1.6 build-type: Simple license: BSD3