[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



Yngve Lund Nielsen skrev:

> 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'??

Nu er det jo unix, så man skal have programmet til at
opsøge escape sekvensen for clear screen i termcap
(gammeldags) eller terminfo databasen, så det virker uanset
hvilken terminaltype man bruger.

Prøv evt. at få fat i kildeteksten til tput eller læs
man 5 terminfo.

Fidusen er at man henter koden fra terminfo databasen med
tgetent() og printer den på skærmen.

Den kode du skal printe hedder i terminfo sprog "clear".

Man kan se alle koderne med infocmp, eller infocmp -L hvis
man vil se de lange navne. Meget smart.

-- 
torben fjerdingstad        | linux-2.0.35/GNU/gnome-0.30
sslug@sslug        | Show me your unix,
http://www.fjerdingstad.dk |   and I know who you are.


 
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] *