]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Coding style cleanups to make GCC happy
authorhno <>
Fri, 12 Apr 2002 01:30:16 +0000 (01:30 +0000)
committerhno <>
Fri, 12 Apr 2002 01:30:16 +0000 (01:30 +0000)
helpers/basic_auth/MSNT/confload.c
helpers/basic_auth/MSNT/msntauth.c
helpers/basic_auth/MSNT/msntauth.h [new file with mode: 0644]

index 725ac84594684309ebeb58bdf86ba3350a3825f4..cc46cd4f472cadf52916fe67ca3fd4f4f8bb2c78 100644 (file)
@@ -18,6 +18,9 @@
 #include <sys/param.h>
 #include <netdb.h>
 
+#include "msntauth.h"
+#include "valid.h"
+
 #define CONFIGFILE   "/usr/local/squid/etc/msntauth.conf"      /* Path to configuration file */
 #define DENYUSERSDEFAULT   "/usr/local/squid/etc/denyusers"
 #define ALLOWUSERSDEFAULT  "/usr/local/squid/etc/allowusers"
@@ -39,13 +42,9 @@ int Serversqueried = 0;              /* Number of servers queried */
 
 /* Declarations */
 
-int OpenConfigFile();
-void ProcessLine(char *);
-void AddServer(char *, char *, char *);
-int QueryServers(char *, char *);
-int QueryServerForUser(int, char *, char *);
-extern int Valid_User(char *, char *, char *, char *, char *);
-
+static void ProcessLine(char *);
+static void AddServer(char *, char *, char *);
+static int QueryServerForUser(int, char *, char *);
 
 /*
  * Opens and reads the configuration file.
@@ -53,7 +52,7 @@ extern int Valid_User(char *, char *, char *, char *, char *);
  */
 
 int
-OpenConfigFile()
+OpenConfigFile(void)
 {
     FILE *ConfigFile;
     char Confbuf[2049];                /* Line reading buffer */
@@ -92,7 +91,7 @@ OpenConfigFile()
 
 /* Parses a configuration file line. */
 
-void
+static void
 ProcessLine(char *Linebuf)
 {
     char *Directive;
@@ -163,8 +162,6 @@ ProcessLine(char *Linebuf)
 void
 AddServer(char *ParamPDC, char *ParamBDC, char *ParamDomain)
 {
-    struct hostent *hstruct;
-
     if (Serversqueried + 1 > MAXSERVERS) {
        syslog(LOG_USER | LOG_ERR, "AddServer: Ignoring '%s' server line; too many servers.", ParamPDC);
        return;
index 2fcb22e11c8c719db41995f318285a5ae2bdf233..8a21880caa0d2cbb990feb3d4385aae2aa2638a7 100644 (file)
 #include <syslog.h>
 #include <sys/time.h>
 
-#define  MSNTVERSION "Msntauth v2.0.3 (C) 2 Sep 2001 Stellar-X Antonino Iannella."
+#include "msntauth.h"
 
-extern int OpenConfigFile();
-extern int QueryServers(char *, char *);
-extern void Checktimer();
-extern void Check_forchange();
-extern int Read_denyusers(void);
-extern int Read_allowusers(void);
-extern int Check_user(char *);
+extern char version[];
+char msntauth_version[] = "Msntauth v2.0.3 (C) 2 Sep 2001 Stellar-X Antonino Iannella.";
 
 /* Main program for simple authentication.
  * Reads the denied user file. Sets alarm timer.
@@ -57,10 +52,6 @@ main()
     char username[256];
     char password[256];
     char wstr[256];
-    char ver[100];
-
-    /* Hidden way to imbed the authenticator release version */
-    strcpy(ver, MSNTVERSION);
 
     /* Read configuration file. Abort wildly if error. */
     if (OpenConfigFile() == 1)
diff --git a/helpers/basic_auth/MSNT/msntauth.h b/helpers/basic_auth/MSNT/msntauth.h
new file mode 100644 (file)
index 0000000..4a2c48a
--- /dev/null
@@ -0,0 +1,8 @@
+extern int OpenConfigFile(void);
+extern int QueryServers(char *, char *);
+extern void Checktimer(void);
+extern void Check_forchange();
+extern int Read_denyusers(void);
+extern int Read_allowusers(void);
+extern int Check_user(char *);
+extern int QueryServers(char *, char *);