diff src/server.c @ 271:3477050e8d10 noffle

[svn] * src/client.c,src/fetch.c,src/lock.c.src/protocol.c,src/util.h,src/util.c: Define our own SignalHandler type rather than use the rather Linux-specific (and potentially glibc version specific) sig_t. * src/client.c,src/database.h,src/database.c,src/over.h,src/over.c, src/pseudo.c,src/server.c: Ensure format string specifiers and passed data types match. As part of this, change some uses of size_t as a general data type to an appropriate base C type. Database status changes from int to unsigned.
author bears
date Sun, 10 Nov 2002 11:32:17 +0000
parents b3a2f710fe2c
children c02c4eb95f95
line wrap: on
line diff
--- a/src/server.c	Sun Nov 10 11:30:40 2002 +0000
+++ b/src/server.c	Sun Nov 10 11:32:17 2002 +0000
@@ -1,7 +1,7 @@
 /*
   server.c
 
-  $Id: server.c 401 2002-10-25 11:04:57Z bears $
+  $Id: server.c 403 2002-11-10 11:32:17Z bears $
 */
 
 #if HAVE_CONFIG_H
@@ -505,7 +505,7 @@
 static void
 touchArticle( const char *msgId )
 {
-    int status = Db_status( msgId );
+    unsigned status = Db_status( msgId );
     status |= DB_INTERESTING;
     Db_setStatus( msgId, status );
     Db_updateLastAccess( msgId );
@@ -543,12 +543,12 @@
 updateArt( const char *msgId )
 /* retrieve Article if in online mode */
 {
-    int stat;
+    unsigned status;
 
     touchArticle( msgId );
     touchReferences( msgId );
-    stat = Db_status( msgId );
-    if ( Online_true() && ( stat & DB_NOT_DOWNLOADED ) )
+    status = Db_status( msgId );
+    if ( Online_true() && ( status & DB_NOT_DOWNLOADED ) )
     {
         retrieveArt( msgId );
     }
@@ -557,16 +557,16 @@
 static void
 doBodyInDb( const char *msgId )
 {
-    int stat;
+    unsigned status;
     Str srv;
 
-    stat = Db_status( msgId );
-    if ( stat & DB_RETRIEVING_FAILED )
+    status = Db_status( msgId );
+    if ( status & DB_RETRIEVING_FAILED )
     {
-        Db_setStatus( msgId, stat & ~DB_RETRIEVING_FAILED );
+        Db_setStatus( msgId, status & ~DB_RETRIEVING_FAILED );
         putTxtBuf( Db_body( msgId ) );
     }
-    else if ( stat & DB_NOT_DOWNLOADED )
+    else if ( status & DB_NOT_DOWNLOADED )
     {
         findServer( msgId, srv );
         if ( Req_contains( srv, msgId ) )
@@ -1195,10 +1195,10 @@
 	Utl_cpyStr( res, Ov_ref( ov ) );
 	break;
     case BYTES:
-	snprintf( res, MAXCHAR, "%d", Ov_bytes( ov ) );
+	snprintf( res, MAXCHAR, "%ld", Ov_bytes( ov ) );
 	break;
     case LINES:
-	snprintf( res, MAXCHAR, "%d", Ov_lines( ov ) );
+	snprintf( res, MAXCHAR, "%ld", Ov_lines( ov ) );
 	break;
     case XREF:
 	msgId = Ov_msgId( ov );