This script shows that the codes are written to redirected files:
producing:
When I cat this file, the colored text appears on my screen, the emulator Terminal 2.22.3 from Gnome desktop (although in green, not orange).
Best wishes ... cheers, drl
The environment for this execution was:
Note how code and data are far more legible when used within CODE tags. Select the text, then click the # just above the editing window.
Is it possible to change the color of text in a korn shell script Menu?
I can change the color of session text through my telnet client but I want to be able to change color text in the Korn shell menu to highlight certain items. (6 Replies)
Hello, I am somewhat new to linux. I just installed Red Hat 7.2 and when I try to load gnome or KDE in colors above 8bit it will kind of lock up and display some wierd scrambled cable look. I have an ATI Radeon 7000. I check out my monitor settings they are fine. Is it the graphics card? I set my... (1 Reply)
Hi All,
I need to BCP out a table into a text file along with the table headers. Normal BCP out command only bulk copies the data, and not the headers.
I am using the following command: bcp database1..table1 out file1.dat -c -t\| -b1000 -A8192 -Uuser -Ppassword -efile.dat.err
Regards,... (0 Replies)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Hi,
I'm trying to send a log file to mailx as a "Body Message" but since the file contains so many control and color characters it's making an attachement out of it instead of putting it in the body.
The file looks like this:
Bringing up loopback interface: ^^M^MŽ
19 Bringing up interface... (18 Replies)
HI
i am running a shell script in cron and storing the output of that script in a file say test.then i am copying the content of test to test1 and i will send the output of test to some email ids using mutt. Next time when the script executes i am comparing the contents of test and test1 and... (3 Replies)
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT CENTOS
sdl_setcolors
SDL_SetColors(3) SDL API Reference SDL_SetColors(3)NAME
SDL_SetColors - Sets a portion of the colormap for the given 8-bit surface.
SYNOPSIS
#include "SDL.h"
int SDL_SetColors(SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors);
DESCRIPTION
Sets a portion of the colormap for the given 8-bit surface.
When surface is the surface associated with the current display, the display colormap will be updated with the requested colors. If
SDL_HWPALETTE was set in SDL_SetVideoMode flags, SDL_SetColors will always return 1, and the palette is guaranteed to be set the way you
desire, even if the window colormap has to be warped or run under emulation.
The color components of a SDL_Color structure are 8-bits in size, giving you a total of 256^3 =16777216 colors.
Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from
the surface and a physical palette (that determines how the hardware will map the colors to the display). SDL_SetColors modifies both pal-
ettes (if present), and is equivalent to calling SDL_SetPalette with the flags set to (SDL_LOGPAL | SDL_PHYSPAL).
RETURN VALUE
If surface is not a palettized surface, this function does nothing, returning 0. If all of the colors were set as passed to SDL_SetColors,
it will return 1. If not all the color entries were set exactly as given, it will return 0, and you should look at the surface palette to
determine the actual color palette.
EXAMPLE
/* Create a display surface with a grayscale palette */
SDL_Surface *screen;
SDL_Color colors[256];
int i;
.
.
.
/* Fill colors with color information */
for(i=0;i<256;i++){
colors[i].r=i;
colors[i].g=i;
colors[i].b=i;
}
/* Create display */
screen=SDL_SetVideoMode(640, 480, 8, SDL_HWPALETTE);
if(!screen){
printf("Couldn't set video mode: %s
", SDL_GetError());
exit(-1);
}
/* Set palette */
SDL_SetColors(screen, colors, 0, 256);
.
.
.
.
SEE ALSO
SDL_Color SDL_Surface, SDL_SetPalette, SDL_SetVideoMode
SDL Tue 11 Sep 2001, 23:01 SDL_SetColors(3)