51 |
close_out channel |
close_out channel |
52 |
|
|
53 |
let options_list = |
let options_list = |
54 |
[("-hwin",Arg.Int (fun y -> ywin := y),"définie la hauteur de la fenêtre graphique"); |
[("--hwin",Arg.Int (fun y -> ywin := y),"définie la hauteur de la fenêtre graphique"); |
55 |
("-lwin",Arg.Int (fun x -> xwin := x),"définie la largeur de la fenêtre graphique"); |
("--lwin",Arg.Int (fun x -> xwin := x),"définie la largeur de la fenêtre graphique"); |
56 |
("-ps",Arg.Unit(fun () -> todo := PS),"génére un fichier Postcript"); |
("--ps",Arg.Unit(fun () -> todo := PS),"génére un fichier Postcript"); |
57 |
("-tex",Arg.Unit(fun () -> todo := LATEX),"génére un fichier LaTeX"); |
("--tex",Arg.Unit(fun () -> todo := LATEX),"génére un fichier LaTeX"); |
58 |
("-xml",Arg.Unit(fun () -> todo := XML),"génère un fichier XML"); |
("--xml",Arg.Unit(fun () -> todo := XML),"génère un fichier XML"); |
59 |
("-gr",Arg.Unit(fun () -> todo := DRAWING),"utilise l'affichage graphique")] |
("--gr",Arg.Unit(fun () -> todo := DRAWING),"utilise l'affichage graphique")] |
60 |
|
|
61 |
let use_message = "Usage : "^Sys.argv.(0)^"[options] fichier source" |
let use_message = "Usage : "^Sys.argv.(0)^"[options] fichier source" |
62 |
|
|
66 |
if !Sys.interactive then () else |
if !Sys.interactive then () else |
67 |
begin |
begin |
68 |
Random.self_init(); |
Random.self_init(); |
69 |
print_string ("GeoCaml v0.0.1\n"); |
print_string ("GeOCaml v0.0.1\n"); |
70 |
Arg.parse options_list treat_end use_message; |
Arg.parse options_list treat_end use_message; |
71 |
(match !toopen with |
(match !toopen with |
72 |
| SOURCE -> analyse !sources |
| SOURCE -> analyse !sources |