[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Clrscr - funktion i Linux



On Sun, 10 Jan 1999, Yngve Lund Nielsen wrote:

> Hejsa,
> 
> Findes der ikke en clrscr() funktion til C under Linux?? Jeg fandt
> engang en conio.h til linux, hvor funktionen også er der, men den virker
> ikke :/ eller skal jeg selv lave en funktion der evt. loader 'clear'??
> 
> -- 
> Regardings
> Yngve Lund Nielsen

Se her:

/*************************************************************************
 *
 * Purpose: Clear the screen with VT100 escape codes. This can be done
 *          with conio.h on PCs - non standard code. Or curses.h, bit of 
 *          a fag...
 * Author:  M.J. Leslie
 * Date:    22-Jun-94
 *
 ************************************************************************/

void clrscr(void);

main()
{
  clrscr();
}

void clrscr(void)
{
  char a[80];
  printf("\033[2J");            /* Clear the entire screen.             */
  printf("\033[0;0f");          /* Move cursor to the top left hand corner
*/
}

For yderligere information:
http://www.math-cs.upei.ca/misc/cref/C/cref.html

Jonas B. Nielsen

Eml: sslug@sslug
Tel: 45257449   



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *