[MAJOR: '@copyright' and '@license' tags.
argot@x9c.fr**20110623045324
Ignore-this: 98b4392411756fda539b4efc69d37eb9
] hunk ./src/main.ml 185
+ method private register_tag_with_prefix_and_modifier name prefix modifier =
+ let impl text =
+ let text = self#string_of_text text in
+ prefix ^ (modifier text) ^ "
\n" in
+ tag_functions <- tag_functions @ [name, impl]
+
hunk ./src/main.ml 212
+ self#register_tag_with_prefix "copyright" "Copyright: ";
+ self#register_tag_with_prefix_and_modifier "license" "License: "
+ (fun text ->
+ let enclose addr =
+ Printf.sprintf "%s" addr text in
+ match String.lowercase text with
+ | "gpl" | "gpl1" | "gplv1" ->
+ enclose "http://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
+ | "gpl2" | "gplv2" ->
+ enclose "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
+ | "gpl3" | "gplv3" ->
+ enclose "http://www.gnu.org/licenses/gpl.html"
+ | "lgpl" | "lgplv2" ->
+ enclose "http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
+ | "lgpl21" | "lgpl2.1" | "lgpl2_1" | "lgplv21" | "lgplv2.1" | "lgplv2_1" ->
+ enclose "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
+ | "lgpl3" | "lgplv3" ->
+ enclose "http://www.gnu.org/licenses/lgpl.html"
+ | "agpl" ->
+ enclose "http://www.gnu.org/licenses/agpl.html"
+ | _ -> text);
+