parse_toggle_state() only returns 0 or 1, so check for 1 directly.
[privoxy.git] / encode.c
index e390146..7cf77e8 100644 (file)
--- a/encode.c
+++ b/encode.c
@@ -1,4 +1,4 @@
-const char encode_rcs[] = "$Id: encode.c,v 1.14 2008/05/21 15:38:13 fabiankeil Exp $";
+const char encode_rcs[] = "$Id: encode.c,v 1.16 2010/06/13 12:27:39 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/encode.c,v $
@@ -6,7 +6,7 @@ const char encode_rcs[] = "$Id: encode.c,v 1.14 2008/05/21 15:38:13 fabiankeil E
  * Purpose     :  Functions to encode and decode URLs, and also to
  *                encode cookies and HTML text.
  *
- * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
+ * Copyright   :  Written by and Copyright (C) 2001 the
  *                Privoxy team. http://www.privoxy.org/
  *
  *                Based on the Internet Junkbuster originally written
@@ -81,7 +81,7 @@ static const char * const html_code_map[256] = {
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-   NULL, NULL, NULL, NULL,""",NULL,NULL,NULL,"&",NULL,
+   NULL, NULL, NULL, NULL,""",NULL,NULL,NULL,"&","'",
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    "<",NULL,">",NULL,NULL, NULL, NULL, NULL, NULL, NULL,
@@ -305,12 +305,12 @@ static int xdtoi(const int d)
  *********************************************************************/
 int xtoi(const char *s)
 {
-   int d1, d2;
+   int d1;
 
    d1 = xdtoi(*s);
    if(d1 >= 0)
    {
-      d2 = xdtoi(*(s+1));
+      int d2 = xdtoi(*(s+1));
       if(d2 >= 0)
       {
          return (d1 << 4) + d2;