On Sun, Apr 07, 2013 at 11:02:23PM +0530, son...@iitk.ac.in wrote:
> 
> I have attached the code that is working now from the code the statement
> inserted is of form:
>  printf("value of if count \n", __cil_tmp4);
> 
> but i want something like
>  printf("value of if count %d\n", __cil_tmp4);

Your function d_string calls CIL's printf, which interprets the string.  But in
your case, "%d" is intended to be interpreted by C's printf, so you have to
escape it a the OCaml level, using "%%d" instead.

See http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printf.html and
http://kerneis.github.io/cil/doc/html/cil/api/Pretty.html for more details on
how escaping works in OCaml/CIL.

Best,
-- 
Gabriel

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to