/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* This is an example of the function mbsinit(mbstate_t).  
   This function determines whether the object pointed to by ps describes an 
   initial conversion state.
*/ 
#include <wchar.h>
#include <stdlib.h>

int main() { 
    int retval;
    mbstate_t *ps;
   
    ps = NULL;
    retval = mbsinit(ps);
    if(retval != 0) {
    	printf("mbsinit(ps) returns nonzero if ps is a null pointer \n");
    	printf("or ps is pointing to an initial conversion state.\n");
    	printf("mbsinit(ps)= %d\n", retval);
    }
    else
        printf("Error \n");
}

