github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

dawsdesign / erl_bdb_sample

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 4
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Tree: f6c097b

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Erlang -> Berkeley DB Sample — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fixed makefile. 
Matt Williamson (author)
Tue May 26 07:48:34 -0700 2009
commit  f6c097bf646e5bd3269c12a4c7146f14fea90bba
tree    94a73f7cbd2b01ea6b569733fd958b6a74d93588
parent  4378c320c86a0937ac26107639d72942921d82c7
erl_bdb_sample / priv / bdb_drv.h priv/bdb_drv.h
100644 29 lines (21 sloc) 0.627 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <erl_driver.h>
#include <ei.h>
#include <stdio.h>
#include <string.h>
#include <db.h>
 
#define DB_PATH "./store.db"
 
#define CMD_PUT 1
#define CMD_GET 2
#define CMD_DEL 3
 
#define KEY_SIZE 20
 
typedef struct _bdb_drv_t {
  ErlDrvPort port;
 
  DB *db;
} bdb_drv_t;
 
 
static ErlDrvData start(ErlDrvPort port, char* cmd);
static void stop(ErlDrvData handle);
static void outputv(ErlDrvData handle, ErlIOVec *ev);
static void put(bdb_drv_t *bdb_drv, ErlIOVec *ev);
static void get(bdb_drv_t *bdb_drv, ErlIOVec *ev);
static void del(bdb_drv_t *bdb_drv, ErlIOVec *ev);
static void unkown(bdb_drv_t *bdb_drv, ErlIOVec *ev);
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server