Download h source code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright 2021 Jeisson Hidalgo-Cespedes - Universidad de Costa Rica
 */

#ifndef ARRAY_H
#define ARRAY_H

#include "common.h"

typedef struct {
  size_t capacity;
  size_t count;
  data_t* elements;
} array_t;  // duration_array_t

int array_init(array_t* array);
void array_destroy(array_t* array);
int array_append(array_t* array, data_t data);

#endif  // ARGUMENTS_H