main.cc 454 Bytes
Newer Older
jkvis's avatar
jkvis committed
1
#include <cassert>
jkvis's avatar
jkvis committed
2
3
4
5
6
7
8
9
10
11
12
13
#include <cstdio>
#include <cstdlib>

#include "../include/gesa.h"


int main(int, char* [])
{
    static char const* const string = "test me";

    GESA test;

jkvis's avatar
jkvis committed
14
    if (GESA_create(&test, (GESA_char_t*) string, 8) != 0)
jkvis's avatar
jkvis committed
15
16
17
18
19
20
21
    {
        fprintf(stderr, "Error GESA_create()\n");
        return EXIT_FAILURE;
    } // if

    printf("%s\n", test.string[0]);

jkvis's avatar
jkvis committed
22
23
    GESA_destroy(&test, GESA_KEEP_STRINGS);

jkvis's avatar
jkvis committed
24
25
    return EXIT_SUCCESS;
} // main