fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

filename_ext.cxx
Go to the documentation of this file.
1 //
2 // "$Id$"
3 //
4 // Filename extension routines for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2010 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18 
19 // returns pointer to the last '.' or to the null if none:
20 
21 #include <FL/filename.H>
22 
34 const char *fl_filename_ext(const char *buf) {
35  const char *q = 0;
36  const char *p = buf;
37  for (p=buf; *p; p++) {
38  if (*p == '/') q = 0;
39 #if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
40  else if (*p == '\\') q = 0;
41 #endif
42  else if (*p == '.') q = p;
43  }
44  return q ? q : p;
45 }
46 
47 //
48 // End of "$Id$".
49 //
buf
static char * buf
Definition: fl_encoding_mac_roman.cxx:76
filename.H
p
static menustate * p
Definition: Fl_Menu.cxx:606
fl_filename_ext
const char * fl_filename_ext(const char *buf)
Definition: filename_ext.cxx:34