Exemplo n.º 1
0
int			init_readline(t_rl *info)
{
  static unsigned char	start = 0;
  char			*term;

  if (CHCK(info->flags, 0x04))
    {
      info->info.buffer = NULL;
      info->info.tmp = NULL;
      info->prompt = NULL;
      info->tmp.buffer = NULL;
      info->info.i = 0;
      info->info.nb = 0;
      info->info.insert_m = 1;
      if (!(info->bind))
	default_database(info);
      if ((info->flags |= raw_mode(&info->terminal)) && !start)
	{
	  if (!(term = getenv("TERM")))
	    get_termcap("dumb", info);
	  else if (!(get_termcap(term, info)))
	    get_termcap("dumb", info);
	  start++;
	}
    }
  return (MTRUE);
}
Exemplo n.º 2
0
main()
{

  get_termcap();

  /* Clear the screen  */
  normal();
  clearln();
  printf("%s", clear);

  exit(0);
}