the endless quest to plug memory leaks -- episode 379
[ardour.git] / libs / pbd / shortpath.cc
index 59af8e4dcbd7d35243443c2fb2915790f405318a..3d33611b87caccb090ff88c29a34a0b38cefd80a 100644 (file)
@@ -1,4 +1,24 @@
-#include <pbd/shortpath.h>
+/*
+    Copyright (C) 2000-2007 Paul Davis
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <stdint.h>
+#include "pbd/shortpath.h"
 
 using namespace Glib;
 using namespace std;
@@ -37,7 +57,7 @@ short_path (const Glib::ustring& path, ustring::size_type target_characters)
                        return path;
                }
        }
-       
+
        uint32_t so_far = (len - last_sep);
        uint32_t space_for = target_characters - so_far;
 
@@ -51,6 +71,6 @@ short_path (const Glib::ustring& path, ustring::size_type target_characters)
                res += path.substr (last_sep - space_for, len - last_sep + space_for - 3);
                res += "...";
                return res;
-               
+
        }
 }