title: How to get only file name in preprocessor?
body: <p>I am (was) using the <code>__FILE__</code> and <code>__LINE__</code> macros for printing diagnostic messages out of my code. This works quite well when you use GCC with make, the file is as short as you specified it on the command line. I recently switched to using CodeLite which uses fully qualified file names (at least under windows) when building. Suddenly my diagnostic output is almost not readable.</p>
  
  <p>It there a way to get only the file component of the filename in the preprocessor? I can live with a non portable GCC specific solution. (I will fallback to plain <code>__FILE__</code> other cases.) </p>
  
  <p>Sure I can pass the contents of <code>__FILE__</code> through a function and extract only the file component, but string operations was not what I had in mind for diagnostic messages that should not change runtime behavior...</p>
  
  <p><strong>NOTE:</strong> I use the filename the way GNU uses it. A Path is collection of filenames and a filename is either a relative or absolute identifier of a file. A filename can be made up of a directory component and file component.</p>