version 1.16, 2014/05/18 08:08:50 |
version 1.17, 2015/04/18 18:28:37 |
|
|
#include <stdint.h> |
#include <stdint.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
#include <limits.h> |
#include <ohash.h> |
#include <ohash.h> |
|
|
#include "stats.h" |
#include "stats.h" |
|
|
uint32_t v; |
uint32_t v; |
uint32_t h; |
uint32_t h; |
uint32_t slots; |
uint32_t slots; |
|
const char *errstr; |
const char *e; |
const char *e; |
char **occupied; |
char **occupied; |
char **t; |
char **t; |
|
|
if (argc != 3) |
if (argc != 3) |
exit(1); |
exit(1); |
|
|
tn = atoi(argv[1]); |
tn = strtonum(argv[1], 1, INT_MAX, &errstr); |
if (!tn) |
if (errstr) |
exit(1); |
exit(1); |
t = table[tn-1]; |
t = table[tn-1]; |
slots = atoi(argv[2]); |
slots = strtonum(argv[2], 0, INT_MAX, &errstr); |
|
if (errstr) |
|
exit(1); |
if (slots) { |
if (slots) { |
occupied = calloc(slots, sizeof(char *)); |
occupied = calloc(slots, sizeof(char *)); |
if (!occupied) |
if (!occupied) |