improve handling of @@line continuations
[privoxy.git] / encode.c
index 8676fc9..58ba501 100644 (file)
--- a/encode.c
+++ b/encode.c
@@ -1,4 +1,3 @@
-const char encode_rcs[] = "$Id: encode.c,v 1.27 2012/03/09 17:55:49 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/encode.c,v $
@@ -44,8 +43,6 @@ const char encode_rcs[] = "$Id: encode.c,v 1.27 2012/03/09 17:55:49 fabiankeil E
 #include "miscutil.h"
 #include "encode.h"
 
-const char encode_h_rcs[] = ENCODE_H_VERSION;
-
 /* Maps special characters in a URL to their equivalent % codes. */
 static const char url_code_map[256][4] = {
    "",    "%01", "%02", "%03", "%04", "%05", "%06", "%07", "%08", "%09",
@@ -158,9 +155,10 @@ char * html_encode(const char *s)
       }
 
       *p = '\0';
+
+      assert(strlen(buf) < buf_size);
    }
 
-   assert(strlen(buf) < buf_size);
    return(buf);
 }
 
@@ -253,9 +251,9 @@ char * url_encode(const char *s)
 
       *p = '\0';
 
+      assert(strlen(buf) < buf_size);
    }
 
-   assert(strlen(buf) < buf_size);
    return(buf);
 }
 
@@ -448,9 +446,9 @@ char *percent_encode_url(const char *s)
          }
       }
       *p = '\0';
-   }
 
-   assert(strlen(buf) < buf_size);
+      assert(strlen(buf) < buf_size);
+   }
 
    return(buf);