summaryrefslogtreecommitdiff
path: root/33_counts/counts.h
blob: cf0783c5eb6f337d788eb471c3fa1006ce468c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#ifndef __COUNTS_H__
#define __COUNTS_H__
struct _one_count_t {
  char * string;
  int count;
};
typedef struct _one_count_t one_count_t;

struct _counts_t {
  one_count_t * countArray;
  int arraySize;
  int count_of_unknowns;
};
typedef struct _counts_t counts_t;

counts_t * createCounts(void);
void addCount(counts_t * c, const char * name);
void printCounts(counts_t * c, FILE * outFile);

void freeCounts(counts_t * c);

#endif