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] [hylafax-announce] **ANNOUNCE** 4.2.5 release candidate now available



* Jean-Pierre Radley <jpr@xxxxxxx> [060109 22:51]:
 
> I'm not seeing any of the problems I've been posting about for the last
> few days.  Thanks!

Great!

> OTOH, could some please rephrase the following comment in faxrcvd into
> something I can understand?
> 
> 	# The eval has $1 set yet, and this forces a variable-to-variable
> 	# assignment, allowing us to not need to do escaping
> 
> What does it mean for "the eval" (which particular eval would that be?)
> to "have $1 set yet", and what is a "variable to variable assignment",
> and how does one force it?

The eval is the eval directly following the comment.  The only reason we
need the eval is because we want CALLIDx (where x is the assendin
number, 1, 2, 3, etc) instead of using  bash's non-standard array extension.

So, instead of a simple:
	CALLID1=$1
We need to use an eval, just to get the CALLED1 part set.  The other
option is to have an open coded CALLID1, CALLID2, CALLID3, CALLID4,
CALLID5, CALLID6, etc...

$1 is the value we use, and an assignment such as:
	SOMETHING=$SOMEVAR
is a direct variable to variable assignment - no shell expansion going
on.  So,
	eval CALLID$COUNT='$1'
gets evaluated as:
	CALLID1=$1
when COUNT = 1.  $1 is still the same variable (the arguments as they
have been shifted off)

If you have clearer wording, I'm open to suggestions...  It seemed like
a consice way to point out that we don't need an extra variable, and the
reason why we aren't doing any shell escaping here.

a.

-- 
Aidan Van Dyk                                             aidan@xxxxxxxx
Senior Software Developer                          +1 215 438-4638 x8103
iFAX Solutions, Inc.                                http://www.ifax.com/

Attachment: signature.asc
Description: Digital signature




Project hosted by iFAX Solutions