home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_01 / 8n01093a < prev    next >
Text File  |  1990-02-19  |  380b  |  20 lines

  1. *****Listing 1*****
  2.  
  3.  
  4.     cls ()
  5.     {
  6.           char    *getenv(), *term, *cl;
  7.  
  8.       term = getenv ("TERM"); 
  9.       if (!strcmp(term, "ansi"))
  10.         cl = "\033[2J\033[H";
  11.       else if (!strcmp(term, "wy50"))
  12.         cl = "\033*";
  13.                 /*  add other terminals ...         */
  14.                    /*  if all else fails, try a form feed    */
  15.       else 
  16.         cl = "\f";
  17.       fputs (cl, stderr);
  18.     }
  19.  
  20.