Skip to content
Snippets Groups Projects
Commit 6ead6d86 authored by Patrick Baudin's avatar Patrick Baudin
Browse files

lint some files

parent d295142b
No related branches found
No related tags found
No related merge requests found
Showing
with 58 additions and 58 deletions
......@@ -13,4 +13,4 @@ Muriel Roger <muriel.roger@cea.fr>
<loic.correnson@cea.fr> <lcorrenson@gmail.com>
<loic.correnson@cea.fr> <loïc.correnson@cea.fr>
Géraud Canet <geraud.canet@cea.fr>
<mounir.assaf@cea.fr> <mounir.assaf@cea.Fr>
\ No newline at end of file
<mounir.assaf@cea.fr> <mounir.assaf@cea.Fr>
......@@ -53,19 +53,19 @@ let rec traverse t =
let n = size t in
let tag = tag t in
if tag < no_scan_tag then begin
count := !count + 1 + n;
for i = 0 to n - 1 do
let f = field t i in
if is_block f then traverse f
done
count := !count + 1 + n;
for i = 0 to n - 1 do
let f = field t i in
if is_block f then traverse f
done
end else if tag = string_tag then
count := !count + 1 + n
count := !count + 1 + n
else if tag = double_tag then
count := !count + size_of_double
count := !count + size_of_double
else if tag = double_array_tag then
count := !count + 1 + size_of_double * n
count := !count + 1 + size_of_double * n
else
incr count
incr count
end
end
......@@ -80,8 +80,8 @@ let res () =
let size_w ?except o =
reset_table ();
(match except with
| None -> ()
| Some except -> traverse (repr except)
| None -> ()
| Some except -> traverse (repr except)
);
count := 0;
traverse (repr o);
......
......@@ -57,19 +57,19 @@ let rec traverse t =
let n = size t in
let tag = tag t in
if tag < no_scan_tag then begin
count := !count + 1 + n;
for i = 0 to n - 1 do
let f = field t i in
if is_block f then traverse f
done
count := !count + 1 + n;
for i = 0 to n - 1 do
let f = field t i in
if is_block f then traverse f
done
end else if tag = string_tag then
count := !count + 1 + n
count := !count + 1 + n
else if tag = double_tag then
count := !count + size_of_double
count := !count + size_of_double
else if tag = double_array_tag then
count := !count + 1 + size_of_double * n
count := !count + 1 + size_of_double * n
else
incr count
incr count
end
end
......
......@@ -5,4 +5,4 @@ V3
V2
New dictionary output using #define
V1
Initial release
\ No newline at end of file
Initial release
#!/bin/sh
emacs 1max.c
\ No newline at end of file
emacs 1max.c
/transf
\ No newline at end of file
/transf
......@@ -3,4 +3,4 @@ CALL(main)
&& _X_ (!RETURN(opb)
&& _X_ (!CALL(opa)
&& _X_ (RETURN(opb)
&& _X_ (RETURN(main))))))
\ No newline at end of file
&& _X_ (RETURN(main))))))
......@@ -87,7 +87,7 @@ module Generator (G : Odoc_html.Html_generator) = struct
self#html_of_custom b info.Odoc_info.i_custom
(** Print html code for the first sentence of a description.
The titles and lists in this first sentence has been removed.*)
The titles and lists in this first sentence has been removed.*)
method html_of_info_first_sentence b = function
| None -> ()
| Some info ->
......
let run () =
Self.result "Hello, world!";
let product =
Self.feedback ~level:2 "Computing the product of 11 and 5...";
let product =
Self.feedback ~level:2 "Computing the product of 11 and 5...";
11 * 5
in
Self.result "11 * 5 = %d" product
......@@ -38,7 +38,7 @@ val get_stmts : t_elem list -> t_stmt_elems -> t_stmt list ;;
(* retrouver les éléments correspondant à une instruction *)
val get_elems : t_stmt -> t_stmt_elems -> t_elem list ;;
type t_state
type t_state
type t_data
......
\setbeamerfont{section in head}{size=\scriptsize}
\ No newline at end of file
\setbeamerfont{section in head}{size=\scriptsize}
......@@ -26,4 +26,4 @@
% Local Variables:
% ispell-local-dictionary: "english"
% TeX-master: "slides.tex"
% End:
\ No newline at end of file
% End:
......@@ -89,4 +89,4 @@
% Local Variables:
% TeX-master: "slides.tex"
% ispell-local-dictionary: "english"
% End:
\ No newline at end of file
% End:
......@@ -35,4 +35,4 @@ on n'
prompt, sinon l'utilisateur il croit que ça fait partie de la commande.
Le style "verbatim" fait partie des éléments qui aident à reconnaître
les commandes qui peuvent être tappées, et puis on peut/pourra aussi
tout faire dans l'interface graphique.
\ No newline at end of file
tout faire dans l'interface graphique.
......@@ -3,4 +3,4 @@ void main()
//@ loop unroll 20; // should be 21
for (int i = 0 ; i <= 20 ; i ++) {
}
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ void main(void)
/*@ loop pragma WIDEN_HINTS i, 12, 13; */
for (i=0; i<n; i++)
j = 4 * i + 7;
}
\ No newline at end of file
}
Reference_implementation is extracted from http://www.schneier.com/code/skein.zip
\ No newline at end of file
Reference_implementation is extracted from http://www.schneier.com/code/skein.zip
......@@ -54,4 +54,4 @@ Frama_C_watch_cardinal() allows to set a maximum number of elements
associated to lvalue in the abstract memory state. This is useful
in order to watch variables that should remain precise during
the entire execution (e.g. should remain a singleton) but which can
take different values at different points.
\ No newline at end of file
take different values at different points.
......@@ -105,7 +105,7 @@ let has_no_warning_nor_error = ref true
let warn fmt =
pp_job_first_line ();
if !exit_on_warning then
has_no_warning_nor_error := false ;
has_no_warning_nor_error := false ;
Format.printf "- [warning] ";
Format.printf fmt
......@@ -164,7 +164,7 @@ let get_string_null (ic:in_channel) =
*
* Defaults to reading the file entirely since any integer will ever be greater
* or equal than [max_int].
*)
*)
let read_lines ?nlines:(nlines=max_int) get_line filename =
let lines = ref [] in
let ic = if filename = "--stdin" then stdin else open_in filename in
......@@ -355,7 +355,7 @@ let get_header_files ?directories:(dirs=(get_header_dirs ())) () :
warn "%s: duplicated license name (same contents as file: %s)@." filepath previous_entry
else
error ~exit_value:7
"%s: duplicated license name (contents differs to file: %s)@." filepath previous_entry
"%s: duplicated license name (contents differs to file: %s)@." filepath previous_entry
with Not_found -> ());
Hashtbl.add license_path_tbl license_name filepath;
)
......@@ -408,7 +408,7 @@ let extract_header filename template_hdr =
* @param headers a license header -> template header file hashtable
* @requires all files in specs exist
* @requires all header specifications have a corresponding existing template
*)
*)
let check_spec_discrepancies
(specs: (string, string) Hashtbl.t)
(headers: (string, string) Hashtbl.t) : unit =
......@@ -433,18 +433,18 @@ let check_spec_discrepancies
let hdr_file_spec = Hashtbl.find headers hdr_type in
(* Guaranteed to exists after check_declared_headers *)
if not (eq_header file hdr_file_spec) then begin
discrepancies := (file, hdr_type) :: !discrepancies;
incr n;
discrepancies := (file, hdr_type) :: !discrepancies;
incr n;
end;
end
) specs ;
) specs ;
if !n > 0 then begin
error ~exit_value:4 "@[<v 2>%a%d / %d files with bad headers@]@."
(fun _ppf l ->
List.iter
(fun (file, hdr_type) ->
error_fmt "%s : header differs from spec %s@."
file hdr_type
file hdr_type
) l) !discrepancies
!n
(Hashtbl.length specs) ;
......@@ -473,8 +473,8 @@ let check_forbidden_headers (forbidden_headers:StringSet.t) header_specification
error_fmt "%s : forbidden header %s@."
file hdr_type
) l) !forbidden
!n
(StringSet.cardinal distributed_files);
!n
(StringSet.cardinal distributed_files);
job_done ()
end
......@@ -543,7 +543,7 @@ let check files_ignored header_specifications distributed_files exceptions =
*
* @param header_specifications file -> license header name hashtable
* @requires: files and licenses appearing in [header_specifications] exists
*)
*)
let update_headers header_specifications =
let headers = get_header_files () in
check_declared_headers header_specifications headers;
......@@ -640,7 +640,7 @@ let rec argspec = [
| "3-lines" -> spec_format := Line3
| "3-zeros" -> spec_format := Zero3
| s -> Format.printf "invalid spec format: %s@." s ; print_usage ()),
"<format>\t \"2-fields-by-line\"|\"3-fields-by-line\"|\"3-lines\"|\"3-zeros\"";
"<format>\t \"2-fields-by-line\"|\"3-fields-by-line\"|\"3-lines\"|\"3-zeros\"";
"-z", Arg.Set zero_stdin,
" force to use the spec format \"3-zeros\" when reading from stdin";
]
......@@ -693,6 +693,6 @@ let _ =
if !exit_on_warning && not !has_no_warning_nor_error then
exit 8 ;
(* Local Variables: *)
(* compile-command: "ocamlc -o hdrck unix.cma str.cma hdrck.ml" *)
(* End: *)
(* Local Variables: *)
(* compile-command: "ocamlc -o hdrck unix.cma str.cma hdrck.ml" *)
(* End: *)
......@@ -25,11 +25,11 @@
(* -------------------------------------------------------------------------- *)
module Self = Plugin.Register
(struct
let name = "Server TypeScript API"
let shortname = "server-tsc"
let help = "Generate TypeScript API for Server"
end)
(struct
let name = "Server TypeScript API"
let shortname = "server-tsc"
let help = "Generate TypeScript API for Server"
end)
module TSC = Self.Action
(struct
......@@ -353,7 +353,7 @@ let makeDeclaration fmt names d =
(Pretty_utils.pp_list
~empty:"[]" ~pre:"@[<hov 2>[ " ~sep:",@ " ~suf:"@ ]@]"
(fun fmt s -> Format.fprintf fmt "{ name: '%s' }" s))
rq.rq_signals;
rq.rq_signals;
Format.fprintf fmt "};@\n" ;
makeDescr fmt d.d_descr ;
Format.fprintf fmt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment