"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "read.c" between
mdocml-1.14.1rc1.tar.gz and mdocml-1.14.1rc2.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.14.1rc1):read.c  (mdocml-1.14.1rc2)
/* $Id: read.c,v 1.160 2017/02/03 18:18:23 schwarze Exp $ */ /* $Id: read.c,v 1.161 2017/02/18 17:29:28 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-2017 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2010-2017 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 33 skipping to change at line 33
#include <sys/stat.h> #include <sys/stat.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#if HAVE_ERR #if HAVE_ERR
#include <err.h> #include <err.h>
#endif #endif
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <zlib.h> #include <zlib.h>
#include "mandoc_aux.h" #include "mandoc_aux.h"
#include "mandoc.h" #include "mandoc.h"
#include "roff.h" #include "roff.h"
#include "mdoc.h" #include "mdoc.h"
skipping to change at line 605 skipping to change at line 604
pos = 0; pos = 0;
} }
free(ln.buf); free(ln.buf);
} }
static int static int
read_whole_file(struct mparse *curp, const char *file, int fd, read_whole_file(struct mparse *curp, const char *file, int fd,
struct buf *fb, int *with_mmap) struct buf *fb, int *with_mmap)
{ {
struct stat st;
gzFile gz; gzFile gz;
size_t off; size_t off;
ssize_t ssz; ssize_t ssz;
struct stat st;
if (fstat(fd, &st) == -1) if (fstat(fd, &st) == -1)
err((int)MANDOCLEVEL_SYSERR, "%s", file); err((int)MANDOCLEVEL_SYSERR, "%s", file);
/* /*
* If we're a regular file, try just reading in the whole entry * If we're a regular file, try just reading in the whole entry
* via mmap(). This is faster than reading it into blocks, and * via mmap(). This is faster than reading it into blocks, and
* since each file is only a few bytes to begin with, I'm not * since each file is only a few bytes to begin with, I'm not
* concerned that this is going to tank any machines. * concerned that this is going to tank any machines.
*/ */
 End of changes. 4 change blocks. 
4 lines changed or deleted 2 lines changed or added

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