]> mj.ucw.cz Git - libucw.git/blobdiff - lib/db-tool.c
Implemented SORT_UNIFY, SORT_UNIQUE and debugged SORT_VAR_DATA.
[libucw.git] / lib / db-tool.c
index 2743a4b0d33071a579247690c0a1166c1b4a5ae3..8dca52049b73a6aaf4c94ff6d0dc417198240926 100644 (file)
@@ -2,6 +2,9 @@
  *     SDBM Database Utility
  *
  *     (c) 2000--2001 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
 #include "lib/lib.h"
@@ -15,7 +18,6 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
-#include <getopt.h>
 
 static int verbose=0;
 static int cache=1024;
@@ -158,7 +160,7 @@ rebuild(char *sdb, char *ddb)
     die("unlink: %m");
   op.cache_size = cache;
   op.flags = SDBM_CREAT | SDBM_WRITE | SDBM_FAST;
-  op.page_order = (force_page >= 0) ? force_page : src->root->page_order;
+  op.page_order = (force_page >= 0) ? (u32) force_page : src->root->page_order;
   op.key_size = (force_key >= -1) ? force_key : src->root->key_size;
   op.val_size = (force_val >= -1) ? force_val : src->root->val_size;
   dest = sdbm_open(&op);