title: Clear the screen and buffer
body: <p>I have this sample program. It clears the screen and the scrollback buffer.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int
  main(void)
  {
    printf("\ec");
    return 0;
  }
  </code></pre>
  
  <p>However I have read that</p>
  
  <blockquote>
    <p>not all terminals take the ANSI/VT100+ escape sequences.</p>
  </blockquote>
  
  <p>So I am wanting to use something like <code>erase();</code> as
  <a href="https://stackoverflow.com/a/3646333">Gilles suggests</a>. However <code>erase</code> and friends seem to only clear the screen and not the buffer.</p>