From: hno <> Date: Fri, 12 Apr 2002 01:30:16 +0000 (+0000) Subject: Coding style cleanups to make GCC happy X-Git-Tag: SQUID_3_0_PRE1~1099 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b40a659ab657dde708e12bd6f3c8da253c0b181d;p=thirdparty%2Fsquid.git Coding style cleanups to make GCC happy --- diff --git a/helpers/basic_auth/MSNT/confload.c b/helpers/basic_auth/MSNT/confload.c index 725ac84594..cc46cd4f47 100644 --- a/helpers/basic_auth/MSNT/confload.c +++ b/helpers/basic_auth/MSNT/confload.c @@ -18,6 +18,9 @@ #include #include +#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; diff --git a/helpers/basic_auth/MSNT/msntauth.c b/helpers/basic_auth/MSNT/msntauth.c index 2fcb22e11c..8a21880caa 100644 --- a/helpers/basic_auth/MSNT/msntauth.c +++ b/helpers/basic_auth/MSNT/msntauth.c @@ -36,15 +36,10 @@ #include #include -#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 index 0000000000..4a2c48a7b2 --- /dev/null +++ b/helpers/basic_auth/MSNT/msntauth.h @@ -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 *);