summaryrefslogtreecommitdiffstats
path: root/contrib/awk/awklib/eg/prog/labels.awk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/awk/awklib/eg/prog/labels.awk')
-rw-r--r--contrib/awk/awklib/eg/prog/labels.awk54
1 files changed, 0 insertions, 54 deletions
diff --git a/contrib/awk/awklib/eg/prog/labels.awk b/contrib/awk/awklib/eg/prog/labels.awk
deleted file mode 100644
index fa9c4da..0000000
--- a/contrib/awk/awklib/eg/prog/labels.awk
+++ /dev/null
@@ -1,54 +0,0 @@
-# labels.awk --- print mailing labels
-#
-# Arnold Robbins, arnold@gnu.org, Public Domain
-# June 1992
-
-# Each label is 5 lines of data that may have blank lines.
-# The label sheets have 2 blank lines at the top and 2 at
-# the bottom.
-
-BEGIN { RS = "" ; MAXLINES = 100 }
-
-function printpage( i, j)
-{
- if (Nlines <= 0)
- return
-
- printf "\n\n" # header
-
- for (i = 1; i <= Nlines; i += 10) {
- if (i == 21 || i == 61)
- print ""
- for (j = 0; j < 5; j++) {
- if (i + j > MAXLINES)
- break
- printf " %-41s %s\n", line[i+j], line[i+j+5]
- }
- print ""
- }
-
- printf "\n\n" # footer
-
- for (i in line)
- line[i] = ""
-}
-
-# main rule
-{
- if (Count >= 20) {
- printpage()
- Count = 0
- Nlines = 0
- }
- n = split($0, a, "\n")
- for (i = 1; i <= n; i++)
- line[++Nlines] = a[i]
- for (; i <= 5; i++)
- line[++Nlines] = ""
- Count++
-}
-
-END \
-{
- printpage()
-}
OpenPOWER on IntegriCloud