URI: 
       Refactor clear(1) - ubase - suckless linux base utils
  HTML git clone git://git.suckless.org/ubase
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 7b27c7f87c01b00b6a3e5cd7a60fb832681d5ccc
   DIR parent b6669b5f196275bcf205abe5904b63bcd9213011
  HTML Author: FRIGN <dev@frign.de>
       Date:   Mon,  7 Sep 2015 12:33:16 +0200
       
       Refactor clear(1)
       
       Adopting best practices(tm) we developed with sbase.
       
       Diffstat:
         M clear.1                             |       2 +-
         M clear.c                             |      16 +++++++++++++++-
       
       2 files changed, 16 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/clear.1 b/clear.1
       @@ -8,4 +8,4 @@
        .Nm
        .Sh DESCRIPTION
        .Nm
       -clears the screen
       +clears the screen.
   DIR diff --git a/clear.c b/clear.c
       @@ -2,9 +2,23 @@
        #include <stdio.h>
        #include <stdlib.h>
        
       +#include "util.h"
       +
       +static void
       +usage(void)
       +{
       +        eprintf("usage: %s\n", argv0);
       +}
       +
        int
       -main(void)
       +main(int argc, char *argv[])
        {
       +        argv0 = argv[0], argc--, argv++;
       +
       +        if (argc)
       +                usage();
       +
                printf("\x1b[2J\x1b[H");
       +
                return 0;
        }