From 19f0db13a469a75a5aee66b36a05b692011faa02 Mon Sep 17 00:00:00 2001 From: pad Date: Sun, 31 Oct 2010 17:33:48 -0700 Subject: [PATCH] misc --- commons/file_type.ml | 18 +++++++++++------- h_program-lang/highlight_code.ml | 4 ++-- h_visualization/treemap.ml | 4 ++-- visual/draw_microlevel.ml | 3 ++- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/commons/file_type.ml b/commons/file_type.ml index 3db3a463d..a6dd09d41 100644 --- a/commons/file_type.ml +++ b/commons/file_type.ml @@ -84,15 +84,14 @@ let file_type_of_file2 file = | "mlp" (* used in emacs source *) -> PL (ML e) - | "lml" (* linear ML *) - -> PL (ML e) - | "sml" - -> PL (ML e) + | "sml" -> PL (ML e) (* fsharp *) - | "fsi" - -> PL (ML e) + | "fsi" -> PL (ML e) + (* linear ML *) + | "lml" -> PL (ML e) | "hs" | "lhs" -> PL (Haskell e) + | "erl" -> PL Erlang | "bet" -> PL Beta @@ -125,13 +124,18 @@ let file_type_of_file2 file = | "s" | "S" | "asm" -> PL Asm + | "c--" -> PL (MiscPL e) + | "R" | "Rd" -> PL (R e) + | "scala" -> PL (MiscPL e) + | "sh" -> PL (Script e) | "m4" -> PL (MiscPL e) | "conf" -> PL (MiscPL e) - | "scala" -> PL (MiscPL e) + (* Andrew Appel's Tiger toy language *) + | "tig" -> PL (MiscPL e) (* merd *) | "me" -> PL (MiscPL "me") diff --git a/h_program-lang/highlight_code.ml b/h_program-lang/highlight_code.ml index 98bfadae1..baed6cef9 100644 --- a/h_program-lang/highlight_code.ml +++ b/h_program-lang/highlight_code.ml @@ -450,7 +450,7 @@ The big principles for the colors, fonts, and strikes are: - purple: fields - yellow: functions (and macros) - blue: globals, variables - - pink: macros + - pink: constants, macros - cyan and big: global, turquoise and big: remote global, @@ -725,7 +725,7 @@ let info_of_category = function [`FOREGROUND "MediumPurple1"] ++ info_of_usedef (Def) | Field (Use2 _) -> - [`FOREGROUND "MediumPurple1"] ++ info_of_usedef (Use) + [`FOREGROUND "MediumPurple3"] ++ info_of_usedef (Use) | TypeDef usedef -> [`FOREGROUND "YellowGreen"] ++ info_of_usedef usedef diff --git a/h_visualization/treemap.ml b/h_visualization/treemap.ml index da38f46c6..9a8ba4290 100644 --- a/h_visualization/treemap.ml +++ b/h_visualization/treemap.ml @@ -819,7 +819,7 @@ let render_treemap_algo2 = fun ?(algo=Classic) ?(big_borders=false) treemap -> if not big_borders then match depth with | 1 -> 0.0 - | 2 -> 0.002 + | 2 -> 0.003 | 3 -> 0.001 | 4 -> 0.0005 | 5 -> 0.0002 @@ -827,7 +827,7 @@ let render_treemap_algo2 = fun ?(algo=Classic) ?(big_borders=false) treemap -> else match depth with | 1 -> 0.0 - | 2 -> 0.002 + | 2 -> 0.003 | 3 -> 0.0015 | 4 -> 0.0010 | 5 -> 0.0008 diff --git a/visual/draw_microlevel.ml b/visual/draw_microlevel.ml index 26165887a..895ff0e62 100644 --- a/visual/draw_microlevel.ml +++ b/visual/draw_microlevel.ml @@ -240,8 +240,9 @@ let draw_content2 ~cr ~layout ~context ~file rect = in Draw_macrolevel.draw_treemap_rectangle ~cr ~color:(Some "DarkSlateGray") ~alpha rect; + (* draw a thin rectangle with aspect color *) CairoH.draw_rectangle_bis ~cr ~color:(rect.T.tr_color) - ~line_width:font_size rect.T.tr_rect; + ~line_width:(font_size / 2.) rect.T.tr_rect; end; (* highlighting layers (and grep-like queries) *)