I am programming C in linux and i just need a quick and dirty way to make
some text stand out. I would like to change the color maybe to red. I want
to print out something like
printf("Blah: This is my message.");
Blah: This is my message.
I would like blah to be red.
if not red than maybe bold or some way for it to stand out.
thanks 6 1929
On Mon, 06 Sep 2004 01:45:22 GMT, "Robert Smith" <no**@none.com> wrote
in comp.lang.c: I am programming C in linux and i just need a quick and dirty way to make some text stand out. I would like to change the color maybe to red. I want to print out something like printf("Blah: This is my message."); Blah: This is my message.
I would like blah to be red. if not red than maybe bold or some way for it to stand out. thanks
Standard C does not even require that stdout be connected to a video
display device, so it has absolutely no support at all for formatting
the text in any way.
There are platform-specific extensions for just about all platforms
that support this, but these are not part of the language and are not
discussed here.
For Linux, you need to ask about the extensions available to you in
the group news:comp.os.linux.development.apps, where the Linux experts
hang out.
Good luck.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Robert Smith wrote: I am programming C in linux and i just need a quick and dirty way to make some text stand out. I would like to change the color maybe to red. I want to print out something like printf("Blah: This is my message."); Blah: This is my message.
I would like blah to be red. if not red than maybe bold or some way for it to stand out.
printf("BLAH: This is my message."); fflush(stdout);
--
"I'm a war president. I make decisions here in the Oval Office
in foreign policy matters with war on my mind." - Bush.
"If I knew then what I know today, I would still have invaded
Iraq. It was the right decision" - G.W. Bush, 2004-08-02
printf("\033[0;color+30;color+40;13m"
enum colors { BLACK=0, RED, GREEN, YELLOW, BLUE, MAGNETA, CYAN, WHITE
};
--
Moonie
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
Moonie <Mo***********@mail.codecomments.com> writes: printf("\033[0;color+30;color+40;13m"
enum colors { BLACK=0, RED, GREEN, YELLOW, BLUE, MAGNETA, CYAN, WHITE };
What?
The substring "color+30" doesn't expand to the value of the expression
in a string literal. Even if the code were correct, it would be
non-portable; there is no portable way to make text stand out (OTHER
THAN TRICKS LIKE THIS).
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
ansi protocols do work under linux and unix
instead of color use BLACK or RED
BLACK+30 and so forth...
you can use ncurses if you wish
-
Mooni
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------
Moonie <Mo***********@mail.codecomments.com> scribbled the following: ansi protocols do work under linux and unix
instead of color use BLACK or RED
BLACK+30 and so forth...
you can use ncurses if you wish.
This may come as a shock to you, but Linux and Unix are not the whole
world. C is even available for applications that don't use visual output
at all, and thus have no concept of "colour". If you want to give Unix-
specific advice, there's always comp.unix.programmer.
--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"This isn't right. This isn't even wrong."
- Wolfgang Pauli This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steven T. Hatton |
last post by:
This is something I've been looking at because it is central to a currently
broken part of the KDevelop new application wizard. I'm not complaining
about it being broken, It's a CVS images. ...
|
by: Peter Scott |
last post by:
I created a table that has a column in that needs to contain a full
Unix file path. Since 2048 was too long for a VARCHAR, I made it
TEXT. I since populated the table. Now I want to make the...
|
by: Blankdraw |
last post by:
The following 2 code segs seem to be the cause of my output infinite
loop.
Can someone tell me if this is wrong? I'd like to post the entire
program, but that seems to distract everyone who migh...
|
by: Lance Geeck |
last post by:
I have a simple form where I am using a dataset called Client. On the data
entry screen, there are name, address, city state and zip.
I have the fields bound to the dataset field. (Properties...
|
by: ahmad |
last post by:
I want to make a particular option's text bold within a list in html,
while all other options will get their normal font-weight, How can i do
this????????
i tried <b>, <font> tags and style and...
|
by: Ian Boyd |
last post by:
Every time during development we had to make table changes, we use Control
Center. Most of the time, Control Center fails. If you try to "undo all", it
doesn't, and you end up losing your identity...
|
by: xahlee |
last post by:
Elisp Tutorial: Make Google Earth
Xah Lee, 2006-12
This page shows a example of writing a emacs lisp function that creates
a Google Earth file, and creates a link to the file, as well a link...
|
by: portCo |
last post by:
Hello there,
I am creating a vb application which is some like like a questionare.
Application read a text file which contains many questions and display
one question and the input is needed...
|
by: GloStix |
last post by:
Okay, when I click the link it dissapears and makes a white space underneath it but the space is clickable. so when you click the space, the link actually works
Used Firefox 3.0 RC2 for this.
OS X...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |