projects/aports·blob master · refs

42 lines · 2.2 KiB

1diff --git a/util/common-functions.sh.in b/util/common-functions.sh.in
2index 38049e3..54cfd6b 100644
3--- a/util/common-functions.sh.in
4+++ b/util/common-functions.sh.in
5@@ -40,7 +40,7 @@ setInfoSize()
6 DICTTIMETORECV DICTSIGNALRATE DICTDATAFORMAT DICTERRCORRECT \
7 DICTCALLID1 DICTCALLID2 DICTCALLID3 DICTCALLID4 DICTCALLID \
8 DICTCALLID6 DICTCALLID7 DICTRECEIVEDON DICTCOMMID; do
9- THISLEN="`eval echo \\\""$"$ITEM\\\" | $AWK 'BEGIN {L=0} length>L {L=length} END {print L}' | $SED 's/ //g'`"
10+ THISLEN=`eval 'echo ${#'$ITEM'}'`
11 if [ $THISLEN -gt $INFOSIZE ]; then INFOSIZE=$THISLEN; fi
12 done
13 }
14@@ -57,7 +57,7 @@ setItemSize()
15 DICTCALLS DICTPAGES DICTATTEMPTS DICTDIRNUM DICTRECEIVER DICTQUALITY \
16 DICTPAGEWIDTH DICTPAGELENGTH DICTDATAFORMAT DICTREMOTEEQUIPMENT \
17 DICTREMOTESTATION DICTSIGNALRATE; do
18- THISLEN="`eval echo \\\""$"$ITEM\\\" | $AWK 'BEGIN {L=0} length>L {L=length} END {print L}' | $SED 's/ //g'`"
19+ THISLEN=`eval 'echo ${#'$ITEM'}'`
20 if [ $THISLEN -gt $ITEMSIZE ]; then ITEMSIZE=$THISLEN; fi
21 done
22 }
23@@ -146,12 +146,12 @@
24 } p("faxstatus", status);
25 next;
26 }
27- /^[!]*post/ { p("files_"++nfiles, $4); p("filetype_"nfiles, "PostScript"); next; }
28- /^[!]*tiff/ { p("files_"++nfiles, $4); p("filetype_"nfiles, "TIFF"); next; }
29- /^[!]*pdf/ { p("files_"++nfiles, $4); p("filetype_"nfiles, "PDF"); next; }
30- /^[!]*pcl/ { p("files_"++nfiles, $4); p("filetype_"nfiles, "PCL"); next; }
31- /^page:/ { p("pins_"++npins, $4); next; }
32- /^data:/ { p("files_"++nfiles, $4); next; }
33+ /^[!]*post/ { ++nfiles; p("files_"nfiles, $4); p("filetype_"nfiles, "PostScript"); next; }
34+ /^[!]*tiff/ { ++nfiles; p("files_"nfiles, $4); p("filetype_"nfiles, "TIFF"); next; }
35+ /^[!]*pdf/ { ++nfiles; p("files_"nfiles, $4); p("filetype_"nfiles, "PDF"); next; }
36+ /^[!]*pcl/ { ++nfiles; p("files_"nfiles, $4); p("filetype_"nfiles, "PCL"); next; }
37+ /^page:/ { ++npins; p("pins_"npins, $4); next; }
38+ /^data:/ { ++nfiles; p("files_"nfiles, $4); next; }
39 /^poll/ { p("poll", " -p"); next; }
40 # Only parse remaining valid lines and allows for colons to appear in the value part
41 /^[a-z]+:/ { str = $0; sub($1":", "", str); p($1, str); next; }
42