HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] internationalization tests



Bodo Meissner wrote:

Am 2006.01.08 11:09 schrieb(en) Holger Bruenjes:

EmpfangenAn: faxCAPI12
KommunikationsID: c000000164

It looks not good for me


If I understand the code correct, it tries to find the longest item to compute the length for the string format. There seems to be something wrong with it.

This approach (when it works) could be used for notify instead of specifying the length in the dictionary.


Yes. This code below is the attempt to determine the longest item length...

setInfoSize()
{
   INFOSIZE=0
   for ITEM in DICTSENDER DICTPAGES DICTQUALITY DICTSIZE DICTRECEIVED \
       DICTTIMETORECV DICTSIGNALRATE DICTDATAFORMAT DICTERRCORRECT \
       DICTCALLID1 DICTCALLID2 DICTCALLID3 DICTCALLID4 DICTCALLID \
       DICTCALLID6 DICTCALLID7 DICTRECEIVEDON DICTCOMMID; do
   printf "%s%n" "`eval echo "$"$ITEM`" THISLEN > /dev/null
   if [ $THISLEN -gt $INFOSIZE ]; then INFOSIZE=$THISLEN; fi
   done
}

It appears that "%n" is not portable.

Is anyone immediately aware of a portable way to determine the character-length of a set shell variable?

Thanks,

Lee.


____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions