main.c 501 Bytes
Newer Older
jkvis's avatar
jkvis committed
1 2 3
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
jkvis's avatar
jkvis committed
4 5 6 7

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


jkvis's avatar
jkvis committed
8
int main(int argc, char* argv[])
jkvis's avatar
jkvis committed
9
{
jkvis's avatar
jkvis committed
10 11 12
    (void) argc;
    (void) argv;

jkvis's avatar
jkvis committed
13 14 15 16
    static char const* const string = "test me";

    GESA test;

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

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

jkvis's avatar
jkvis committed
25 26
    GESA_destroy(&test, GESA_KEEP_STRINGS);

jkvis's avatar
jkvis committed
27 28
    return EXIT_SUCCESS;
} // main