[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] Farver



On Sun, 18 Apr 1999, Jacob Kofod wrote:

> Findes der en funktion til at skrive en tekst-streng i farver?
> Jeg ved godt at man kan se i header-filerne. Men jeg syntes de er lidt
> uoverskuelige, og der er heller ikke de bedste beskrivelser. Findes der
> ikke en beskrivelse af de funktioner, som man normalt har til rådighed
> i /usr/include biblioteket?

I farver, hvor? Paa konsollen, X, HTML?

Paa konsollen kan du skifte farve ved hjaelp af standard ANSI.SYS koderne.
Se man console_codes eller kig paa www.snippets.org som har en reference.
Soeg efter SGR paa man-siden.

Evt. kan du ogsaa benytte et af de biblioteker der sender paa en generisk
maade - som ncurses eller slang. I disse findes der nogle generiske
rutiner for skaermhaandtering saadan at du siger 'move (10,10);' for at
flytte cursoren derhen i stedet for at laver en printf ("\e[10;10X");
(eller hvad koden nu er).

Fordelen er saa at biblioteket finder ud at at bruge de bedste koder for
den terminal du benytter... men hvis du kun har taenkt dig at bruge det
paa en linux konsol eller en ANSI.SYS kompatibel terminal kan det vaere
for besvaerligt.


-- 
==============================================================================
Erwin Andreasen   Herlev, Denmark <sslug@sslug>          UNIX System Programmer
<URL:http://www.andreasen.org>              <*>         (not speaking for) DDE
==============================================================================



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