Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:remove stray usage of void *db when it should now be GDBM_FILE db
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1579d715b83fcfc0416230b8a76dc0afa62bf01f
User & Date: brandon 2016-06-13 19:26:38
Context
2016-06-13
19:27
add missing rule to build zdbi man page check-in: a902052c0c user: brandon tags: trunk
19:26
remove stray usage of void *db when it should now be GDBM_FILE db check-in: 1579d715b8 user: brandon tags: trunk
2016-06-12
20:01
update web docs check-in: b6d26739c7 user: brandon tags: trunk
Changes

Changes to src/zdbc.c.

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdlib.h>
#include <stdint.h>
#include "zdb.h"

const char *program_name = "zdbc";
const char *argp_program_version = PACKAGE_STRING;
const char *argp_program_bug_address = PACKAGE_BUGREPORT;
static void *database;
static char doc[] =
  "zdbc -- a tool for creating a DBM database";
static char args_doc[] = "DATABASE";

static struct argp_option options[] = {
  {"mmap-size",   (int)'m', "NUM", 0,
   "The size (in bytes) of the memory-mapped region to use (default=1024)", 0},







|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdlib.h>
#include <stdint.h>
#include "zdb.h"

const char *program_name = "zdbc";
const char *argp_program_version = PACKAGE_STRING;
const char *argp_program_bug_address = PACKAGE_BUGREPORT;
static GDBM_FILE database;
static char doc[] =
  "zdbc -- a tool for creating a DBM database";
static char args_doc[] = "DATABASE";

static struct argp_option options[] = {
  {"mmap-size",   (int)'m', "NUM", 0,
   "The size (in bytes) of the memory-mapped region to use (default=1024)", 0},

Changes to src/zdbf.c.

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#include <stdbool.h>
#include <stdint.h>
#include "zdb.h"

const char *program_name = "zdbf";
const char *argp_program_version = PACKAGE_STRING;
const char *argp_program_bug_address = PACKAGE_BUGREPORT;
static void *database;
static char doc[] =
  "zdbf -- a tool for fetching records from a DBM database\v"
  "If an input file is provided, lines are read from it as individual queries, "
  "otherwise queries are taken from stdin.";
static char args_doc[] = "DATABASE";

static struct argp_option options[] = {
................................................................................

static struct argp argp = {options, parse_opt, args_doc, doc,
                           (const struct argp_child *)NULL,
                           NULL, (const char *)NULL};


static void
fetchqueries (void *db, FILE * input, char *delim)
{
  size_t linelen = 512;
  size_t key_size;
  char *lineptr = (char *) malloc (linelen);
  char *key_str;

  if (!lineptr)







|







 







|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#include <stdbool.h>
#include <stdint.h>
#include "zdb.h"

const char *program_name = "zdbf";
const char *argp_program_version = PACKAGE_STRING;
const char *argp_program_bug_address = PACKAGE_BUGREPORT;
static GDBM_FILE database;
static char doc[] =
  "zdbf -- a tool for fetching records from a DBM database\v"
  "If an input file is provided, lines are read from it as individual queries, "
  "otherwise queries are taken from stdin.";
static char args_doc[] = "DATABASE";

static struct argp_option options[] = {
................................................................................

static struct argp argp = {options, parse_opt, args_doc, doc,
                           (const struct argp_child *)NULL,
                           NULL, (const char *)NULL};


static void
fetchqueries (GDBM_FILE db, FILE * input, char *delim)
{
  size_t linelen = 512;
  size_t key_size;
  char *lineptr = (char *) malloc (linelen);
  char *key_str;

  if (!lineptr)

Changes to src/zdbi.c.

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdlib.h>
#include <stdint.h>
#include "zdb.h"

const char *program_name = "zdbi";
const char *argp_program_version = PACKAGE_STRING;
const char *argp_program_bug_address = PACKAGE_BUGREPORT;
static void *database;
static char doc[] =
  "zdbi -- inspect a DBM database";
static char args_doc[] = "DATABASE";

static struct argp_option options[] = {
  {"mmap-size",   (int)'m', "NUM", 0,
   "The size (in bytes) of the memory-mapped region to use (default=1024)", 0},







|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdlib.h>
#include <stdint.h>
#include "zdb.h"

const char *program_name = "zdbi";
const char *argp_program_version = PACKAGE_STRING;
const char *argp_program_bug_address = PACKAGE_BUGREPORT;
static GDBM_FILE database;
static char doc[] =
  "zdbi -- inspect a DBM database";
static char args_doc[] = "DATABASE";

static struct argp_option options[] = {
  {"mmap-size",   (int)'m', "NUM", 0,
   "The size (in bytes) of the memory-mapped region to use (default=1024)", 0},

Changes to src/zdbr.c.

169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
}

static struct argp argp = {options, parse_opt, args_doc, doc,
                           (const struct argp_child *)NULL,
                           NULL, (const char *)NULL};

int
remrecords (void *db, FILE *input, bool verbose)
{
  size_t linelen = 512;
  size_t key_size;
  char *lineptr = (char *) malloc (linelen);
  char *key_str;

  if (!lineptr)







|







169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
}

static struct argp argp = {options, parse_opt, args_doc, doc,
                           (const struct argp_child *)NULL,
                           NULL, (const char *)NULL};

int
remrecords (GDBM_FILE db, FILE *input, bool verbose)
{
  size_t linelen = 512;
  size_t key_size;
  char *lineptr = (char *) malloc (linelen);
  char *key_str;

  if (!lineptr)

Changes to src/zdbs.c.

169
170
171
172
173
174
175
176
177
178
179
180
181
182
183

static struct argp argp = {options, parse_opt, args_doc, doc,
                           (const struct argp_child *)NULL,
                           NULL, (const char *)NULL};


int
addrecords (void *db, FILE *input, const char *delim, bool verbose)
{
  size_t linelen = 512;
  char *lineptr = (char *) malloc (linelen);
  char *linecpy;
  char *key_str, *value_str;
  size_t line_size, key_size, value_size;
  long int count = 1;







|







169
170
171
172
173
174
175
176
177
178
179
180
181
182
183

static struct argp argp = {options, parse_opt, args_doc, doc,
                           (const struct argp_child *)NULL,
                           NULL, (const char *)NULL};


int
addrecords (GDBM_FILE db, FILE *input, const char *delim, bool verbose)
{
  size_t linelen = 512;
  char *lineptr = (char *) malloc (linelen);
  char *linecpy;
  char *key_str, *value_str;
  size_t line_size, key_size, value_size;
  long int count = 1;