"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "read.c" between
mdocml-1.13.4rc1.tar.gz and mdocml-1.13.4rc2.tar.gz

About: mdocml is a suite of tools compiling "-mdoc", the roff macro package of choice for BSD manual pages, and "-man", the predominant historical package for UNIX manuals. Hint: The installed binary name is "mandoc". Release candidate.

read.c  (mdocml-1.13.4rc1):read.c  (mdocml-1.13.4rc2)
/* $Id: read.c,v 1.148 2016/01/08 02:53:13 schwarze Exp $ */ /* $Id: read.c,v 1.149 2016/07/10 13:34:30 schwarze Exp $ */
/* /*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2016 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2010-2016 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2010, 2012 Joerg Sonnenberger <joerg@netbsd.org> * Copyright (c) 2010, 2012 Joerg Sonnenberger <joerg@netbsd.org>
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies. * copyright notice and this permission notice appear in all copies.
* *
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
skipping to change at line 800 skipping to change at line 800
if ((fd = open(file, O_RDONLY)) != -1) if ((fd = open(file, O_RDONLY)) != -1)
return fd; return fd;
/* /*
* If that doesn't work and the filename doesn't * If that doesn't work and the filename doesn't
* already end in .gz, try appending .gz. * already end in .gz, try appending .gz.
*/ */
if ( ! curp->gzip) { if ( ! curp->gzip) {
mandoc_asprintf(&cp, "%s.gz", file); mandoc_asprintf(&cp, "%s.gz", file);
fd = open(file, O_RDONLY); fd = open(cp, O_RDONLY);
free(cp); free(cp);
if (fd != -1) { if (fd != -1) {
curp->gzip = 1; curp->gzip = 1;
return fd; return fd;
} }
} }
/* Neither worked, give up. */ /* Neither worked, give up. */
mandoc_msg(MANDOCERR_FILE, curp, 0, 0, strerror(errno)); mandoc_msg(MANDOCERR_FILE, curp, 0, 0, strerror(errno));
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS