]> mj.ucw.cz Git - libucw.git/commitdiff
added skeleton of not yet implemented function url_has_repeated_component()
authorRobert Spalek <robert@ucw.cz>
Wed, 26 Sep 2001 16:46:41 +0000 (16:46 +0000)
committerRobert Spalek <robert@ucw.cz>
Wed, 26 Sep 2001 16:46:41 +0000 (16:46 +0000)
and its configuration items

lib/url.c
lib/url.h

index c345a784cf917d3e4c96d635aa5dc123ab2f20d6..3920aa59f1efd95263b6fff083573d17e2f27b42 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2,6 +2,7 @@
  *     Sherlock Library -- URL Functions (according to RFC 1738 and 1808)
  *
  *     (c) 1997--2001 Martin Mares <mj@ucw.cz>
+ *     (c) 2001 Robert Spalek <robert@ucw.cz>
  */
 
 #include "lib/lib.h"
 
 static uns url_ignore_spaces;
 static uns url_ignore_underflow;
+static byte *url_component_separators = "/&?";
+static uns url_min_repeat_count = 0x7fffffff;
+static uns url_max_repeat_length = 0;
 
 static struct cfitem url_config[] = {
   { "URL",             CT_SECTION,     NULL },
   { "IgnoreSpaces",    CT_INT,         &url_ignore_spaces },
   { "IgnoreUnderflow", CT_INT,         &url_ignore_underflow },
+  { "ComponentSeparators",     CT_STRING,      &url_component_separators },
+  { "MinRepeatCount",          CT_INT,         &url_min_repeat_count },
+  { "MaxRepeatLength",         CT_INT,         &url_max_repeat_length },
   { NULL,              CT_STOP,        NULL }
 };
 
@@ -572,3 +579,9 @@ int main(int argc, char **argv)
 }
 
 #endif
+
+int
+url_has_repeated_component(byte *url)
+{
+       return 0;
+}
index 8815da9b60f561af77b57a26f37b2713b36af5d4..0c2751298eca8267cd2882d23b97706381a13184 100644 (file)
--- a/lib/url.h
+++ b/lib/url.h
@@ -2,6 +2,7 @@
  *     Sherlock Library -- URL Functions
  *
  *     (c) 1997 Martin Mares <mj@ucw.cz>
+ *     (c) 2001 Robert Spalek <robert@ucw.cz>
  */
 
 #ifndef _SHERLOCK_URL_H
@@ -46,6 +47,7 @@ int url_canonicalize(struct url *);
 int url_pack(struct url *, byte *);
 int url_canon_split(byte *, byte *, byte *, struct url *);
 uns identify_protocol(byte *);
+int url_has_repeated_component(byte *url);
 
 /* Error codes */