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] modem configuration



Jean-Pierre Radley wrote:

And sure enough, here are lines 34-37 in the modem's config file:

  Class1PPMWaitCmd:       "<delay\0727>"  # \072 == :  to avoid awk problem
  Class1TCFWaitCmd:       "<delay\0727>"
  Class1EOPWaitCmd:       "<delay
  Class1SwitchingCmd:     "<delay\0727>"  # assumption: +FRS not supported

I assume that fax addmodem put those lines there, since I certainly
didn't type them.

Something clearly is missing on line 36. What?



Normally it's:


Class1EOPWaitCmd: "<delay:9>"

or

Class1EOPWaitCmd: "<delay\0729>"

And what is the awk problam that the use of \072 for ':' is allegedly
avoiding?



Awk, which is used by faxaddmodem to create the modem config file, uses ":" as a delimiter, because that's how the config item is separated from the value... like this:


ConfigItem: value

When you have a colon in the value field, like this:

ConfigItem: some:value

You then have to instruct any config file parsers to use the *first* colon as the delimiter only. This is easy to do in C++, but there isn't a portable way to do it in awk. So the \072 is a workaround since \072 means the same thing as ":" in the C++ parser but in the awk parser it isn't parsed as a delimiter.

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