Update copyright year + FSF address
[idzebra-moved-to-github.git] / index / kcompare.c
index d05ad2a..3fd1c7e 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: kcompare.c,v 1.57 2005-05-31 07:29:10 adam Exp $
-   Copyright (C) 1995-2005
+/* $Id: kcompare.c,v 1.60 2006-08-14 10:40:15 adam Exp $
+   Copyright (C) 1995-2006
    Index Data ApS
 
 This file is part of the Zebra server.
@@ -15,9 +15,9 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra.  If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
 */
 
 #include <stdlib.h>
@@ -118,6 +118,13 @@ zint key_get_seq(const void *p)
     return k.mem[k.len-1];
 }
 
+zint key_get_segment(const void *p)
+{
+    struct it_key k;
+    memcpy (&k, p, sizeof(k));
+    return k.mem[k.len-1] / KEY_SEGMENT_SIZE;
+}
+
 int key_qsort_compare (const void *p1, const void *p2)
 {
     int r;
@@ -338,3 +345,11 @@ int key_SU_decode (int *ch, const unsigned char *out)
     return len;
 }
 
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+