-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtuple.h
More file actions
27 lines (22 loc) · 682 Bytes
/
tuple.h
File metadata and controls
27 lines (22 loc) · 682 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
WeChat: cstutorcs
QQ: 749389476
Email: tutorcs@163.com
// tuple.h ... interface to functions on Tuples
// part of Multi-attribute Linear-hashed Files
// A Tuple is just a '\0'-terminated C string
// Consists of "val_1,val_2,val_3,...,val_n"
// See tuple.c for details on functions
// Last modified by John Shepherd, July 2019
#ifndef TUPLE_H
#define TUPLE_H 1
typedef char *Tuple;
#include "reln.h"
#include "bits.h"
int tupLength(Tuple t);
Tuple readTuple(Reln r, FILE *in);
Bits tupleHash(Reln r, Tuple t);
void tupleVals(Tuple t, char **vals);
void freeVals(char **vals, int nattrs);
Bool tupleMatch(Reln r, Tuple t1, Tuple t2);
void tupleString(Tuple t, char *buf);
#endif