log_compare.c

Go to the documentation of this file.
00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1996, 1997, 1998, 1999, 2000
00005  *      Sleepycat Software.  All rights reserved.
00006  */
00007 #include "config.h"
00008 
00009 #ifndef lint
00010 static const char revid[] = "$Id: log__compare_8c-source.html,v 1.1 2008/06/08 10:20:19 sebdiaz Exp $";
00011 #endif /* not lint */
00012 
00013 #ifndef NO_SYSTEM_INCLUDES
00014 #include <sys/types.h>
00015 #endif
00016 
00017 #include "db_int.h"
00018 
00019 /*
00020  * CDB_log_compare --
00021  *      Compare two LSN's; return 1, 0, -1 if first is >, == or < second.
00022  */
00023 int
00024 CDB_log_compare(lsn0, lsn1)
00025         const DB_LSN *lsn0, *lsn1;
00026 {
00027         if (lsn0->file != lsn1->file)
00028                 return (lsn0->file < lsn1->file ? -1 : 1);
00029 
00030         if (lsn0->offset != lsn1->offset)
00031                 return (lsn0->offset < lsn1->offset ? -1 : 1);
00032 
00033         return (0);
00034 }

Generated on Sun Jun 8 10:56:38 2008 for GNUmifluz by  doxygen 1.5.5