The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 [Cписок руководств | Печать]

groff_trace (7)
  • >> groff_trace (7) ( FreeBSD man: Макропакеты и соглашения )
  • groff_trace (7) ( Linux man: Макропакеты и соглашения )


    groff_trace - groff macro package trace.tmac


    groff -m trace [optionsEllipsis]] [filesEllipsis]] Elements in brackets denote optional arguments, and the ellipsis means that there can be any number of arguments of this kind.  


    The trace macro package of groff(1) can be a valuable tool for debugging documents written in the roff formatting language. A call stack trace is protocolled on standard error, that means, a diagnostic message is emitted on entering and exiting of a macro call. This greatly eases to track down an error in some macro. This tracing process is activated by specifying the groff or troff command line option -m~trace. This works also with the groffer(1) viewer program. A finer control can be obtained by including the macro file within the document by the groff macro call .mso~trace.tmac. Only macros that are defined after this line are traced. If some other macro package should be traced as well it must be specified after -m~trace on the command line. The macro file trace.tmac is unusual because it does not contain any macros to be called by a user. Instead, the existing macro definition and appending facilities are modified such that they display diagnostic messages.  


    In the following examples, a roff fragment is fed into groff via standard input. As we are only interested in the diagnostic messages (standard error) on the terminal, the normal formatted output (standard output) is redirected into the nirvana device /dev/null. The resulting diagnostic messages are displayed directly below the corresponding example.  

    Command line option


    ell_cmd echo '.


    ell_cmd+ .de test_macro


    ell_cmd+ ..


    ell_cmd+ .test_macro


    ell_cmd+ .test_macro some dummy arguments


    ell_cmd+ ' | groff -m trace >/dev/null

    *** de trace enter: test_macro
    *** trace exit: test_macro
    *** de trace enter: test_macro "some" "dummy" "arguments"
    *** trace exit: test_macro "some" "dummy" "arguments"
    Поиск по тексту MAN-ов: 

    Inferno Solutions
    Hosting by

    Закладки на сайте
    Проследить за страницей
    Created 1996-2023 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру