Re: Rev 8911: Honor 0x and 0 prefixes as numeric base indication when parsing squid.conf in http://squid-cache.org/bzr/squid3/trunk/

2008-04-04 Thread Henrik Nordstrom
tor 2008-04-03 klockan 08:24 -0600 skrev Alex Rousskov:

 The following is the message I had to manually forward to the commit
 list because I have not yet learned how to configure bzr to
 automatically pick sendto addresses based on the branch. The trunk
 commit message was sent to me and I forwarded it.

Robert has a cron job which sends mails about commits on trunk, at least
most of the time..

Regards
Henrik



Re: Rev 8911: Honor 0x and 0 prefixes as numeric base indication when parsing squid.conf in http://squid-cache.org/bzr/squid3/trunk/

2008-04-03 Thread Amos Jeffries

Is the following a sign that bundlebuggy is working in two locations now?

Amos

Alex Rousskov wrote:

At http://squid-cache.org/bzr/squid3/trunk/


revno: 8911
revision-id:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Alex Rousskov [EMAIL PROTECTED]
branch nick: trunk
timestamp: Wed 2008-04-02 22:41:41 -0600
message:
  Honor 0x and 0 prefixes as numeric base indication when parsing squid.conf
  integer options.
  
  Squid3 parses squid.conf file integers as decimal numbers while Squid2 honors

  0 and 0x prefixes (indicating octal and hex numbers). The later functionality
  is needed for things like unmask that are traditionally specified using octal
  format.
  
  This patch changes Squid3 behavior to match that of Squid2.

  Internally, Squid3 uses sscanf and Squid2 uses strtol.
  
  TODO: Squid3::GetInteger should probably use xatol,

  and xatol should be fixed to proper verify the result of strtol.
modified:
  src/Parsing.cc parsing.cc-20050103230824-8ncl0k4q72wd-1



=== modified file 'src/Parsing.cc'
--- a/src/Parsing.cc2007-08-13 23:20:50 +
+++ b/src/Parsing.cc2008-04-03 04:41:41 +
@@ -89,7 +89,8 @@
 if (token == NULL)
 self_destruct();
 
-if (sscanf(token, %d, i) != 1)

+// %i honors 0 and 0x prefixes, which are important for things like umask
+if (sscanf(token, %i, i) != 1)
 self_destruct();
 
 return i;







Re: Rev 8911: Honor 0x and 0 prefixes as numeric base indication when parsing squid.conf in http://squid-cache.org/bzr/squid3/trunk/

2008-04-03 Thread Alex Rousskov
On Thu, 2008-04-03 at 23:05 +1300, Amos Jeffries wrote:
 Is the following a sign that bundlebuggy is working in two locations now?

The following is the message I had to manually forward to the commit
list because I have not yet learned how to configure bzr to
automatically pick sendto addresses based on the branch. The trunk
commit message was sent to me and I forwarded it.

I am committing a lot of stuff to the eCAP branch and I did not want to
spam the commit list with that...

Cheers,

Alex.


 Alex Rousskov wrote:
  At http://squid-cache.org/bzr/squid3/trunk/
  
  
  revno: 8911
  revision-id:[EMAIL PROTECTED]
  parent: [EMAIL PROTECTED]
  committer: Alex Rousskov [EMAIL PROTECTED]
  branch nick: trunk
  timestamp: Wed 2008-04-02 22:41:41 -0600
  message:
Honor 0x and 0 prefixes as numeric base indication when parsing squid.conf
integer options.

Squid3 parses squid.conf file integers as decimal numbers while Squid2 
  honors
0 and 0x prefixes (indicating octal and hex numbers). The later 
  functionality
is needed for things like unmask that are traditionally specified using 
  octal
format.

This patch changes Squid3 behavior to match that of Squid2.
Internally, Squid3 uses sscanf and Squid2 uses strtol.

TODO: Squid3::GetInteger should probably use xatol,
and xatol should be fixed to proper verify the result of strtol.
  modified:
src/Parsing.cc parsing.cc-20050103230824-8ncl0k4q72wd-1
  
  
  
  === modified file 'src/Parsing.cc'
  --- a/src/Parsing.cc2007-08-13 23:20:50 +
  +++ b/src/Parsing.cc2008-04-03 04:41:41 +
  @@ -89,7 +89,8 @@
   if (token == NULL)
   self_destruct();
   
  -if (sscanf(token, %d, i) != 1)
  +// %i honors 0 and 0x prefixes, which are important for things like 
  umask
  +if (sscanf(token, %i, i) != 1)
   self_destruct();
   
   return i;