commit - b61407713dab7f01ef98b9ee43c7f9e449c3b6f4
commit + 77f54693ef258b1fe65ee105fc026dfb2c6257dc
blob - e80d6b963cee355096fa9a8202d5b34d644cff45
blob + 5e7b4cfb72e40c501d6383cc7f9ded946ea4a8cc
--- ChangeLog
+++ ChangeLog
ngIRCd CVSHEAD
+ - Removed unnecessary #define of "LOCAL", now use plain C "static" instead.
- Channel topics are no longer limited to 127 characters: now the only limit
is the maximum length of an IRC command, i. e. 512 bytes (in pratice, this
limits the topic to about 490 characters due to protocol overhead).
--
-$Id: ChangeLog,v 1.283 2005/07/30 21:00:19 alex Exp $
+$Id: ChangeLog,v 1.284 2005/07/31 20:13:07 alex Exp $
blob - edb0f6205dfee3ac896142aa931e0a6fef5c9f2c
blob + 3659b19f8c23dc4d7ae20ceaa1dcd01ae5a6adf5
--- src/ngircd/channel.c
+++ src/ngircd/channel.c
#include "portab.h"
-static char UNUSED id[] = "$Id: channel.c,v 1.52 2005/07/28 16:23:55 fw Exp $";
+static char UNUSED id[] = "$Id: channel.c,v 1.53 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#define REMOVE_KICK 2
-LOCAL CHANNEL *My_Channels;
-LOCAL CL2CHAN *My_Cl2Chan;
+static CHANNEL *My_Channels;
+static CL2CHAN *My_Cl2Chan;
-LOCAL CL2CHAN *Get_Cl2Chan PARAMS(( CHANNEL *Chan, CLIENT *Client ));
-LOCAL CL2CHAN *Add_Client PARAMS(( CHANNEL *Chan, CLIENT *Client ));
-LOCAL bool Remove_Client PARAMS(( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Reason, bool InformServer ));
-LOCAL CL2CHAN *Get_First_Cl2Chan PARAMS(( CLIENT *Client, CHANNEL *Chan ));
-LOCAL CL2CHAN *Get_Next_Cl2Chan PARAMS(( CL2CHAN *Start, CLIENT *Client, CHANNEL *Chan ));
-LOCAL bool Delete_Channel PARAMS(( CHANNEL *Chan ));
+static CL2CHAN *Get_Cl2Chan PARAMS(( CHANNEL *Chan, CLIENT *Client ));
+static CL2CHAN *Add_Client PARAMS(( CHANNEL *Chan, CLIENT *Client ));
+static bool Remove_Client PARAMS(( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Reason, bool InformServer ));
+static CL2CHAN *Get_First_Cl2Chan PARAMS(( CLIENT *Client, CHANNEL *Chan ));
+static CL2CHAN *Get_Next_Cl2Chan PARAMS(( CL2CHAN *Start, CLIENT *Client, CHANNEL *Chan ));
+static bool Delete_Channel PARAMS(( CHANNEL *Chan ));
GLOBAL void
} /* Channel_Create */
-LOCAL CL2CHAN *
+static CL2CHAN *
Get_Cl2Chan( CHANNEL *Chan, CLIENT *Client )
{
CL2CHAN *cl2chan;
} /* Get_Cl2Chan */
-LOCAL CL2CHAN *
+static CL2CHAN *
Add_Client( CHANNEL *Chan, CLIENT *Client )
{
CL2CHAN *cl2chan;
} /* Add_Client */
-LOCAL bool
+static bool
Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Reason, bool InformServer )
{
CL2CHAN *cl2chan, *last_cl2chan;
} /* Remove_Client */
-LOCAL CL2CHAN *
+static CL2CHAN *
Get_First_Cl2Chan( CLIENT *Client, CHANNEL *Chan )
{
return Get_Next_Cl2Chan( My_Cl2Chan, Client, Chan );
} /* Get_First_Cl2Chan */
-LOCAL CL2CHAN *
+static CL2CHAN *
Get_Next_Cl2Chan( CL2CHAN *Start, CLIENT *Client, CHANNEL *Channel )
{
CL2CHAN *cl2chan;
} /* Get_Next_Cl2Chan */
-LOCAL bool
+static bool
Delete_Channel( CHANNEL *Chan )
{
/* Channel-Struktur loeschen */
blob - 2a7f10bae466926ebcff79ed6f90d52f80e1b812
blob + 84715813ffc7a2fd7ff85848cab7f3c7d8db6265
--- src/ngircd/client.c
+++ src/ngircd/client.c
#include "portab.h"
-static char UNUSED id[] = "$Id: client.c,v 1.84 2005/06/12 16:39:42 alex Exp $";
+static char UNUSED id[] = "$Id: client.c,v 1.85 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#define GETID_LEN (CLIENT_NICK_LEN-1) + 1 + (CLIENT_USER_LEN-1) + 1 + (CLIENT_HOST_LEN-1) + 1
-LOCAL CLIENT *This_Server, *My_Clients;
-LOCAL char GetID_Buffer[GETID_LEN];
+static CLIENT *This_Server, *My_Clients;
+static char GetID_Buffer[GETID_LEN];
-LOCAL WHOWAS My_Whowas[MAX_WHOWAS];
-LOCAL int Last_Whowas = -1;
+static WHOWAS My_Whowas[MAX_WHOWAS];
+static int Last_Whowas = -1;
-LOCAL long Count PARAMS(( CLIENT_TYPE Type ));
-LOCAL long MyCount PARAMS(( CLIENT_TYPE Type ));
+static long Count PARAMS(( CLIENT_TYPE Type ));
+static long MyCount PARAMS(( CLIENT_TYPE Type ));
-LOCAL CLIENT *New_Client_Struct PARAMS(( void ));
-LOCAL void Generate_MyToken PARAMS(( CLIENT *Client ));
-LOCAL void Adjust_Counters PARAMS(( CLIENT *Client ));
+static CLIENT *New_Client_Struct PARAMS(( void ));
+static void Generate_MyToken PARAMS(( CLIENT *Client ));
+static void Adjust_Counters PARAMS(( CLIENT *Client ));
#ifndef Client_DestroyNow
GLOBAL void Client_DestroyNow PARAMS((CLIENT *Client ));
} /* Client_Uptime */
-LOCAL long
+static long
Count( CLIENT_TYPE Type )
{
CLIENT *c;
} /* Count */
-LOCAL long
+static long
MyCount( CLIENT_TYPE Type )
{
CLIENT *c;
} /* MyCount */
-LOCAL CLIENT *
+static CLIENT *
New_Client_Struct( void )
{
/* Neue CLIENT-Struktur pre-initialisieren */
} /* New_Client */
-LOCAL void
+static void
Generate_MyToken( CLIENT *Client )
{
CLIENT *c;
} /* Generate_MyToken */
-LOCAL void
+static void
Adjust_Counters( CLIENT *Client )
{
long count;
blob - b4e56172d0e7237120efb3ace301e7a6080405c1
blob + 74970e1df7644c36b13d61c9eeb94bfe9a9ff54a
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
#include "portab.h"
-static char UNUSED id[] = "$Id: conf.c,v 1.82 2005/07/29 09:29:47 fw Exp $";
+static char UNUSED id[] = "$Id: conf.c,v 1.83 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#include "conf.h"
-LOCAL bool Use_Log = true;
-LOCAL CONF_SERVER New_Server;
-LOCAL int New_Server_Idx;
+static bool Use_Log = true;
+static CONF_SERVER New_Server;
+static int New_Server_Idx;
-LOCAL void Set_Defaults PARAMS(( bool InitServers ));
-LOCAL void Read_Config PARAMS(( void ));
-LOCAL void Validate_Config PARAMS(( bool TestOnly ));
+static void Set_Defaults PARAMS(( bool InitServers ));
+static void Read_Config PARAMS(( void ));
+static void Validate_Config PARAMS(( bool TestOnly ));
-LOCAL void Handle_GLOBAL PARAMS(( int Line, char *Var, char *Arg ));
-LOCAL void Handle_OPERATOR PARAMS(( int Line, char *Var, char *Arg ));
-LOCAL void Handle_SERVER PARAMS(( int Line, char *Var, char *Arg ));
-LOCAL void Handle_CHANNEL PARAMS(( int Line, char *Var, char *Arg ));
+static void Handle_GLOBAL PARAMS(( int Line, char *Var, char *Arg ));
+static void Handle_OPERATOR PARAMS(( int Line, char *Var, char *Arg ));
+static void Handle_SERVER PARAMS(( int Line, char *Var, char *Arg ));
+static void Handle_CHANNEL PARAMS(( int Line, char *Var, char *Arg ));
-LOCAL void Config_Error PARAMS(( const int Level, const char *Format, ... ));
+static void Config_Error PARAMS(( const int Level, const char *Format, ... ));
-LOCAL void Config_Error_NaN PARAMS(( const int LINE, const char *Value ));
-LOCAL void Config_Error_TooLong PARAMS(( const int LINE, const char *Value ));
+static void Config_Error_NaN PARAMS(( const int LINE, const char *Value ));
+static void Config_Error_TooLong PARAMS(( const int LINE, const char *Value ));
-LOCAL void Init_Server_Struct PARAMS(( CONF_SERVER *Server ));
+static void Init_Server_Struct PARAMS(( CONF_SERVER *Server ));
static void
} /* Conf_AddServer */
-LOCAL void
+static void
Set_Defaults( bool InitServers )
{
/* Initialize configuration variables with default values. */
} /* Set_Defaults */
-LOCAL void
+static void
Read_Config( void )
{
/* Read configuration file. */
} /* Read_Config */
-LOCAL bool
+static bool
Check_ArgIsTrue( const char *Arg )
{
if( strcasecmp( Arg, "yes" ) == 0 ) return true;
} /* Check_ArgIsTrue */
-LOCAL void
+static void
Handle_GLOBAL( int Line, char *Var, char *Arg )
{
struct passwd *pwd;
} /* Handle_GLOBAL */
-LOCAL void
+static void
Handle_OPERATOR( int Line, char *Var, char *Arg )
{
unsigned int opercount;
} /* Handle_OPERATOR */
-LOCAL void
+static void
Handle_SERVER( int Line, char *Var, char *Arg )
{
long port;
} /* Handle_SERVER */
-LOCAL void
+static void
Handle_CHANNEL( int Line, char *Var, char *Arg )
{
assert( Line > 0 );
} /* Handle_CHANNEL */
-LOCAL void
+static void
Validate_Config( bool Configtest )
{
/* Validate configuration settings. */
} /* Validate_Config */
-LOCAL void
+static void
Config_Error_TooLong ( const int Line, const char *Item )
{
Config_Error( LOG_WARNING, "%s, line %d: Value of \"%s\" too long!", NGIRCd_ConfFile, Line, Item );
}
-LOCAL void
+static void
Config_Error_NaN( const int Line, const char *Item )
{
Config_Error( LOG_WARNING, "%s, line %d: Value of \"%s\" is not a number!", NGIRCd_ConfFile, Line, Item );
}
#ifdef PROTOTYPES
-LOCAL void Config_Error( const int Level, const char *Format, ... )
+static void Config_Error( const int Level, const char *Format, ... )
#else
-LOCAL void Config_Error( Level, Format, va_alist )
+static void Config_Error( Level, Format, va_alist )
const int Level;
const char *Format;
va_dcl
} /* Config_Error */
-LOCAL void
+static void
Init_Server_Struct( CONF_SERVER *Server )
{
/* Initialize server configuration structur to default values */
blob - 146cb8ef4bdcbb2fac1d6ddad19353c04d006137
blob + e62fd0d48137589a62dd61d298793ce13c331f3b
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
#include "portab.h"
#include "io.h"
-static char UNUSED id[] = "$Id: conn.c,v 1.167 2005/07/29 09:29:47 fw Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.168 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#define SERVER_WAIT (NONE - 1)
-LOCAL bool Handle_Write PARAMS(( CONN_ID Idx ));
-LOCAL int New_Connection PARAMS(( int Sock ));
-LOCAL CONN_ID Socket2Index PARAMS(( int Sock ));
-LOCAL void Read_Request PARAMS(( CONN_ID Idx ));
-LOCAL bool Handle_Buffer PARAMS(( CONN_ID Idx ));
-LOCAL void Check_Connections PARAMS(( void ));
-LOCAL void Check_Servers PARAMS(( void ));
-LOCAL void Init_Conn_Struct PARAMS(( CONN_ID Idx ));
-LOCAL bool Init_Socket PARAMS(( int Sock ));
-LOCAL void New_Server PARAMS(( int Server, CONN_ID Idx ));
-LOCAL void Simple_Message PARAMS(( int Sock, char *Msg ));
-LOCAL int Count_Connections PARAMS(( struct sockaddr_in addr ));
-LOCAL int NewListener PARAMS(( const UINT16 Port ));
+static bool Handle_Write PARAMS(( CONN_ID Idx ));
+static int New_Connection PARAMS(( int Sock ));
+static CONN_ID Socket2Index PARAMS(( int Sock ));
+static void Read_Request PARAMS(( CONN_ID Idx ));
+static bool Handle_Buffer PARAMS(( CONN_ID Idx ));
+static void Check_Connections PARAMS(( void ));
+static void Check_Servers PARAMS(( void ));
+static void Init_Conn_Struct PARAMS(( CONN_ID Idx ));
+static bool Init_Socket PARAMS(( int Sock ));
+static void New_Server PARAMS(( int Server, CONN_ID Idx ));
+static void Simple_Message PARAMS(( int Sock, char *Msg ));
+static int Count_Connections PARAMS(( struct sockaddr_in addr ));
+static int NewListener PARAMS(( const UINT16 Port ));
static array My_Listeners;
}
-LOCAL void
+static void
FreeRes_stat( CONNECTION *c )
{
assert( c != NULL );
/* return new listening port file descriptor or -1 on failure */
-LOCAL int
+static int
NewListener( const UINT16 Port )
{
/* Create new listening socket on specified port */
} /* SyncServerStruct */
-LOCAL bool
+static bool
Handle_Write( CONN_ID Idx )
{
/* Daten aus Schreibpuffer versenden bzw. Connection aufbauen */
} /* Handle_Write */
-LOCAL int
+static int
New_Connection( int Sock )
{
/* Neue Client-Verbindung von Listen-Socket annehmen und
} /* New_Connection */
-LOCAL CONN_ID
+static CONN_ID
Socket2Index( int Sock )
{
/* zum Socket passende Connection suchen */
} /* Socket2Index */
-LOCAL void
+static void
Read_Request( CONN_ID Idx )
{
/* Daten von Socket einlesen und entsprechend behandeln.
} /* Read_Request */
-LOCAL bool
+static bool
Handle_Buffer( CONN_ID Idx )
{
/* Handle Data in Connections Read-Buffer.
} /* Handle_Buffer */
-LOCAL void
+static void
Check_Connections( void )
{
/* check if connections are alive. if not, play PING-PONG first.
} /* Check_Connections */
-LOCAL void
+static void
Check_Servers( void )
{
/* Check if we can establish further server links */
} /* Check_Servers */
-LOCAL void
+static void
New_Server( int Server, CONN_ID Idx )
{
/* Establish new server link */
} /* New_Server */
-LOCAL void
+static void
Init_Conn_Struct( CONN_ID Idx )
{
time_t now = time( NULL );
} /* Init_Conn_Struct */
-LOCAL bool
+static bool
Init_Socket( int Sock )
{
/* Initialize socket (set options) */
} /* Read_Resolver_Result */
-LOCAL void
+static void
Simple_Message( int Sock, char *Msg )
{
char buf[COMMAND_LEN];
} /* Simple_Error */
-LOCAL int
+static int
Count_Connections( struct sockaddr_in addr_in )
{
int i, cnt;
blob - 351c547a6e023be39352f4d420c85dacb82ab0d3
blob + 3bf2417fd146027d7ed2e147c9bd3e15ae122cea
--- src/ngircd/hash.c
+++ src/ngircd/hash.c
#include "portab.h"
-static char UNUSED id[] = "$Id: hash.c,v 1.11 2005/03/19 18:43:48 fw Exp $";
+static char UNUSED id[] = "$Id: hash.c,v 1.12 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#include "hash.h"
-LOCAL UINT32 jenkins_hash PARAMS(( register UINT8 *k, register UINT32 length, register UINT32 initval ));
+static UINT32 jenkins_hash PARAMS(( register UINT8 *k, register UINT32 length, register UINT32 initval ));
GLOBAL UINT32
} /* mix */
-LOCAL UINT32
+static UINT32
jenkins_hash( register UINT8 *k, register UINT32 length, register UINT32 initval )
{
/* k: the key
blob - 603d1167330d25dedcb65ad2611e48c1cb220052
blob + c20621d67c304e4b04501530732b6fdbbc30437c
--- src/ngircd/irc-login.c
+++ src/ngircd/irc-login.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-login.c,v 1.45 2005/07/28 16:23:55 fw Exp $";
+static char UNUSED id[] = "$Id: irc-login.c,v 1.46 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#include "irc-login.h"
-LOCAL bool Hello_User PARAMS(( CLIENT *Client ));
-LOCAL void Kill_Nick PARAMS(( char *Nick, char *Reason ));
+static bool Hello_User PARAMS(( CLIENT *Client ));
+static void Kill_Nick PARAMS(( char *Nick, char *Reason ));
GLOBAL bool
} /* IRC_PONG */
-LOCAL bool
+static bool
Hello_User( CLIENT *Client )
{
#ifdef CVSDATE
} /* Hello_User */
-LOCAL void
+static void
Kill_Nick( char *Nick, char *Reason )
{
REQUEST r;
blob - 62f24883dee9a29bac21bc660d0588c26f7aaa85
blob + a62022378503e8d49c91899edfe706d4a1c76f1b
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-mode.c,v 1.43 2005/06/17 19:14:58 fw Exp $";
+static char UNUSED id[] = "$Id: irc-mode.c,v 1.44 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#include "irc-mode.h"
-LOCAL bool Client_Mode PARAMS(( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target ));
-LOCAL bool Channel_Mode PARAMS(( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel ));
+static bool Client_Mode PARAMS(( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target ));
+static bool Channel_Mode PARAMS(( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel ));
-LOCAL bool Add_Invite PARAMS(( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern ));
-LOCAL bool Add_Ban PARAMS(( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern ));
+static bool Add_Invite PARAMS(( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern ));
+static bool Add_Ban PARAMS(( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern ));
-LOCAL bool Del_Invite PARAMS(( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern ));
-LOCAL bool Del_Ban PARAMS(( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern ));
+static bool Del_Invite PARAMS(( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern ));
+static bool Del_Ban PARAMS(( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern ));
-LOCAL bool Send_ListChange PARAMS(( char *Mode, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Mask ));
+static bool Send_ListChange PARAMS(( char *Mode, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Mask ));
GLOBAL bool
} /* IRC_MODE */
-LOCAL bool
+static bool
Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
{
/* Handle client mode requests */
} /* Client_Mode */
-LOCAL bool
+static bool
Channel_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel )
{
/* Handle channel and channel-user modes */
} /* IRC_AWAY */
-LOCAL bool
+static bool
Add_Invite( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern )
{
char *mask;
} /* Add_Invite */
-LOCAL bool
+static bool
Add_Ban( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern )
{
char *mask;
} /* Add_Ban */
-LOCAL bool
+static bool
Del_Invite( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern )
{
char *mask;
} /* Del_Invite */
-LOCAL bool
+static bool
Del_Ban( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Pattern )
{
char *mask;
} /* Del_Ban */
-LOCAL bool
+static bool
Send_ListChange( char *Mode, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, char *Mask )
{
/* Bestaetigung an Client schicken & andere Server sowie Channel-User informieren */
blob - 3e497a4afd64d1e5f476bd48beda17e0fc51fea4
blob + aa19836d1c9fcc480fd74c1834fe933f03a70d53
--- src/ngircd/irc-oper.c
+++ src/ngircd/irc-oper.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-oper.c,v 1.23 2005/07/11 14:11:35 fw Exp $";
+static char UNUSED id[] = "$Id: irc-oper.c,v 1.24 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#include "irc-oper.h"
-LOCAL bool
+static bool
Bad_OperPass(CLIENT *Client, char *errtoken, char *errmsg)
{
Log( LOG_WARNING, "Got invalid OPER from \"%s\": \"%s\" -- %s", Client_Mask( Client ),
blob - dce31408b227ce805a35fb53c632196c8cc482b0
blob + fbfa90332b90ec6f89490161c304cfb8ae490d51
--- src/ngircd/irc-write.c
+++ src/ngircd/irc-write.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-write.c,v 1.18 2005/04/27 07:39:18 alex Exp $";
+static char UNUSED id[] = "$Id: irc-write.c,v 1.19 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#define SEND_TO_SERVER 2
-LOCAL char *Get_Prefix PARAMS(( CLIENT *Target, CLIENT *Client ));
+static char *Get_Prefix PARAMS(( CLIENT *Target, CLIENT *Client ));
#ifdef PROTOTYPES
} /* IRC_SetPenalty */
-LOCAL char *
+static char *
Get_Prefix( CLIENT *Target, CLIENT *Client )
{
assert( Target != NULL );
blob - 139531266fef48f3d80c37acd66ec5131031ed0d
blob + b0328d223355a41600fbfc7bb1131c6d9be0accd
--- src/ngircd/irc.c
+++ src/ngircd/irc.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc.c,v 1.126 2005/04/18 15:44:39 alex Exp $";
+static char UNUSED id[] = "$Id: irc.c,v 1.127 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#include "irc.h"
-LOCAL char *Option_String PARAMS(( CONN_ID Idx ));
+static char *Option_String PARAMS(( CONN_ID Idx ));
GLOBAL bool
} /* IRC_HELP */
-LOCAL char *
+static char *
Option_String( CONN_ID Idx )
{
static char option_txt[8];
blob - e16cdd7087ad1e3f1e0a23e7853e706cc1b43bc9
blob + 2ce880d63ecbc12446012c4b33829886b44001df
--- src/ngircd/lists.c
+++ src/ngircd/lists.c
#include "portab.h"
-static char UNUSED id[] = "$Id: lists.c,v 1.17 2005/03/19 18:43:49 fw Exp $";
+static char UNUSED id[] = "$Id: lists.c,v 1.18 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
} C2C;
-LOCAL C2C *My_Invites, *My_Bans;
+static C2C *My_Invites, *My_Bans;
-LOCAL C2C *New_C2C PARAMS(( char *Mask, CHANNEL *Chan, bool OnlyOnce ));
+static C2C *New_C2C PARAMS(( char *Mask, CHANNEL *Chan, bool OnlyOnce ));
-LOCAL bool Check_List PARAMS(( C2C **Cl2Chan, CLIENT *Client, CHANNEL *Chan ));
-LOCAL bool Already_Registered PARAMS(( C2C *Cl2Chan, char *Mask, CHANNEL *Chan ));
+static bool Check_List PARAMS(( C2C **Cl2Chan, CLIENT *Client, CHANNEL *Chan ));
+static bool Already_Registered PARAMS(( C2C *Cl2Chan, char *Mask, CHANNEL *Chan ));
} /* Lists_MakeMask */
-LOCAL C2C *
+static C2C *
New_C2C( char *Mask, CHANNEL *Chan, bool OnlyOnce )
{
C2C *c2c;
} /* New_C2C */
-LOCAL bool
+static bool
Check_List( C2C **Cl2Chan, CLIENT *Client, CHANNEL *Chan )
{
C2C *c2c, *last;
} /* Check_List */
-LOCAL bool
+static bool
Already_Registered( C2C *List, char *Mask, CHANNEL *Chan )
{
C2C *c2c;
blob - 459ba1d296da77d5addfe58e93d7e0153e52a518
blob + e00c7ce7eff94c4aa6ad6b039728de869e87beda
--- src/ngircd/log.c
+++ src/ngircd/log.c
#include "portab.h"
-static char UNUSED id[] = "$Id: log.c,v 1.57 2005/06/24 19:55:10 alex Exp $";
+static char UNUSED id[] = "$Id: log.c,v 1.58 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#include "log.h"
-LOCAL char Init_Txt[127];
-LOCAL bool Is_Daemon;
+static char Init_Txt[127];
+static bool Is_Daemon;
#ifdef DEBUG
-LOCAL char Error_File[FNAME_LEN];
+static char Error_File[FNAME_LEN];
#endif
-LOCAL void Wall_ServerNotice PARAMS(( char *Msg ));
+static void Wall_ServerNotice PARAMS(( char *Msg ));
GLOBAL void
} /* Log_Resolver */
-LOCAL void
+static void
Wall_ServerNotice( char *Msg )
{
/* Server-Notice an entsprechende User verschicken */
blob - ff5807723a83b24ca542e655184e6a5dc508c731
blob + 2748a3e4569e3fa5631ba82060a76afa6921f718
--- src/ngircd/match.c
+++ src/ngircd/match.c
#include "portab.h"
-static char UNUSED id[] = "$Id: match.c,v 1.3 2005/03/19 18:43:49 fw Exp $";
+static char UNUSED id[] = "$Id: match.c,v 1.4 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
*/
-LOCAL int Matche PARAMS(( char *p, char *t ));
-LOCAL int Matche_After_Star PARAMS(( char *p, char *t ));
+static int Matche PARAMS(( char *p, char *t ));
+static int Matche_After_Star PARAMS(( char *p, char *t ));
#define MATCH_PATTERN 6 /* bad pattern */
} /* Match */
-LOCAL int
+static int
Matche( char *p, char *t )
{
register char range_start, range_end;
} /* Matche */
-LOCAL int
+static int
Matche_After_Star( char *p, char *t )
{
register int nextp, match = 0;
blob - e7183e31fcb4387a0ae8e35b235c51ab10f2de7a
blob + 20a35dbb0c399539bacb663b609ce42312ec34a4
--- src/ngircd/ngircd.c
+++ src/ngircd/ngircd.c
#include "portab.h"
-static char UNUSED id[] = "$Id: ngircd.c,v 1.107 2005/07/10 21:07:22 fw Exp $";
+static char UNUSED id[] = "$Id: ngircd.c,v 1.108 2005/07/31 20:13:08 alex Exp $";
/**
* @file
#include "ngircd.h"
-LOCAL void Initialize_Signal_Handler PARAMS(( void ));
-LOCAL void Signal_Handler PARAMS(( int Signal ));
+static void Initialize_Signal_Handler PARAMS(( void ));
+static void Signal_Handler PARAMS(( int Signal ));
-LOCAL void Show_Version PARAMS(( void ));
-LOCAL void Show_Help PARAMS(( void ));
+static void Show_Version PARAMS(( void ));
+static void Show_Help PARAMS(( void ));
-LOCAL void Pidfile_Create PARAMS(( long ));
-LOCAL void Pidfile_Delete PARAMS(( void ));
+static void Pidfile_Create PARAMS(( long ));
+static void Pidfile_Delete PARAMS(( void ));
-LOCAL void Fill_Version PARAMS(( void ));
+static void Fill_Version PARAMS(( void ));
-LOCAL void Setup_FDStreams PARAMS(( void ));
+static void Setup_FDStreams PARAMS(( void ));
-LOCAL bool NGIRCd_Init PARAMS(( bool ));
+static bool NGIRCd_Init PARAMS(( bool ));
/**
* The main() function of ngIRCd.
* further usage, for example by the IRC command VERSION and the --version
* command line switch.
*/
-LOCAL void
+static void
Fill_Version( void )
{
NGIRCd_VersionAddition[0] = '\0';
/**
* Initialize the signal handler.
*/
-LOCAL void
+static void
Initialize_Signal_Handler( void )
{
/* Signal-Handler initialisieren: einige Signale
* user and/or the system to it. For example SIGTERM and SIGHUP.
* @param Signal Number of the signal to handle.
*/
-LOCAL void
+static void
Signal_Handler( int Signal )
{
switch( Signal )
/**
* Display copyright and version information of ngIRCd on the console.
*/
-LOCAL void
+static void
Show_Version( void )
{
puts( NGIRCd_Version );
* This help depends on the configuration of the executable and only shows
* options that are actually enabled.
*/
-LOCAL void
+static void
Show_Help( void )
{
#ifdef DEBUG
/**
* Delete the file containing the process ID (PID).
*/
-LOCAL void
+static void
Pidfile_Delete( void )
{
/* Pidfile configured? */
* Create the file containing the process ID of ngIRCd ("PID file").
* @param pid The process ID to be stored in this file.
*/
-LOCAL void
+static void
Pidfile_Create( long pid )
{
int pidfd;
/**
* Redirect stdin, stdout and stderr to apropriate file handles.
*/
-LOCAL void
+static void
Setup_FDStreams( void )
{
int fd;
} /* Setup_FDStreams */
-LOCAL bool
+static bool
NGIRCd_getNobodyID(unsigned int *uid, unsigned int *gid )
{
struct passwd *pwd;
}
-LOCAL bool
+static bool
NGIRCd_Init( bool NGIRCd_NoDaemon )
{
static bool initialized;
blob - 623855da08d02fc016f0ed03d601e756afd57dae
blob + 582e489378fc30c0dce60ee0f572d3fd992b641a
--- src/ngircd/parse.c
+++ src/ngircd/parse.c
#include "portab.h"
-static char UNUSED id[] = "$Id: parse.c,v 1.64 2005/07/22 21:31:05 alex Exp $";
+static char UNUSED id[] = "$Id: parse.c,v 1.65 2005/07/31 20:13:08 alex Exp $";
/**
* @file
};
-LOCAL void Init_Request PARAMS(( REQUEST *Req ));
+static void Init_Request PARAMS(( REQUEST *Req ));
-LOCAL bool Validate_Prefix PARAMS(( CONN_ID Idx, REQUEST *Req, bool *Closed ));
-LOCAL bool Validate_Command PARAMS(( CONN_ID Idx, REQUEST *Req, bool *Closed ));
-LOCAL bool Validate_Args PARAMS(( CONN_ID Idx, REQUEST *Req, bool *Closed ));
+static bool Validate_Prefix PARAMS(( CONN_ID Idx, REQUEST *Req, bool *Closed ));
+static bool Validate_Command PARAMS(( CONN_ID Idx, REQUEST *Req, bool *Closed ));
+static bool Validate_Args PARAMS(( CONN_ID Idx, REQUEST *Req, bool *Closed ));
-LOCAL bool Handle_Request PARAMS(( CONN_ID Idx, REQUEST *Req ));
+static bool Handle_Request PARAMS(( CONN_ID Idx, REQUEST *Req ));
/**
* Initialize request structure.
* @param Req Request structure to be initialized.
*/
-LOCAL void
+static void
Init_Request( REQUEST *Req )
{
/* Neue Request-Struktur initialisieren */
} /* Init_Request */
-LOCAL bool
+static bool
Validate_Prefix( CONN_ID Idx, REQUEST *Req, bool *Closed )
{
CLIENT *client, *c;
} /* Validate_Prefix */
-LOCAL bool
+static bool
Validate_Command( UNUSED CONN_ID Idx, UNUSED REQUEST *Req, bool *Closed )
{
assert( Idx >= 0 );
} /* Validate_Comman */
-LOCAL bool
+static bool
Validate_Args( UNUSED CONN_ID Idx, UNUSED REQUEST *Req, bool *Closed )
{
assert( Idx >= 0 );
} /* Validate_Args */
-LOCAL bool
+static bool
Handle_Request( CONN_ID Idx, REQUEST *Req )
{
/* Client-Request verarbeiten. Bei einem schwerwiegenden Fehler
blob - ef43b3ace52527a097b5af59334e747ecdbe8ae5
blob + e056e726ce8589eef6706cd024c5d159d9dae1dc
--- src/ngircd/rendezvous.c
+++ src/ngircd/rendezvous.c
#ifdef ZEROCONF
-static char UNUSED id[] = "$Id: rendezvous.c,v 1.6 2005/07/08 16:18:39 alex Exp $";
+static char UNUSED id[] = "$Id: rendezvous.c,v 1.7 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#endif
} SERVICE;
-LOCAL SERVICE My_Rendezvous[MAX_RENDEZVOUS];
+static SERVICE My_Rendezvous[MAX_RENDEZVOUS];
-LOCAL void Unregister( int Idx );
+static void Unregister( int Idx );
/* -- Apple API -- */
#define MAX_MACH_MSG_SIZE 512
-LOCAL void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType ErrCode, void *Context );
+static void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType ErrCode, void *Context );
#endif /* Apple */
#ifdef HOWL
-LOCAL sw_discovery My_Discovery_Session = NULL;
-LOCAL sw_salt My_Salt;
+static sw_discovery My_Discovery_Session = NULL;
+static sw_salt My_Salt;
-LOCAL sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_discovery_publish_status Status, sw_discovery_oid Id, sw_opaque Extra );
+static sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_discovery_publish_status Status, sw_discovery_oid Id, sw_opaque Extra );
#endif /* Howl */
} /* Rendezvous_Handler */
-LOCAL void Unregister( int Idx )
+static void Unregister( int Idx )
{
/* Unregister service */
#ifdef APPLE
-LOCAL void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType ErrCode, void *Context )
+static void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType ErrCode, void *Context )
{
SERVICE *s = (SERVICE *)Context;
char txt[50];
#ifdef HOWL
-LOCAL sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_discovery_publish_status Status, UNUSED sw_discovery_oid Id, sw_opaque Extra )
+static sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_discovery_publish_status Status, UNUSED sw_discovery_oid Id, sw_opaque Extra )
{
SERVICE *s = (SERVICE *)Extra;
char txt[50];
blob - ef22614373dea19c749d6245551bd23bf06d0f81
blob + a5ba32e4cd5cc32ca1bf83725702e98b013fd58c
--- src/ngircd/resolve.c
+++ src/ngircd/resolve.c
#include "portab.h"
-static char UNUSED id[] = "$Id: resolve.c,v 1.16 2005/07/28 16:13:09 fw Exp $";
+static char UNUSED id[] = "$Id: resolve.c,v 1.17 2005/07/31 20:13:08 alex Exp $";
#include "imp.h"
#include <assert.h>
#ifdef IDENTAUTH
-LOCAL void Do_ResolveAddr PARAMS(( struct sockaddr_in *Addr, int Sock, int w_fd ));
+static void Do_ResolveAddr PARAMS(( struct sockaddr_in *Addr, int Sock, int w_fd ));
#else
-LOCAL void Do_ResolveAddr PARAMS(( struct sockaddr_in *Addr, int w_fd ));
+static void Do_ResolveAddr PARAMS(( struct sockaddr_in *Addr, int w_fd ));
#endif
-LOCAL void Do_ResolveName PARAMS(( char *Host, int w_fd ));
+static void Do_ResolveName PARAMS(( char *Host, int w_fd ));
#ifdef h_errno
-LOCAL char *Get_Error PARAMS(( int H_Error ));
+static char *Get_Error PARAMS(( int H_Error ));
#endif
-LOCAL RES_STAT *New_Res_Stat PARAMS(( void ));
+static RES_STAT *New_Res_Stat PARAMS(( void ));
static void
#ifdef IDENTAUTH
-LOCAL void
+static void
Do_ResolveAddr( struct sockaddr_in *Addr, int Sock, int w_fd )
#else
-LOCAL void
+static void
Do_ResolveAddr( struct sockaddr_in *Addr, int w_fd )
#endif
{
} /* Do_ResolveAddr */
-LOCAL void
+static void
Do_ResolveName( char *Host, int w_fd )
{
/* Resolver sub-process: resolve name and write result into pipe
#ifdef h_errno
-LOCAL char *
+static char *
Get_Error( int H_Error )
{
/* Get error message for H_Error */
#endif
-LOCAL RES_STAT *
+static RES_STAT *
New_Res_Stat( void )
{
RES_STAT *s;
blob - 5f2ee3d04ea8c1f7a4ad194c141f1bce4fe47488
blob + 2a133efc63d4b31d711f42b60a46d5a36753cccc
--- src/portab/portab.h
+++ src/portab/portab.h
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
- * $Id: portab.h,v 1.21 2005/04/16 09:23:01 fw Exp $
+ * $Id: portab.h,v 1.22 2005/07/31 20:13:11 alex Exp $
*
* Portability functions and declarations (header for libngbportab).
*/
#endif
-/* keywords */
-#define LOCAL static
-
/* datatypes */
#ifndef PROTOTYPES
blob - d9bea61f71d68d8943a2541609dcd189f914fe24
blob + 0a2098ede6896571540c34b05bf9705c32855aca
--- src/portab/portabtest.c
+++ src/portab/portabtest.c
#include "portab.h"
-static char UNUSED id[] = "$Id: portabtest.c,v 1.12 2005/03/19 18:43:50 fw Exp $";
+static char UNUSED id[] = "$Id: portabtest.c,v 1.13 2005/07/31 20:13:11 alex Exp $";
#include "imp.h"
#include <stdarg.h>
#include "exp.h"
-LOCAL void Panic PARAMS (( char *Reason, int Code ));
+static void Panic PARAMS (( char *Reason, int Code ));
GLOBAL int
} /* portab_check_types */
-LOCAL void
+static void
Panic( char *Reason, int Code )
{
/* Oops, something failed!? */