changeset 41:92b59cfcf364 noffle

[svn] Replaces identical local server name strings by constant
author enz
date Fri, 05 May 2000 09:32:53 +0100
parents bc79bd130098
children 2467ff423c15
files group.c group.h server.c
diffstat 3 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/group.c	Fri May 05 09:27:04 2000 +0100
+++ b/group.c	Fri May 05 09:32:53 2000 +0100
@@ -7,7 +7,7 @@
   loadGrp() and saveGrp(). This is done transparently. Access to the groups
   database is done by group name, by the functions defined in group.h.        
 
-  $Id: group.c 46 2000-05-05 08:27:04Z enz $
+  $Id: group.c 47 2000-05-05 08:32:53Z enz $
 */
 
 #include "group.h"
@@ -160,7 +160,7 @@
 {
     if ( ! loadGrp( name ) )
         return 0;
-    return ( strcmp( grp.serv, "(local)" ) == 0 );
+    return ( strcmp( grp.serv, GRP_LOCAL_SERVER_NAME ) == 0 );
 }
 
 void
@@ -275,7 +275,7 @@
 void
 Grp_setLocal( const char *name )
 {
-    Grp_setServ( name, "(local)" );
+    Grp_setServ( name, GRP_LOCAL_SERVER_NAME );
 }
 
 void
--- a/group.h	Fri May 05 09:27:04 2000 +0100
+++ b/group.h	Fri May 05 09:32:53 2000 +0100
@@ -3,7 +3,7 @@
 
   Groups database
 
-  $Id: group.h 44 2000-05-05 07:23:15Z enz $
+  $Id: group.h 47 2000-05-05 08:32:53Z enz $
 */
 
 #ifndef GRP_H
@@ -12,6 +12,8 @@
 #include <time.h>
 #include "common.h"
 
+#define GRP_LOCAL_SERVER_NAME "(local)"
+
 /* open group database */
 Bool
 Grp_open( void );
--- a/server.c	Fri May 05 09:27:04 2000 +0100
+++ b/server.c	Fri May 05 09:32:53 2000 +0100
@@ -1,7 +1,7 @@
 /*
   server.c
 
-  $Id: server.c 45 2000-05-05 08:26:29Z enz $
+  $Id: server.c 47 2000-05-05 08:32:53Z enz $
 */
 
 #include "server.h"
@@ -311,7 +311,8 @@
     Str serv;
 
     findServ( msgId, serv );    
-    if ( strcmp( serv, "(unknown)" ) == 0  || strcmp( serv, "(local)" ) == 0 )
+    if ( strcmp( serv, "(unknown)" ) == 0 
+         || strcmp( serv, GRP_LOCAL_SERVER_NAME ) == 0 )
         return FALSE;        
     if ( ! Client_connect( serv ) )
         return FALSE;
@@ -435,7 +436,7 @@
         if ( Req_contains( serv, msgId ) )
             putTxtBuf( Pseudo_alreadyMarkedBody() );
         else if ( strcmp( serv, "(unknown)" ) != 0 && 
-		  strcmp( serv, "(local)" ) != 0 && 
+		  strcmp( serv, GRP_LOCAL_SERVER_NAME ) != 0 && 
 		  Req_add( serv, msgId ) )
             putTxtBuf( Pseudo_markedBody() );
         else