/usr/share/doc/ats-lang-anairiats-examples/examples/TEST/libc_printf.dats is in ats-lang-anairiats-examples 0.2.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | (*
** some testing code for functions declared in
** libc/SATS/printf.sats
*)
//
// Author: Hongwei Xi (hwxi AT cs DOT bu DOT edu)
// Time: September, 2010
//
(* ****** ****** *)
staload "libc/SATS/printf.sats"
(* ****** ****** *)
implement
main () = () where {
//
val ntot = printf ("%s", @("abcdefghijklmnopqrstuvwxyz\n"))
val () = assertloc (ntot = 26+1)
val () = (print "ntot = "; print ntot; print_newline ())
//
val (pfout | pout) = stdout_get ()
val ntot = fprintf (file_mode_lte_w_w | !pout, "%s", @("ABCDEFGHIJKLMNOPQRSTUVWXYZ\n"))
val () = assertloc (ntot = 26+1)
val () = (print "ntot = "; print ntot; print_newline ())
val () = stdout_view_set (pfout | (*none*))
//
} // end of [main]
(* ****** ****** *)
(* end of [libc_printf.dats] *)
|