diff src/client.c @ 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 b4e6f7f96135
children 2e47992d7f5c
line wrap: on
line diff
--- 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 ) )
         {