dirname-lgpl.c revision 2
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson/* dirname.c -- return all but the last element in a file name
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2010 Free Software
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson Foundation, Inc.
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson This program is free software: you can redistribute it and/or modify
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson it under the terms of the GNU General Public License as published by
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson the Free Software Foundation; either version 3 of the License, or
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson (at your option) any later version.
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson This program is distributed in the hope that it will be useful,
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson but WITHOUT ANY WARRANTY; without even the implied warranty of
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson GNU General Public License for more details.
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson You should have received a copy of the GNU General Public License
93af10a45ed32fdf5e0c69baf45e7a7fcebb2cb6Mark J. Nelson along with this program. If not, see <http://www.gnu.org/licenses/>. */
return length;
if (!dir)
return NULL;
if (append_dot)
return dir;