File:  [Coherent Logic Development] / freem / examples / libfreem / init / init.c
Revision 1.1: download - view: text, annotated - select for diffs
Sun Jan 19 02:04:04 2025 UTC (3 months ago) by snw
CVS tags: MAIN, HEAD
Initial revision

#include <stdio.h>
#include <string.h>
#include <freem.h>

int main(int argc, char **argv, char **envp)
{
    char namespace[256];

    /* get the namespace name to use */
    printf("Enter FreeM namespace to use: ");
    fgets(namespace, 255, stdin);

    /* remove the trailing newline */
    namespace[strcspn(buffer, "\n")] = '\0';

    /* initialize libfreem using the provided namespace */
    if(freem_init(namespace) == TRUE) {
        printf("\nSuccess\n");
    }
    else {
        printf("\nFailure\n");
    }
     
    return 0;
}
    

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>