1*2286d8edStholo /* This program is free software; you can redistribute it and/or modify 2*2286d8edStholo it under the terms of the GNU General Public License as published by 3*2286d8edStholo the Free Software Foundation; either version 2, or (at your option) 4*2286d8edStholo any later version. 5*2286d8edStholo 6*2286d8edStholo This program is distributed in the hope that it will be useful, 7*2286d8edStholo but WITHOUT ANY WARRANTY; without even the implied warranty of 8*2286d8edStholo MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9*2286d8edStholo GNU General Public License for more details. */ 10*2286d8edStholo 1150bf276cStholo #include <unixlib.h> 1250bf276cStholo 13*2286d8edStholo #include "cvs.h" 14*2286d8edStholo 15*2286d8edStholo /* Return the current directory, newly allocated, arbitrarily long. 16*2286d8edStholo Return NULL and set errno on error. */ 17*2286d8edStholo char * xgetwd()18*2286d8edStholoxgetwd () 1950bf276cStholo { 20*2286d8edStholo char pathname[256]; 21*2286d8edStholo 22*2286d8edStholo return xstrdup (getcwd (pathname, sizeof (pathname) - 2, 0)); 2350bf276cStholo } 24