-
Notifications
You must be signed in to change notification settings - Fork 0
/
name.h
39 lines (26 loc) · 851 Bytes
/
name.h
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
#ifndef NAME_H
#define NAME_H
#include <stdio.h>
#include <string.h>
#include "common.h"
struct name_basics {
char *nconst;
char *primaryName;
};
/*
* getNumActorEntries: counts the number of lines in a text file on which the
* word "actor" appears
* Param:
* char* fname: the name of the file to check
* return: long int, the number of lines with the word "actor" on them
*/
long int getNumActorEntries(char* fname);
struct name_basics* constructNameBasicsArr(char* fname, int* arrLen);
void freeNameBasics(struct name_basics* arr, long int arrLen);
void printNB(void* toPrint);
int compareNamePrimaryName(const void* a, const void* b);
int compareNameNConst(const void* a, const void* b);
void* NBDeref(void* p);
int compareNBPptr(const void* a, const void* b);
int compareNBNptr (const void* a, const void* b);
#endif