title: Making some text in printf appear in green and red
body: <p>linux gcc 4.4.1</p>
  
  <p>I have the following fprintf statement and I would like to have the OK as green and the FAILED as red. Is this possible?</p>
  
  <pre><code>if(devh == -1)
  {
      fprintf(stderr, "Device [ FAILED ]\n");
  }
  else
  {
      fprintf(stderr, "Device [ OK ]\n");
  }
  </code></pre>
  
  <p>Many thanks for any suggestions,</p>