diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-04-25 15:08:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-04-25 15:08:17 +0000 |
commit | 1a06fa7e4a300880848047118f0adba68d38348d (patch) | |
tree | e6b01d6f4feae969f9905d5245648532db254c42 /perl_checker.src/config_file.ml | |
parent | e895f6b48826f09aeaada321d03a1d10548fc9ce (diff) | |
download | perl-MDK-Common-1a06fa7e4a300880848047118f0adba68d38348d.tar perl-MDK-Common-1a06fa7e4a300880848047118f0adba68d38348d.tar.gz perl-MDK-Common-1a06fa7e4a300880848047118f0adba68d38348d.tar.bz2 perl-MDK-Common-1a06fa7e4a300880848047118f0adba68d38348d.tar.xz perl-MDK-Common-1a06fa7e4a300880848047118f0adba68d38348d.zip |
re-sync after the big svn loss
Diffstat (limited to 'perl_checker.src/config_file.ml')
-rw-r--r-- | perl_checker.src/config_file.ml | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/perl_checker.src/config_file.ml b/perl_checker.src/config_file.ml deleted file mode 100644 index a5ee94f..0000000 --- a/perl_checker.src/config_file.ml +++ /dev/null @@ -1,40 +0,0 @@ -open Common - -type config_file = { - basedir : int option ; - } - -let ignored_packages = ref [] - -let default = { basedir = None } - - -let config_cache = Hashtbl.create 16 - -let read dir = - try Hashtbl.find config_cache dir with Not_found -> - try - let file_name = dir ^ "/.perl_checker" in - let fh = open_in file_name in - let config = - fold_lines (fun config line -> - match words line with - | [ "Basedir"; ".." ] -> { config with basedir = Some 1 } - | [ "Basedir"; "../.." ] -> { config with basedir = Some 2 } - | [] -> config (* blank line *) - | [ "Ignore"; pkg ] - | [ pkg ] (* the deprecated form *) - -> lpush ignored_packages pkg; config - | _ -> prerr_endline (Printf.sprintf "bad line \"%s\" in %s" line file_name); config - ) default fh - in - Hashtbl.add config_cache dir config ; - if !Flags.verbose then print_endline_flush ("reading config file " ^ file_name); - config - with Sys_error _ -> default - - -let rec read_any dir depth = - if depth = 0 then () else - let _ = read dir in - read_any (updir dir 1) (depth - 1) |