[SAL-HELP] Pretty Print Output (line wrapping)
Bruno Dutertre
bruno at csl.sri.com
Mon Nov 12 16:24:17 PST 2007
Srihari Sukumaran wrote:
> Hi
>
> In the pretty-printed output from sal the lines get "wrapped" when they are
> too long. For example, i get the following from sal-atg:
>
> Step 1:
> --- Input Variables (assignments) ---
> cp_OAD_scan_was_NOT_triggerred_from_Download_Succesful_state =
> false
> i_event = V_upon_Switching_from_Standby_to_Semistandby
> i_signalled_software_version = 0
> --- System Variables (assignments) ---
> state_ON = s_INACTIVE
>
>
> Here the line starting with "cp_OAD" has wrapped; the value "false" is on
> next line. Is there any way to turn this off? I want each "<variable> =
> <value>" to be on one line regardless of length.
>
> Regards,
> Srihari
Hi Srihari,
There are four parameters that allow you to control pretty printing (to some extent).
For most tools, they can be set via command-line options
--pp-max-width=<num>
--pp-max-ribbon=<num>
--pp-max-depth=<num>
--pp-num-lines=<num>
For some reason, sal-atg does not seem to support these options. You can fix this by
editing the script sal-atg-front-end.scm (should be in directory <saltopdir>/src).
Search for a line
(front-end/set-categories! '("Help" "Misc" "Module" ....))
then add "Pretty Printing" in there:
(front-end/set-categories! '("Help" "Misc" "Module" "Pretty Printing" ....))
An alternative is to directly set the parameters from within sal-atg by calling
the following functions:
(sal/set-pp-max-depth! max)
(sal/set-pp-max-width! max)
(sal/set-pp-max-ribbon! max)
(sal/set-pp-max-num-lines! max)
For example, you could edit the file sal-atg-front-end.scm and add
(sal/set-pp-max-ribbon! 80)
(sal/set-pp-max-width! 100)
If you have the SAL source, these functions are defined in sal-pp.scm.
(also check pretty.scm).
Good luck,
Bruno
More information about the SAL-HELP
mailing list