URL:
  <https://savannah.gnu.org/bugs/?61012>

                 Summary: [mom] om.tmac: an empty argument to ".substring"
produces a warning
                 Project: GNU troff
            Submitted by: bjarniig
            Submitted on: Thu 05 Aug 2021 12:06:56 AM UTC
                Category: Macro - mom
                Severity: 3 - Normal
              Item Group: Warning/Suspicious behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:



troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':7037: macro
'HEADER_VERSO'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':7345: macro
'PRINT_USERDEF_HDRFTR'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':7080: macro
'PRINT_HDRFTR'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':7434: trap-called
macro 'HEADER'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':7858: macro
'DO_FOOTER'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':7841: trap-called
macro 'FOOTER'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':260: macro
'NEWPAGE'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':5788: macro
'END_COVER'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':5766: macro
'DO_COVER'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/om.tmac':5873: macro
'START'
troff: backtrace: file '../contrib/mom/examples/slide-demo.mom':83
troff: ../contrib/mom/examples/slide-demo.mom:83: warning: start and end index
of substring out of range

  HEADER_VERSO is an alias of HDRFTR_VERSO.

  Code snippet:

.    ds $QUAD_TYPE \\$1
.    substring $QUAD_TYPE 0 0
.    if '\\*[$QUAD_TYPE]'L'     .nr #USERDEF_HDRFTR_VERSO_QUAD 1

  If the argument to "substring" is empty, 
a test for that would be appropriate.






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61012>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply via email to