changeset 61:adf0af5152f7 noffle

[svn] Renamed some variables and function names, because they caused compiler warnings because of shadowing global variables from system include files (index, stat, serv).
author enz
date Fri, 12 May 2000 18:19:38 +0100
parents defaa632baae
children 53cfa011a08c
files ChangeLog src/client.c src/database.c src/database.h src/fetch.c src/fetchlist.c src/fetchlist.h src/group.c src/group.h src/noffle.c src/server.c src/server.h
diffstat 12 files changed, 126 insertions(+), 120 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 12 17:52:58 2000 +0100
+++ b/ChangeLog	Fri May 12 18:19:38 2000 +0100
@@ -12,6 +12,12 @@
    warnings about signedness. In general, int should be used for parameters
    for allowing a signedness assertion in the function.
    (see J.Lakos: Large-Scale C++ Software Design, section 9.2).
+ * src/client.c, src/database.c, src/database.h, src/fetch.c, src/fetchlist.c,
+   src/fetchlist.h, src/group.c, src/group.h, src/noffle.c, src/server.c
+   src/server.h:
+   Renamed some variables, because they caused compiler warnings because
+   of shadowing global variables from system include files
+   (index, stat, serv).
 	
 Fri May 12 10:19:56 CEST 2000  Uwe Hermann <uh1763@bingo-ev.de>
 
--- a/src/client.c	Fri May 12 17:52:58 2000 +0100
+++ b/src/client.c	Fri May 12 18:19:38 2000 +0100
@@ -1,7 +1,7 @@
 /*
   client.c
 
-  $Id: client.c 64 2000-05-12 16:52:07Z enz $
+  $Id: client.c 67 2000-05-12 17:19:38Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -411,17 +411,17 @@
         }
         else
         {
-            if ( Cfg_servIsPreferential( client.serv, Grp_serv( grp ) ) )
+            if ( Cfg_servIsPreferential( client.serv, Grp_server( grp ) ) )
             {
                 Log_inf( "Changing server for '%s': '%s'->'%s'",
-                         grp, Grp_serv( grp ), client.serv );
+                         grp, Grp_server( grp ), client.serv );
                 Grp_setServ( grp, client.serv );
                 Grp_setRmtNext( grp, first );
 		Grp_setPostAllow( grp, postAllow );
             }
             else
                 Log_dbg( "Group %s is already fetched from %s",
-                           grp, Grp_serv( grp ) );
+                           grp, Grp_server( grp ) );
             
         }
     }
@@ -630,7 +630,7 @@
     Bool done = FALSE, interesting;
     char *p;
     Str msgId;
-    int stat, len;
+    int status, len;
     time_t lastAccess, nowTime;
     double threadFollowTime, limit, age;
 
@@ -654,9 +654,9 @@
         *p = '\0';
         if ( Db_contains( msgId ) )
         {
-            stat = Db_stat( msgId );
+            status = Db_status( msgId );
             lastAccess = Db_lastAccess( msgId );
-            interesting = ( stat & DB_INTERESTING );
+            interesting = ( status & DB_INTERESTING );
             age = difftime( nowTime, lastAccess );
             if ( interesting && age <= limit )
                 return TRUE;
@@ -685,10 +685,10 @@
         else
         {
             /* TODO: This code block seems unnessesary. Can we remove it? */
-            if ( Cfg_servIsPreferential( client.serv, Grp_serv( g ) ) )
+            if ( Cfg_servIsPreferential( client.serv, Grp_server( g ) ) )
             {
                 Log_dbg( "Changing first server for '%s' from '%s' to '%s'",
-                         msgId, Grp_serv( g ), client.serv );
+                         msgId, Grp_server( g ), client.serv );
                 snprintf( t, MAXCHAR, "%s:%d %s",
                           client.grp, Ov_numb( ov ), xref );
                 Db_setXref( msgId, t );
@@ -756,12 +756,12 @@
 static void
 retrievingFailed( const char* msgId, const char *reason )
 {
-    int stat;
+    int status;
 
     Log_err( "Retrieving of %s failed: %s", msgId, reason );
-    stat = Db_stat( msgId );
+    status = Db_status( msgId );
     Pseudo_retrievingFailed( msgId, reason );
-    Db_setStat( msgId, stat | DB_RETRIEVING_FAILED );
+    Db_setStatus( msgId, status | DB_RETRIEVING_FAILED );
 }
 
 static Bool
@@ -791,7 +791,7 @@
         Log_err( "Article '%s' not prepared in database. Skipping.", msgId );
         return;
     }
-    if ( ! ( Db_stat( msgId ) & DB_NOT_DOWNLOADED ) )
+    if ( ! ( Db_status( msgId ) & DB_NOT_DOWNLOADED ) )
     {
         Log_inf( "Article '%s' already retrieved. Skipping.", msgId );
         return;
@@ -818,7 +818,7 @@
         if ( ! Db_contains( msgId ) )
             Log_err( "Skipping retrieving of %s (not prepared in database)",
                      msgId );
-        else if ( ! ( Db_stat( msgId ) & DB_NOT_DOWNLOADED ) )
+        else if ( ! ( Db_status( msgId ) & DB_NOT_DOWNLOADED ) )
             Log_inf( "Skipping %s (already retrieved)", msgId );
         else if ( ! putCmdNoFlush( "ARTICLE %s", msgId ) )
         {
--- a/src/database.c	Fri May 12 17:52:58 2000 +0100
+++ b/src/database.c	Fri May 12 18:19:38 2000 +0100
@@ -1,7 +1,7 @@
 /*
   database.c
 
-  $Id: database.c 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: database.c 67 2000-05-12 17:19:38Z enz $
 
   Uses GNU gdbm library. Using Berkeley db (included in libc6) was
   cumbersome. It is based on Berkeley db 1.85, which has severe bugs
@@ -41,7 +41,7 @@
     Str msgId;
 
     /* Status of loaded article */
-    int stat; /* Flags */
+    int status; /* Flags */
     time_t lastAccess;
 
     /* Overview of loaded article */
@@ -135,7 +135,7 @@
     
     Utl_cpyStr( db.msgId, msgId );
     p = Utl_getLn( t, (char *)dptr );
-    if ( ! p || sscanf( t, "%x", &db.stat ) != 1 )
+    if ( ! p || sscanf( t, "%x", &db.status ) != 1 )
     {
         Log_err( "Entry in database '%s' is corrupt (status)", msgId );
         return FALSE;
@@ -183,7 +183,7 @@
     if ( strcmp( db.msgId, "" ) == 0 )
         return FALSE;
     s = new_DynStr( 5000 );
-    snprintf( t, MAXCHAR, "%x", db.stat );
+    snprintf( t, MAXCHAR, "%x", db.status );
     DynStr_appLn( s, t );
     snprintf( t, MAXCHAR, "%lu", db.lastAccess );
     DynStr_appLn( s, t );
@@ -226,7 +226,7 @@
     if ( Db_contains( msgId ) )
         Log_err( "Preparing article twice: %s", msgId );
 
-    db.stat = DB_NOT_DOWNLOADED;
+    db.status = DB_NOT_DOWNLOADED;
     db.lastAccess = time( NULL );
 
     Utl_cpyStr( db.msgId, msgId );
@@ -257,13 +257,13 @@
         Log_err( "Cannot find info about '%s' in database", msgId );
         return FALSE;
     }
-    if ( ! ( db.stat & DB_NOT_DOWNLOADED ) )
+    if ( ! ( db.status & DB_NOT_DOWNLOADED ) )
     {
         Log_err( "Trying to store already retrieved article '%s'", msgId );
         return FALSE;
     }
-    db.stat &= ~DB_NOT_DOWNLOADED;
-    db.stat &= ~DB_RETRIEVING_FAILED;
+    db.status &= ~DB_NOT_DOWNLOADED;
+    db.status &= ~DB_RETRIEVING_FAILED;
     db.lastAccess = time( NULL );
 
     DynStr_clear( db.txt );
@@ -285,7 +285,7 @@
             if ( strcmp( field, "x-noffle-status" ) == 0 )
             {
                 if ( strstr( value, "NOT_DOWNLOADED" ) != 0 )
-                    db.stat |= DB_NOT_DOWNLOADED;
+                    db.status |= DB_NOT_DOWNLOADED;
             }
             else if ( strcmp( field, "message-id" ) != 0
                       && strcmp( field, "xref" ) != 0
@@ -302,18 +302,18 @@
 
     /* Read body */
     while ( ( artTxt = Utl_getLn( line, artTxt ) ) )
-        if ( ! ( db.stat & DB_NOT_DOWNLOADED ) )
+        if ( ! ( db.status & DB_NOT_DOWNLOADED ) )
             DynStr_appLn( db.txt, line );
     
     return saveArt();
 }
 
 void
-Db_setStat( const char *msgId, int stat )
+Db_setStatus( const char *msgId, int status )
 {
     if ( loadArt( msgId ) )
     {
-        db.stat = stat;
+        db.status = status;
         saveArt();
     }
 }
@@ -410,7 +410,7 @@
     static DynStr *s = NULL;
 
     Str date, t;
-    int stat;
+    int status;
     const char *p;
 
     if ( s == NULL )
@@ -422,15 +422,15 @@
         return NULL;
     strftime( date, MAXCHAR, "%Y-%m-%d %H:%M:%S",
               localtime( &db.lastAccess ) );
-    stat = db.stat;
+    status = db.status;
     snprintf( t, MAXCHAR,
               "Message-ID: %s\n"
               "X-NOFFLE-Status:%s%s%s\n"
               "X-NOFFLE-LastAccess: %s\n",
               msgId,
-              stat & DB_INTERESTING ? " INTERESTING" : "",
-              stat & DB_NOT_DOWNLOADED ? " NOT_DOWNLOADED" : "",
-              stat & DB_RETRIEVING_FAILED ? " RETRIEVING_FAILED" : "",
+              status & DB_INTERESTING ? " INTERESTING" : "",
+              status & DB_NOT_DOWNLOADED ? " NOT_DOWNLOADED" : "",
+              status & DB_RETRIEVING_FAILED ? " RETRIEVING_FAILED" : "",
               date );
     DynStr_app( s, t );
     appendLongHeader( s, "Subject:", db.subj );
@@ -466,11 +466,11 @@
 }
 
 int
-Db_stat( const char *msgId )
+Db_status( const char *msgId )
 {
     if ( ! loadArt( msgId ) )
         return 0;
-    return db.stat;
+    return db.status;
 }
 
 time_t
--- a/src/database.h	Fri May 12 17:52:58 2000 +0100
+++ b/src/database.h	Fri May 12 18:19:38 2000 +0100
@@ -3,7 +3,7 @@
 
   Article database.
 
-  $Id: database.h 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: database.h 67 2000-05-12 17:19:38Z enz $
 */
 
 #ifndef DB_H
@@ -52,7 +52,7 @@
 Db_storeArt( const char *msgId, const char *artTxt );
 
 void
-Db_setStat( const char *msgId, int stat );
+Db_setStatus( const char *msgId, int status );
 
 void
 Db_updateLastAccess( const char *msgId );
@@ -68,7 +68,7 @@
 Db_body( const char *msgId );
 
 int
-Db_stat( const char *msgId );
+Db_status( const char *msgId );
 
 /* Get last modification time of entry. Returns -1, if msgId non-existing. */
 time_t
--- a/src/fetch.c	Fri May 12 17:52:58 2000 +0100
+++ b/src/fetch.c	Fri May 12 18:19:38 2000 +0100
@@ -1,7 +1,7 @@
 /*
   fetch.c
 
-  $Id: fetch.c 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: fetch.c 67 2000-05-12 17:19:38Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -141,7 +141,7 @@
     for ( i = 0; i < size; ++i )
     {
         Fetchlist_element( &name, &mode, i );
-        if ( strcmp( Grp_serv( name ), fetch.serv ) == 0 )
+        if ( strcmp( Grp_server( name ), fetch.serv ) == 0 )
             Fetch_getNewArts( name, mode );
     }
 }
--- a/src/fetchlist.c	Fri May 12 17:52:58 2000 +0100
+++ b/src/fetchlist.c	Fri May 12 18:19:38 2000 +0100
@@ -1,7 +1,7 @@
 /*
   fetchlist.c
 
-  $Id: fetchlist.c 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: fetchlist.c 67 2000-05-12 17:19:38Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -176,12 +176,12 @@
 }
 
 Bool
-Fetchlist_element( const char **name, FetchMode *mode, int index )
+Fetchlist_element( const char **name, FetchMode *mode, int idx )
 {
-    if ( index < 0 || index >= fetchlist.size )
+    if ( idx < 0 || idx >= fetchlist.size )
         return FALSE;
-    *name = fetchlist.elem[ index ].name;
-    *mode = fetchlist.elem[ index ].mode;
+    *name = fetchlist.elem[ idx ].name;
+    *mode = fetchlist.elem[ idx ].mode;
     return TRUE;
 }
 
--- a/src/fetchlist.h	Fri May 12 17:52:58 2000 +0100
+++ b/src/fetchlist.h	Fri May 12 18:19:38 2000 +0100
@@ -3,7 +3,7 @@
 
   List of groups that are to be fetched presently.
 
-  $Id: fetchlist.h 51 2000-05-05 23:49:38Z uh1763 $
+  $Id: fetchlist.h 67 2000-05-12 17:19:38Z enz $
 */
 
 #ifndef FETCHLIST_H
@@ -32,7 +32,7 @@
 
 /* Get element number index. */
 Bool
-Fetchlist_element( const char **name, FetchMode *mode, int index );
+Fetchlist_element( const char **name, FetchMode *mode, int idx );
 
 /* Add entry. Invalidates any indices. Returns TRUE if new entry, FALSE if
    entry was overwritten. */
--- a/src/group.c	Fri May 12 17:52:58 2000 +0100
+++ b/src/group.c	Fri May 12 18:19:38 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 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: group.c 67 2000-05-12 17:19:38Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -204,7 +204,7 @@
 }
 
 const char *
-Grp_serv( const char *name )
+Grp_server( const char *name )
 {
     static Str serv = "";
 
--- a/src/group.h	Fri May 12 17:52:58 2000 +0100
+++ b/src/group.h	Fri May 12 18:19:38 2000 +0100
@@ -3,7 +3,7 @@
 
   Groups database
 
-  $Id: group.h 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: group.h 67 2000-05-12 17:19:38Z enz $
 */
 
 #ifndef GRP_H
@@ -58,7 +58,7 @@
 
 /* Get server the group resides on */
 const char *
-Grp_serv( const char *name );
+Grp_server( const char *name );
 
 /*
   Get article number of the first article in the group
--- a/src/noffle.c	Fri May 12 17:52:58 2000 +0100
+++ b/src/noffle.c	Fri May 12 18:19:38 2000 +0100
@@ -2,7 +2,7 @@
   noffle.c
 
   Main program. Implements specified actions, but running as server, which
-  is done by Serv_run(), declared in server.h.
+  is done by Server_run(), declared in server.h.
   
   Locking policy: lock access to databases while noffle is running, but
   not as server. If noffle runs as server, locking is performed while
@@ -10,7 +10,7 @@
   received for some seconds (to allow multiple clients connect at the same
   time).
 
-  $Id: noffle.c 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: noffle.c 67 2000-05-12 17:19:38Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -355,7 +355,7 @@
             case OVER:
                 modeStr = "over"; break;
             }
-            printf( "%s %s %s\n", name, Grp_serv( name ), modeStr );
+            printf( "%s %s %s\n", name, Grp_server( name ), modeStr );
         }
 }
 
@@ -437,7 +437,7 @@
             strftime( dateCreated, MAXCHAR, "%Y-%m-%d %H:%M:%S",
                       localtime( &created ) );
             printf( "%s\t%s\t%i\t%i\t%i\t%c\t%s\t%s\t%s\n",
-                    g, Grp_serv( g ), Grp_first( g ), Grp_last( g ),
+                    g, Grp_server( g ), Grp_first( g ), Grp_last( g ),
                     Grp_rmtNext( g ), Grp_postAllow( g ), dateCreated,
                     dateLastAccess, Grp_dsc( g ) );
         }
@@ -748,7 +748,7 @@
         break;
     case 'r':
         Log_inf( "Starting as server" );
-        Serv_run();
+        Server_run();
         break;
     case 'R':
         doRequested( optarg );
--- a/src/server.c	Fri May 12 17:52:58 2000 +0100
+++ b/src/server.c	Fri May 12 18:19:38 2000 +0100
@@ -1,7 +1,7 @@
 /*
   server.c
 
-  $Id: server.c 60 2000-05-09 22:28:38Z uh1763 $
+  $Id: server.c 67 2000-05-12 17:19:38Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -55,7 +55,7 @@
     Bool running;
     int artPtr;
     Str grp; /* selected group, "" if none */
-} serv = { FALSE, 0, "" };
+} server = { FALSE, 0, "" };
 
 typedef struct Cmd
 {
@@ -122,11 +122,11 @@
 {
     FetchMode mode;
 
-    Grp_setLastAccess( serv.grp, time( NULL ) );
-    if ( ! Grp_local ( serv.grp ) && Cfg_autoSubscribe() && ! Online_true() )
+    Grp_setLastAccess( server.grp, time( NULL ) );
+    if ( ! Grp_local ( server.grp ) && Cfg_autoSubscribe() && ! Online_true() )
     {
         Fetchlist_read();
-        if ( ! Fetchlist_contains( serv.grp ) )
+        if ( ! Fetchlist_contains( server.grp ) )
         {
             if ( strcmp( Cfg_autoSubscribeMode(), "full" ) == 0 )
                 mode = FULL;
@@ -134,7 +134,7 @@
                 mode = THREAD;
             else
                 mode = OVER;
-            Fetchlist_add( serv.grp, mode );
+            Fetchlist_add( server.grp, mode );
             Fetchlist_write();
             Pseudo_autoSubscribed();
         }
@@ -210,11 +210,11 @@
 checkNewArts( const char *grp )
 {
     if ( ! Online_true()
-         || strcmp( grp, serv.grp ) == 0
+         || strcmp( grp, server.grp ) == 0
          || Grp_local( grp )
-         || time( NULL ) - Grp_lastAccess( serv.grp ) < 1800 )
+         || time( NULL ) - Grp_lastAccess( server.grp ) < 1800 )
         return;
-    if ( Fetch_init( Grp_serv( grp ) ) )
+    if ( Fetch_init( Grp_server( grp ) ) )
     {
         Fetch_getNewArts( grp, OVER );
         Fetch_close();
@@ -224,11 +224,11 @@
 static void
 postArts( void )
 {
-    Str serv;
+    Str s;
 
     Cfg_beginServEnum();
-    while ( Cfg_nextServ( serv ) )
-        if ( Fetch_init( serv ) )
+    while ( Cfg_nextServ( s ) )
+        if ( Fetch_init( s ) )
         {
             Fetch_postArts();
             Fetch_close();
@@ -263,9 +263,9 @@
 changeToGrp( const char *grp )
 {
     checkNewArts( grp );
-    Utl_cpyStr( serv.grp, grp );
+    Utl_cpyStr( server.grp, grp );
     readCont( grp );
-    serv.artPtr = Cont_first();
+    server.artPtr = Cont_first();
 }
 
 static Bool
@@ -296,7 +296,7 @@
 static Bool
 testGrpSelected( void )
 {
-    if ( *serv.grp == '\0' )
+    if ( *server.grp == '\0' )
     {
         putStat( STAT_NO_GRP_SELECTED, "No group selected" );
         return FALSE;
@@ -305,9 +305,9 @@
 }
 
 static void
-findServ( const char *msgId, Str result )
+findServer( const char *msgId, Str result )
 {
-    const char *p, *pColon, *serv;
+    const char *p, *pColon, *srv;
     Str s, grp;
 
     Utl_cpyStr( result, "(unknown)" );
@@ -322,9 +322,9 @@
                 if ( pColon )
                 {
                     Utl_cpyStrN( grp, p, pColon - p );
-                    serv = Grp_serv( grp );
-                    if ( Cfg_servIsPreferential( serv, result ) )
-                        Utl_cpyStr( result, serv );
+                    srv = Grp_server( grp );
+                    if ( Cfg_servIsPreferential( srv, result ) )
+                        Utl_cpyStr( result, srv );
                 }
             }
             while ( ( p = strtok( NULL, " \t" ) ) );
@@ -334,13 +334,13 @@
 static Bool
 retrieveArt( const char *msgId )
 {
-    Str serv;
+    Str s;
 
-    findServ( msgId, serv );    
-    if ( strcmp( serv, "(unknown)" ) == 0 
-         || strcmp( serv, GRP_LOCAL_SERVER_NAME ) == 0 )
+    findServer( msgId, s );    
+    if ( strcmp( s, "(unknown)" ) == 0 
+         || strcmp( s, GRP_LOCAL_SERVER_NAME ) == 0 )
         return FALSE;        
-    if ( ! Client_connect( serv ) )
+    if ( ! Client_connect( s ) )
         return FALSE;
     Client_retrieveArt( msgId );
     Client_disconnect();
@@ -374,18 +374,18 @@
     {
         if ( ! checkNumb( n ) )
             return FALSE;
-        serv.artPtr = n;
+        server.artPtr = n;
         ov = Cont_get( n );
         *msgId = Ov_msgId( ov );
         *numb = n;
     }
     else if ( strcmp( arg, "" ) == 0 )
     {
-        if ( ! checkNumb( serv.artPtr ) )
+        if ( ! checkNumb( server.artPtr ) )
             return FALSE;
-        ov = Cont_get( serv.artPtr );
+        ov = Cont_get( server.artPtr );
         *msgId = Ov_msgId( ov );
-        *numb =  serv.artPtr;
+        *numb =  server.artPtr;
     }
     else
     {
@@ -403,9 +403,9 @@
 static void
 touchArticle( const char *msgId )
 {
-    int stat = Db_stat( msgId );
-    stat |= DB_INTERESTING;
-    Db_setStat( msgId, stat );
+    int status = Db_status( msgId );
+    status |= DB_INTERESTING;
+    Db_setStatus( msgId, status );
     Db_updateLastAccess( msgId );
 }
 
@@ -441,29 +441,29 @@
 doBodyInDb( const char *msgId )
 {
     int stat;
-    Str serv;
+    Str srv;
 
     touchArticle( msgId );
     touchReferences( msgId );
-    stat = Db_stat( msgId );
+    stat = Db_status( msgId );
     if ( Online_true() && ( stat & DB_NOT_DOWNLOADED ) )
     {
         retrieveArt( msgId );
-        stat = Db_stat( msgId );
+        stat = Db_status( msgId );
     }
     if ( stat & DB_RETRIEVING_FAILED )
     {
-        Db_setStat( msgId, stat & ~DB_RETRIEVING_FAILED );
+        Db_setStatus( msgId, stat & ~DB_RETRIEVING_FAILED );
         putTxtBuf( Db_body( msgId ) );
     }
     else if ( stat & DB_NOT_DOWNLOADED )
     {
-        findServ( msgId, serv );
-        if ( Req_contains( serv, msgId ) )
+        findServer( msgId, srv );
+        if ( Req_contains( srv, msgId ) )
             putTxtBuf( Pseudo_alreadyMarkedBody() );
-        else if ( strcmp( serv, "(unknown)" ) != 0 && 
-		  strcmp( serv, GRP_LOCAL_SERVER_NAME ) != 0 && 
-		  Req_add( serv, msgId ) )
+        else if ( strcmp( srv, "(unknown)" ) != 0 && 
+		  strcmp( srv, GRP_LOCAL_SERVER_NAME ) != 0 && 
+		  Req_add( srv, msgId ) )
             putTxtBuf( Pseudo_markedBody() );
         else
             putTxtBuf( Pseudo_markingFailedBody() );
@@ -570,7 +570,7 @@
 
     if ( testGrpSelected() )
     {
-        n = serv.artPtr;
+        n = server.artPtr;
         if ( ! Cont_validNumb( n ) )
             putStat( STAT_NO_ART_SELECTED, "No article selected" );
         else
@@ -582,7 +582,7 @@
             {
                 putStat( STAT_ART_RETRIEVED, "%ld %s selected",
                          n, Ov_msgId( Cont_get( n ) ) );
-                serv.artPtr = n;
+                server.artPtr = n;
             }
         }
     }
@@ -876,7 +876,7 @@
 
     if ( testGrpSelected() )
     {
-        n = serv.artPtr;
+        n = server.artPtr;
         if ( ! Cont_validNumb( n ) )
             putStat( STAT_NO_ART_SELECTED, "No article selected" );
         else
@@ -888,7 +888,7 @@
             {
                 putStat( STAT_ART_RETRIEVED, "%ld %s selected",
                          n, Ov_msgId( Cont_get( n ) ) );
-                serv.artPtr = n;
+                server.artPtr = n;
             }
         }
     }
@@ -937,7 +937,7 @@
     {
 	if ( Grp_exists( grp ) && ! Grp_local( grp ) )
 	{
-	    if ( ! Out_add( Grp_serv( grp ), msgId, art ) )
+	    if ( ! Out_add( Grp_server( grp ), msgId, art ) )
 	    {
 		Log_err( "Cannot add posted article to outgoing directory" );
 		err = TRUE;
@@ -1002,7 +1002,7 @@
     {
 	if ( Grp_exists( grp ) && ! Grp_local( grp ) )
 	{
-	    if ( ! Out_add( Grp_serv( grp ), msgId, art ) )
+	    if ( ! Out_add( Grp_server( grp ), msgId, art ) )
 	    {
 		Log_err( "Cannot add posted article to outgoing directory" );
 		err = TRUE;
@@ -1221,8 +1221,8 @@
     r = sscanf( p, "%d-%d", first, last );
     if ( r < 1 )
     {
-        *first = serv.artPtr;
-        *last = serv.artPtr;
+        *first = server.artPtr;
+        *last = server.artPtr;
     }
     else if ( r == 1 )
     {
@@ -1333,7 +1333,7 @@
 		case XREF:
 		    msgId = Ov_msgId( ov );
 		    if ( Pseudo_isGeneralInfo( msgId ) )
-			putTxtLn( "%lu %s:%lu", n, serv.grp, n );
+			putTxtLn( "%lu %s:%lu", n, server.grp, n );
 		    else
 			putTxtLn( "%lu %s", n, Db_xref( msgId ) );
 		    break;
@@ -1460,7 +1460,7 @@
         return TRUE;
     parseRange( arg, &first, &last, &n );
     if ( n == 0 )
-	first = last = serv.artPtr;
+	first = last = server.artPtr;
     putStat( STAT_OVERS_FOLLOW, "Overview %ld-%ld", first, last );
     for ( i = first; i <= last; ++i )
 	if ( ( ov = Cont_get( i ) ) )
@@ -1526,25 +1526,25 @@
 }
 
 static Bool
-initServ( void )
+initServer( void )
 {
-    ASSERT( ! serv.running );
+    ASSERT( ! server.running );
     if ( ! Lock_openDatabases() )
       return FALSE;
-    serv.running = TRUE;
+    server.running = TRUE;
     return TRUE;
 }
 
 static void
-closeServ( void )
+closeServer( void )
 {
-    ASSERT( serv.running );
-    serv.running = FALSE;
+    ASSERT( server.running );
+    server.running = FALSE;
     Lock_closeDatabases();
 }
 
 void
-Serv_run( void )
+Server_run( void )
 {
     Bool done;
     int r;
@@ -1569,14 +1569,14 @@
             done = TRUE;
         else if ( r == 0 )
         {
-            if ( serv.running )
-                closeServ();
+            if ( server.running )
+                closeServer();
         }
         else /* ( r > 0 ) */
         {
-            if ( ! serv.running )
+            if ( ! server.running )
             {
-                if ( ! initServ() )
+                if ( ! initServer() )
                 {
                     putFatal( "Cannot init server" );
                     done = TRUE;
@@ -1591,6 +1591,6 @@
                 done = TRUE;
         }
     }
-    if ( serv.running )
-        closeServ();
+    if ( server.running )
+        closeServer();
 }
--- a/src/server.h	Fri May 12 17:52:58 2000 +0100
+++ b/src/server.h	Fri May 12 18:19:38 2000 +0100
@@ -3,7 +3,7 @@
 
   Be NNTP server on stdin/stdout.
 
-  $Id: server.h 51 2000-05-05 23:49:38Z uh1763 $
+  $Id: server.h 67 2000-05-12 17:19:38Z enz $
 */
 
 #ifndef SERV_H
@@ -13,6 +13,6 @@
 #include <config.h>
 #endif
 
-void Serv_run( void );
+void Server_run( void );
 
 #endif