Annotation of freem/examples/libfreem/init/init.c, revision 1.1
1.1 ! snw 1: #include <stdio.h>
! 2: #include <string.h>
! 3: #include <freem.h>
! 4:
! 5: int main(int argc, char **argv, char **envp)
! 6: {
! 7: char namespace[256];
! 8:
! 9: /* get the namespace name to use */
! 10: printf("Enter FreeM namespace to use: ");
! 11: fgets(namespace, 255, stdin);
! 12:
! 13: /* remove the trailing newline */
! 14: namespace[strcspn(buffer, "\n")] = '\0';
! 15:
! 16: /* initialize libfreem using the provided namespace */
! 17: if(freem_init(namespace) == TRUE) {
! 18: printf("\nSuccess\n");
! 19: }
! 20: else {
! 21: printf("\nFailure\n");
! 22: }
! 23:
! 24: return 0;
! 25: }
! 26:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>