hamsterdb Embedded Database 1.1.15
Functions
db3.c File Reference
#include <stdio.h>
#include <string.h>
#include <ham/hamsterdb.h>

Go to the source code of this file.

Functions

static int my_string_compare (ham_db_t *db, const ham_u8_t *lhs, ham_size_t lhs_length, const ham_u8_t *rhs, ham_size_t rhs_length)
int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)
static int my_string_compare ( ham_db_t db,
const ham_u8_t lhs,
ham_size_t  lhs_length,
const ham_u8_t rhs,
ham_size_t  rhs_length 
) [static]

Copyright (C) 2005-2008 Christoph Rupp (chris@crupp.de).

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

See files COPYING.* for License information.

This sample uses hamsterdb to sort data from stdin; every word is inserted into the database (duplicate words are ignored). Then a cursor is used to print all words in sorted order.

Definition at line 22 of file db3.c.

Referenced by main().