forked from bxshi/voting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.h
More file actions
50 lines (42 loc) · 785 Bytes
/
constants.h
File metadata and controls
50 lines (42 loc) · 785 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// constants.h
// assign1
//
// Created by Baoxu Shi on 13-8-30.
// Copyright (c) 2013年 Baoxu Shi. All rights reserved.
//
#ifndef assign1_constants_h
#define assign1_constants_h
#define MAX_FILE_NUM 4096
#define MAX_LINE_PRE_CHUNK 819200
#define MAX_LINE_LEN 23 //2^32 10digits
#define MAX_SIZE_PRE_FILE 17203200
#define TRUE 1
#define FALSE 0
#include "uthash.h"
struct vote_result
{
u_int32_t uid;
u_int32_t count;
UT_hash_handle hh;
};
struct vote_history
{
u_int32_t uid;
u_int32_t vote;
UT_hash_handle hh;
};
typedef struct file_struct
{
char *filename;
int dup_vote;
long block_size;
} file_struct;
//global hashmap
typedef struct vote_info
{
u_int32_t **uid;
u_int32_t **vote;
u_int16_t len;
} vote_info;
#endif