Add -t flag to specify title of report.
devs = OptDeviations `elem` flags
nodevs = OptNoDeviations `elem` flags
devs = OptDeviations `elem` flags
nodevs = OptNoDeviations `elem` flags
+default_title = "NoFib Results"
+reportTitle = case [ t | OptTitle t <- flags ] of
+ [] -> default_title
+ (t:_) -> t
+
data CLIFlags
= OptASCIIOutput
| OptHTMLOutput
| OptIgnoreSmallTimes Float
| OptDeviations
| OptNoDeviations
data CLIFlags
= OptASCIIOutput
| OptHTMLOutput
| OptIgnoreSmallTimes Float
| OptDeviations
| OptNoDeviations
"Display deviations (default)"
, Option ['n'] ["nodeviations"] (NoArg OptNoDeviations)
"Hide deviations"
"Display deviations (default)"
, Option ['n'] ["nodeviations"] (NoArg OptNoDeviations)
"Hide deviations"
+ , Option ['t'] ["title"] (ReqArg OptTitle "title")
+ "Specify report title"
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.3 2000/03/02 11:39:45 keithw Exp $
+-- $Id: Main.hs,v 1.4 2000/07/05 15:42:19 keithw Exp $
-- (c) Simon Marlow 1997-1999
-----------------------------------------------------------------------------
-- (c) Simon Marlow 1997-1999
-----------------------------------------------------------------------------
-- HTML page generation
htmlPage results args
-- HTML page generation
htmlPage results args
- = header [] (theTitle [] (htmlStr "NoFib Results"))
+ = header [] (theTitle [] (htmlStr reportTitle))
+ +++ h1 [] (htmlStr reportTitle)
+++ gen_menu
+++ bar []
+++ body [] (gen_tables results args)
+++ gen_menu
+++ bar []
+++ body [] (gen_tables results args)
+++ foldr1 (+++) (map (htmlGenModTable results args) per_module_result_tab)
htmlGenProgTable results args (SpecP title anc get_result get_status result_ok)
+++ foldr1 (+++) (map (htmlGenModTable results args) per_module_result_tab)
htmlGenProgTable results args (SpecP title anc get_result get_status result_ok)
- = sectHeading title anc
+ = sectHeading title anc
+++ font [size 1] (
mkTable (htmlShowResults results args get_result get_status result_ok))
+++ bar []
+++ font [size 1] (
mkTable (htmlShowResults results args get_result get_status result_ok))
+++ bar []
-- ASCII page generation
asciiPage results args =
-- ASCII page generation
asciiPage results args =
- ( interleave "\n\n" (map (asciiGenProgTable results args) per_prog_result_tab)
+ ( str reportTitle
+ . str "\n\n"
+ . interleave "\n\n" (map (asciiGenProgTable results args) per_prog_result_tab)
. str "\n"
. interleave "\n\n" (map (asciiGenModTable results args) per_module_result_tab)
) "\n"
. str "\n"
. interleave "\n\n" (map (asciiGenModTable results args) per_module_result_tab)
) "\n"