* gpgkeys_curl.c: s/MAX_PATH/URLMAX_PATH/g to avoid a clash with
authorWerner Koch <wk@gnupg.org>
Tue, 18 Jan 2005 11:16:10 +0000 (11:16 +0000)
committerWerner Koch <wk@gnupg.org>
Tue, 18 Jan 2005 11:16:10 +0000 (11:16 +0000)
the W32 defined macro.  Removed unneeded initialization of static
variables.
* gpgkeys_http.c: Ditto.
* ksutil.h: s/MAX_PATH/URLMAX_PATH/.

keyserver/ChangeLog
keyserver/gpgkeys_curl.c
keyserver/gpgkeys_http.c
keyserver/ksutil.h

index 1dda7cd..eaa122c 100644 (file)
@@ -1,3 +1,11 @@
+2005-01-18  Werner Koch  <wk@g10code.com>
+
+       * gpgkeys_curl.c: s/MAX_PATH/URLMAX_PATH/g to avoid a clash with
+       the W32 defined macro.  Removed unneeded initialization of static
+       variables.
+       * gpgkeys_http.c: Ditto.
+       * ksutil.h: s/MAX_PATH/URLMAX_PATH/.
+
 2005-01-17  David Shaw  <dshaw@grover.jabberwocky.com>
 
        * gpgkeys_curl.c (main): Only allow specified protocols to use the
index c553d79..fef4333 100644 (file)
@@ -35,10 +35,15 @@ extern char *optarg;
 extern int optind;
 
 static int verbose=0;
-static char scheme[MAX_SCHEME+1],auth[MAX_AUTH+1],host[MAX_HOST+1]={'\0'},port[MAX_PORT+1]={'\0'},path[MAX_PATH+1]={'\0'},proxy[MAX_PROXY+1]={'\0'};
-static FILE *input=NULL,*output=NULL,*console=NULL;
+static char scheme[MAX_SCHEME+1];
+static char auth[MAX_AUTH+1];
+static char host[MAX_HOST+1];
+static char port[MAX_PORT+1];
+static char path[URLMAX_PATH+1];
+static char proxy[MAX_PROXY+1;
+static FILE *input, *output, *console;
 static CURL *curl;
-static char request[MAX_URL]={'\0'};
+static char request[MAX_URL];
 
 static int
 curl_err_to_gpg_err(CURLcode error)
@@ -217,9 +222,9 @@ main(int argc,char *argv[])
          continue;
        }
 
-      if(sscanf(line,"PATH %" MKSTRING(MAX_PATH) "s\n",path)==1)
+      if(sscanf(line,"PATH %" MKSTRING(URLMAX_PATH) "s\n",path)==1)
        {
-         path[MAX_PATH]='\0';
+         path[URLMAX_PATH]='\0';
          continue;
        }
 
index b89f5d3..866cb03 100644 (file)
@@ -38,8 +38,12 @@ extern int optind;
 
 static int verbose=0;
 static unsigned int http_flags=0;
-static char auth[MAX_AUTH+1]={'\0'},host[MAX_HOST+1]={'\0'},proxy[MAX_PROXY+1]={'\0'},port[MAX_PORT+1]={'\0'},path[MAX_PATH+1]={'\0'};
-static FILE *input=NULL,*output=NULL,*console=NULL;
+static char auth[MAX_AUTH+1];
+static char host[MAX_HOST+1];
+static char proxy[MAX_PROXY+1];
+static char port[MAX_PORT+1];
+static char path[URLMAX_PATH+1];
+static FILE *input,*output,*console;
 
 #ifdef __riscos__
 #define HTTP_PROXY_ENV           "GnuPG$HttpProxy"
@@ -231,9 +235,9 @@ main(int argc,char *argv[])
          continue;
        }
 
-      if(sscanf(line,"PATH %" MKSTRING(MAX_PATH) "s\n",path)==1)
+      if(sscanf(line,"PATH %" MKSTRING(URLMAX_PATH) "s\n",path)==1)
        {
-         path[MAX_PATH]='\0';
+         path[URLMAX_PATH]='\0';
          continue;
        }
 
index 135f41c..0a77e27 100644 (file)
 #define MAX_AUTH     128
 #define MAX_HOST      80
 #define MAX_PORT      10
-#define MAX_PATH    1024
+#define URLMAX_PATH 1024
 #define MAX_PROXY    128
-#define MAX_URL (MAX_SCHEME+1+3+MAX_AUTH+1+1+MAX_HOST+1+1+MAX_PORT+1+1+MAX_PATH+1+50)
+#define MAX_URL     (MAX_SCHEME+1+3+MAX_AUTH+1+1+MAX_HOST+1+1 \
+                     +MAX_PORT+1+1+URLMAX_PATH+1+50)
 
 #define STRINGIFY(x) #x
 #define MKSTRING(x) STRINGIFY(x)