]> git.lyx.org Git - lyx.git/blobdiff - src/support/getcwd.C
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / support / getcwd.C
index 15c12a1acdc31b1922582ec5a3de6fb1aa7301c3..2070c17354bc2bdfb9dd6265e035a20626e08195 100644 (file)
@@ -1,3 +1,13 @@
+/**
+ * \file getcwd.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
+ */
+
 #include <config.h>
 
 #include <cerrno>
@@ -21,19 +31,19 @@ char * l_getcwd(char * buffer, size_t size)
 
 
 // Returns current working directory
-string const lyx::getcwd()
+string const lyx::support::getcwd()
 {
-       int n = 256;    // Assume path is less than 256 chars
+       int n = 256;    // Assume path is less than 256 chars
        char * err;
-       char * tbuf = new char[n];
-       
-       // Safe. Hopefully all getcwds behave this way!
-       while (((err = l_getcwd(tbuf, n)) == 0) && (errno == ERANGE)) {
+       char * tbuf = new char[n];
+
+       // Safe. Hopefully all getcwds behave this way!
+       while (((err = l_getcwd(tbuf, n)) == 0) && (errno == ERANGE)) {
                // Buffer too small, double the buffersize and try again
-               delete[] tbuf;
-               n = 2 * n;
-               tbuf = new char[n];
-       }
+               delete[] tbuf;
+               n = 2 * n;
+               tbuf = new char[n];
+       }
 
        string result;
        if (err) result = tbuf;