projects
/
oweals
/
cde.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Don't use fstat for readable pipe chars in dtexec.
[oweals/cde.git]
/
cde
/
programs
/
dtterm
/
terminfoCreate
1
#!/bin/ksh
2
# $XConsortium: terminfoCreate /main/3 1996/07/23 17:11:13 drk $
3
4
sed -e '/^##/d' |
5
${CPP:-/lib/cpp} |
6
sed -e '/^[ ]*$/d' \
7
-e '/^#/d' \
8
-e 's/[ ][ ]*$//' |
9
awk '
10
{
11
if (NR == 1) {
12
printf "%s\n", $0;
13
buflen = 0;
14
buffer = "";
15
} else {
16
if ((buflen + length($0)) >= 71) {
17
printf "\t%s\n", buffer;
18
buffer = $0" ";
19
buflen = length($0) + 1;
20
} else {
21
buffer = buffer""$0" ";
22
buflen += length($0) + 1;
23
}
24
}
25
}
26
END {
27
if (buflen > 0) {
28
printf "\t%s\n", buffer;
29
}
30
}'