Update to the new FSF address
[infodrom/cgilib] / cookies.c
index 7f2fb4e..0808276 100644 (file)
--- a/cookies.c
+++ b/cookies.c
@@ -1,6 +1,6 @@
 /*
     cookies.c - Cookie support for CGI library
-    Copyright (C) 1999 by Martin Schulze <joey@infodrom.north.de>
+    Copyright (C) 1999,2007,8 by Martin Schulze <joey@infodrom.org>
      
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     GNU General Public License for more details.
     
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software 
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+    along with this program; if not, write to the Free Software Foundation
+    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <cgi.h>
-
-extern int cgiDebugLevel, cgiDebugStderr;
+#include "aux.h"
 
 s_cookie **cgiReadCookies()
 {
@@ -129,20 +128,10 @@ s_cookie *cgiGetCookie (s_cgi *parms, const char *name)
        return NULL;
     for (i=0;parms->cookies[i]; i++)
        if (parms->cookies[i]->name && parms->cookies[i]->value && !strcmp(name,parms->cookies[i]->name)) {
-           if (cgiDebugLevel > 0) {
-               if (cgiDebugStderr)
-                   fprintf (stderr, "%s found as %s\n", name, parms->cookies[i]->value);
-               else
-                   printf ("%s found as %s<br>\n", name, parms->cookies[i]->value);
-           }
+           cgiDebugOutput (1, "%s found as %s\n", name, parms->cookies[i]->value);
            return parms->cookies[i];
        }
-    if (cgiDebugLevel) {
-       if (cgiDebugStderr)
-           fprintf (stderr, "%s not found\n", name);
-       else
-           printf ("%s not found<br>\n", name);
-    }
+    cgiDebugOutput (1, "%s not found\n", name);
     return NULL;
 }