#include  <string.h>
#include  <locale.h>
#include  <stdlib.h>

/* 
 * The following example uses the wcwidth subroutine to find
 * the display column width of a wide character.
 */

int main(int argc, char **argv) {
    wint_t  wc;
    int     retval;
 
    setlocale(LC_ALL,  "");
 
    /*
     * Let wc be the wide character whose display width is
     * to be found.
     */
    retval  =  wcwidth(wc);
    
    if (retval == -1){
        /*
         * Error handling. Invalid or nonprintable
         * wide character in wc.
         */
    }
    
    return (0);
}