title: probleme with printw, ncurses
body: <p>I need to use printw(); but it doesn't work, it just segfault.
  I have used <code>initscr</code> and <code>endwin</code> but it doesn't change anything.</p>
  
  <pre><code>void    aff_battel(char **str)
  {
    int   i;
    int   j;
    char  *str2;
  
    if ((str2 = malloc(sizeof(*str) * 23)) == NULL)
      return ;
    str2 = "---------------------\n\0";
    j = 0;
    i = 0;
    while (str[i] != NULL)
      {
        initscr();
        printw("---------------------\n\0"); /* it doesn't work */
        printw("%s", str2); /* here nether */
        endwin();
        i++;
      }
  }
  </code></pre>
  
  <p>know i have put <code>initsrc();</code> at the start and endwin a the end of the loop but it still print me nothing</p>
  
  <pre><code>void    aff_battel(char **str)
  {
    int   i;
    int   j;
  
    j = 0;
    i = 0;
    while (str[i] != NULL)
      {
        printw("---------------------\n");
        i++;
      }
    endwin();
  }
  </code></pre>