"Fossies" - the Fresh Open Source Software Archive

Member "msmtp-1.8.17/po/insert-header.sin" (12 Mar 2021, 906 Bytes) of package /linux/privat/msmtp-1.8.17.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "insert-header.sin": 1.8.14_vs_1.8.15.

    1 # Sed script that inserts the file called HEADER before the header entry.
    2 #
    3 # Copyright (C) 2001 Free Software Foundation, Inc.
    4 # Written by Bruno Haible <bruno@clisp.org>, 2001.
    5 # This file is free software; the Free Software Foundation gives
    6 # unlimited permission to use, copy, distribute, and modify it.
    7 #
    8 # At each occurrence of a line starting with "msgid ", we execute the following
    9 # commands. At the first occurrence, insert the file. At the following
   10 # occurrences, do nothing. The distinction between the first and the following
   11 # occurrences is achieved by looking at the hold space.
   12 /^msgid /{
   13 x
   14 # Test if the hold space is empty.
   15 s/m/m/
   16 ta
   17 # Yes it was empty. First occurrence. Read the file.
   18 r HEADER
   19 # Output the file's contents by reading the next line. But don't lose the
   20 # current line while doing this.
   21 g
   22 N
   23 bb
   24 :a
   25 # The hold space was nonempty. Following occurrences. Do nothing.
   26 x
   27 :b
   28 }