[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4.55 ‘tpl-file-line’ - get the template file+line number

Usage: (tpl-file-line [ msg-fmt ])
Returns the file and line number of the current template macro using either the default format, "from %s line %d", or else the format you supply. For example, if you want to insert a "C" language file-line directive, you would supply the format "# %2$d \"%1$s\"", but that is also already supplied with the scheme variable See section format file info as, “#line nn "file". You may use it thus:

 
(tpl-file-line c-file-line-fmt)

It is also safe to use the formatting string, "%2$d". AutoGen uses an argument vector version of printf: See section Replacement for Stdio Formatting Library, and it does not need to know the types of each argument in order to skip forward to the second argument.

Arguments:
msg-fmt - Optional - formatting for line message


This document was generated by Bruce Korb on August 21, 2015 using texi2html 1.82.