Commit Diff


commit - 8605e9c0fe7ffa42149271c9af31288bd4a0dfac
commit + 0c0d4af55ae6d098ccfabc258508a6b85b8c7449
blob - 9b5b5e2185aa2e8a9b1577e5d5b5fa2ee3359bd4
blob + afefefba4b2db9a87e7be1b87dcb8107e5e25365
--- src/ngircd/irc-write.c
+++ src/ngircd/irc-write.c
@@ -37,19 +37,19 @@
 #define SEND_TO_SERVER 2
 
 
-static char *Get_Prefix PARAMS((CLIENT *Target, CLIENT *Client));
+static const char *Get_Prefix PARAMS((CLIENT *Target, CLIENT *Client));
 static void cb_writeStrServersPrefixFlag PARAMS((CLIENT *Client,
 					 CLIENT *Prefix, void *Buffer));
 
 
 #ifdef PROTOTYPES
 GLOBAL bool
-IRC_WriteStrClient( CLIENT *Client, char *Format, ... )
+IRC_WriteStrClient( CLIENT *Client, const char *Format, ... )
 #else
 GLOBAL bool
 IRC_WriteStrClient( Client, Format, va_alist )
 CLIENT *Client;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -77,13 +77,13 @@ va_dcl
 
 #ifdef PROTOTYPES
 GLOBAL bool
-IRC_WriteStrClientPrefix( CLIENT *Client, CLIENT *Prefix, char *Format, ... )
+IRC_WriteStrClientPrefix(CLIENT *Client, CLIENT *Prefix, const char *Format, ...)
 #else
 GLOBAL bool
-IRC_WriteStrClientPrefix( Client, Prefix, Format, va_alist )
+IRC_WriteStrClientPrefix(Client, Prefix, Format, va_alist)
 CLIENT *Client;
 CLIENT *Prefix;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -110,14 +110,15 @@ va_dcl
 
 #ifdef PROTOTYPES
 GLOBAL bool
-IRC_WriteStrChannel( CLIENT *Client, CHANNEL *Chan, bool Remote, char *Format, ... )
+IRC_WriteStrChannel(CLIENT *Client, CHANNEL *Chan, bool Remote,
+		    const char *Format, ...)
 #else
 GLOBAL bool
-IRC_WriteStrChannel( Client, Chan, Remote, Format, va_alist )
+IRC_WriteStrChannel(Client, Chan, Remote, Format, va_alist)
 CLIENT *Client;
 CHANNEL *Chan;
 bool Remote;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -146,15 +147,16 @@ va_dcl
  */
 #ifdef PROTOTYPES
 GLOBAL bool
-IRC_WriteStrChannelPrefix( CLIENT *Client, CHANNEL *Chan, CLIENT *Prefix, bool Remote, char *Format, ... )
+IRC_WriteStrChannelPrefix(CLIENT *Client, CHANNEL *Chan, CLIENT *Prefix,
+			  bool Remote, const char *Format, ...)
 #else
 GLOBAL bool
-IRC_WriteStrChannelPrefix( Client, Chan, Prefix, Remote, Format, va_alist )
+IRC_WriteStrChannelPrefix(Client, Chan, Prefix, Remote, Format, va_alist)
 CLIENT *Client;
 CHANNEL *Chan;
 CLIENT *Prefix;
 bool Remote;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -218,12 +220,12 @@ va_dcl
 
 #ifdef PROTOTYPES
 GLOBAL void
-IRC_WriteStrServers( CLIENT *ExceptOf, char *Format, ... )
+IRC_WriteStrServers(CLIENT *ExceptOf, const char *Format, ...)
 #else
 GLOBAL void
-IRC_WriteStrServers( ExceptOf, Format, va_alist )
+IRC_WriteStrServers(ExceptOf, Format, va_alist)
 CLIENT *ExceptOf;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -246,13 +248,14 @@ va_dcl
 
 #ifdef PROTOTYPES
 GLOBAL void
-IRC_WriteStrServersPrefix( CLIENT *ExceptOf, CLIENT *Prefix, char *Format, ... )
+IRC_WriteStrServersPrefix(CLIENT *ExceptOf, CLIENT *Prefix,
+			  const char *Format, ...)
 #else
 GLOBAL void
-IRC_WriteStrServersPrefix( ExceptOf, Prefix, Format, va_alist )
+IRC_WriteStrServersPrefix(ExceptOf, Prefix, Format, va_alist)
 CLIENT *ExceptOf;
 CLIENT *Prefix;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -276,14 +279,15 @@ va_dcl
 
 #ifdef PROTOTYPES
 GLOBAL void
-IRC_WriteStrServersPrefixFlag( CLIENT *ExceptOf, CLIENT *Prefix, char Flag, char *Format, ... )
+IRC_WriteStrServersPrefixFlag(CLIENT *ExceptOf, CLIENT *Prefix, char Flag,
+			      const char *Format, ...)
 #else
 GLOBAL void
-IRC_WriteStrServersPrefixFlag( ExceptOf, Prefix, Flag, Format, va_alist )
+IRC_WriteStrServersPrefixFlag(ExceptOf, Prefix, Flag, Format, va_alist)
 CLIENT *ExceptOf;
 CLIENT *Prefix;
 char Flag;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -331,14 +335,15 @@ IRC_WriteStrServersPrefixFlag_CB(CLIENT *ExceptOf, CLI
  */
 #ifdef PROTOTYPES
 GLOBAL bool
-IRC_WriteStrRelatedPrefix( CLIENT *Client, CLIENT *Prefix, bool Remote, char *Format, ... )
+IRC_WriteStrRelatedPrefix(CLIENT *Client, CLIENT *Prefix, bool Remote,
+			  const char *Format, ...)
 #else
 GLOBAL bool
-IRC_WriteStrRelatedPrefix( Client, Prefix, Remote, Format, va_alist )
+IRC_WriteStrRelatedPrefix(Client, Prefix, Remote, Format, va_alist)
 CLIENT *Client;
 CLIENT *Prefix;
 bool Remote;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -416,7 +421,7 @@ GLOBAL void
 IRC_SendWallops(Client, From, Format, va_alist )
 CLIENT *Client;
 CLIENT *From;
-char *Format;
+const char *Format;
 va_dcl
 #endif
 {
@@ -468,7 +473,7 @@ IRC_SetPenalty( CLIENT *Client, time_t Seconds )
 } /* IRC_SetPenalty */
 
 
-static char *
+static const char *
 Get_Prefix( CLIENT *Target, CLIENT *Client )
 {
 	assert( Target != NULL );
blob - a984997b3c6c3acab14ad322bf71fbdb95ab0805
blob + f0543149e08ec55e42932a3bcbd66bdb11365b4e
--- src/ngircd/irc-write.h
+++ src/ngircd/irc-write.h
@@ -14,26 +14,27 @@
 #ifndef __irc_write_h__
 #define __irc_write_h__
 
-GLOBAL bool IRC_WriteStrClient PARAMS((CLIENT *Client, char *Format, ...));
+GLOBAL bool IRC_WriteStrClient PARAMS((CLIENT *Client, const char *Format, ...));
 GLOBAL bool IRC_WriteStrClientPrefix PARAMS((CLIENT *Client, CLIENT *Prefix,
-		char *Format, ...));
+		const char *Format, ...));
 
 GLOBAL bool IRC_WriteStrChannel PARAMS((CLIENT *Client, CHANNEL *Chan,
-		bool Remote, char *Format, ...));
+		bool Remote, const char *Format, ...));
 GLOBAL bool IRC_WriteStrChannelPrefix PARAMS((CLIENT *Client, CHANNEL *Chan,
-		CLIENT *Prefix, bool Remote, char *Format, ...));
+		CLIENT *Prefix, bool Remote, const char *Format, ...));
 
-GLOBAL void IRC_WriteStrServers PARAMS((CLIENT *ExceptOf, char *Format, ...));
+GLOBAL void IRC_WriteStrServers PARAMS((CLIENT *ExceptOf,
+		const char *Format, ...));
 GLOBAL void IRC_WriteStrServersPrefix PARAMS((CLIENT *ExceptOf, CLIENT *Prefix,
-		char *Format, ...));
+		const char *Format, ...));
 GLOBAL void IRC_WriteStrServersPrefixFlag PARAMS((CLIENT *ExceptOf,
-		CLIENT *Prefix, char Flag, char *Format, ...));
+		CLIENT *Prefix, char Flag, const char *Format, ...));
 GLOBAL void IRC_WriteStrServersPrefixFlag_CB PARAMS((CLIENT *ExceptOf,
 		CLIENT *Prefix, char Flag,
 		void (*callback)(CLIENT *, CLIENT *, void *), void *cb_data));
 
 GLOBAL bool IRC_WriteStrRelatedPrefix PARAMS((CLIENT *Client, CLIENT *Prefix,
-		bool Remote, char *Format, ...));
+		bool Remote, const char *Format, ...));
 
 GLOBAL void IRC_SendWallops PARAMS((CLIENT *Client, CLIENT *From,
 		const char *Format, ...));