Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking if a color is valid in X

Status
Not open for further replies.

Themuppeteer

Programmer
Apr 4, 2001
449
0
0
BE
Hello,

how do I check with X if a color is valid or not ?
I need something like a function isValidColor(char* mycolor);
that returns a 0 when its a good color and something else when its not. like isValidColor("green"); returns 0 and
isValidColor("somethingelse"); returns -1 or so...

Can anyone help me ?

thnx!


Greetz,
img


NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

"Those who say they understand chess, understand nothing"

-- Robert HUBNER
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top