Revision: 14688
Author: adrian.chadd
Date: Sun May 23 00:40:23 2010
Log: Begin breaking out the protocol_t stuff.


http://code.google.com/p/lusca-cache/source/detail?r=14688

Added:
 /branches/LUSCA_HEAD/libsqurl/proto.c
 /branches/LUSCA_HEAD/libsqurl/proto.h
Modified:
 /branches/LUSCA_HEAD/src/enums.h
 /branches/LUSCA_HEAD/src/globals.h
 /branches/LUSCA_HEAD/src/url.c

=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/libsqurl/proto.c       Sun May 23 00:40:23 2010
@@ -0,0 +1,21 @@
+#include "../include/config.h"
+
+#include <stdio.h>
+
+const char *ProtocolStr[] =
+{
+    "NONE",
+    "http",
+    "ftp",
+    "gopher",
+    "wais",
+    "cache_object",
+    "icp",
+    "htcp",
+    "urn",
+    "whois",
+    "internal",
+    "https",
+    "TOTAL"
+};
+
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/libsqurl/proto.h       Sun May 23 00:40:23 2010
@@ -0,0 +1,22 @@
+#ifndef        __LUSCA_LIBSQURL_PROTO_H__
+#define        __LUSCA_LIBSQURL_PROTO_H__
+
+typedef enum {
+    PROTO_NONE,
+    PROTO_HTTP,
+    PROTO_FTP,
+    PROTO_GOPHER,
+    PROTO_WAIS,
+    PROTO_CACHEOBJ,
+    PROTO_ICP,
+    PROTO_HTCP,
+    PROTO_URN,
+    PROTO_WHOIS,
+    PROTO_INTERNAL,
+    PROTO_HTTPS,
+    PROTO_MAX
+} protocol_t;
+
+extern const char *ProtocolStr[];
+
+#endif
=======================================
--- /branches/LUSCA_HEAD/src/enums.h    Mon Apr  5 20:06:53 2010
+++ /branches/LUSCA_HEAD/src/enums.h    Sun May 23 00:40:23 2010
@@ -261,24 +261,6 @@
     STORE_DISK_CLIENT
 } store_client_t;

-typedef enum {
-    PROTO_NONE,
-    PROTO_HTTP,
-    PROTO_FTP,
-    PROTO_GOPHER,
-    PROTO_WAIS,
-    PROTO_CACHEOBJ,
-    PROTO_ICP,
-#if USE_HTCP
-    PROTO_HTCP,
-#endif
-    PROTO_URN,
-    PROTO_WHOIS,
-    PROTO_INTERNAL,
-    PROTO_HTTPS,
-    PROTO_MAX
-} protocol_t;
-
 /*
  * These are for StoreEntry->flag, which is defined as a SHORT
  *
=======================================
--- /branches/LUSCA_HEAD/src/globals.h  Sat Apr 10 04:24:15 2010
+++ /branches/LUSCA_HEAD/src/globals.h  Sun May 23 00:40:23 2010
@@ -46,7 +46,6 @@
 extern char config_input_line[BUFSIZ];
 extern const char *AclMatchedName;     /* NULL */
 extern const char *DefaultConfigFile;  /* DEFAULT_CONFIG_FILE */
-extern const char *ProtocolStr[];
 extern const char *cfg_filename;       /* NULL */
 extern const char *const appname;      /* "squid" */
 extern const char *const dash_str;     /* "-" */
=======================================
--- /branches/LUSCA_HEAD/src/url.c      Sun May 23 00:35:08 2010
+++ /branches/LUSCA_HEAD/src/url.c      Sun May 23 00:40:23 2010
@@ -35,24 +35,8 @@

 #include "squid.h"

-const char *ProtocolStr[] =
-{
-    "NONE",
-    "http",
-    "ftp",
-    "gopher",
-    "wais",
-    "cache_object",
-    "icp",
-#if USE_HTCP
-    "htcp",
-#endif
-    "urn",
-    "whois",
-    "internal",
-    "https",
-    "TOTAL"
-};
+#include "../libsqurl/proto.h"
+#include "../libsqurl/url.h"

 static request_t *urnParse(method_t * method, char *urn);
 static const char valid_hostname_chars_u[] =

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to