"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "main.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.

main.c  (mdocml-1.13.4rc1):main.c  (mdocml-1.13.4rc2)
/* $Id: main.c,v 1.267 2016/07/08 22:29:05 schwarze Exp $ */ /* $Id: main.c,v 1.269 2016/07/12 05:18:38 kristaps Exp $ */
/* /*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2016 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2010-2012, 2014-2016 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org> * Copyright (c) 2010 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/wait.h> #include <sys/wait.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 <glob.h> #include <glob.h>
#if HAVE_SANDBOX_INIT
#include <sandbox.h>
#endif
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include "mandoc_aux.h" #include "mandoc_aux.h"
#include "mandoc.h" #include "mandoc.h"
skipping to change at line 161 skipping to change at line 164
if (strncmp(progname, "mandocdb", 8) == 0 || if (strncmp(progname, "mandocdb", 8) == 0 ||
strcmp(progname, BINM_MAKEWHATIS) == 0) strcmp(progname, BINM_MAKEWHATIS) == 0)
return mandocdb(argc, argv); return mandocdb(argc, argv);
#endif #endif
#if HAVE_PLEDGE #if HAVE_PLEDGE
if (pledge("stdio rpath tmppath tty proc exec flock", NULL) == -1) if (pledge("stdio rpath tmppath tty proc exec flock", NULL) == -1)
err((int)MANDOCLEVEL_SYSERR, "pledge"); err((int)MANDOCLEVEL_SYSERR, "pledge");
#endif #endif
#if HAVE_SANDBOX_INIT
if (sandbox_init(kSBXProfileNoInternet, SANDBOX_NAMED, NULL) == -1)
errx((int)MANDOCLEVEL_SYSERR, "sandbox_init");
#endif
/* Search options. */ /* Search options. */
memset(&conf, 0, sizeof(conf)); memset(&conf, 0, sizeof(conf));
conf_file = defpaths = NULL; conf_file = defpaths = NULL;
auxpaths = NULL; auxpaths = NULL;
memset(&search, 0, sizeof(struct mansearch)); memset(&search, 0, sizeof(struct mansearch));
search.outkey = "Nd"; search.outkey = "Nd";
if (strcmp(progname, BINM_MAN) == 0) if (strcmp(progname, BINM_MAN) == 0)
skipping to change at line 1057 skipping to change at line 1065
cp = strchr(cp, ' '); cp = strchr(cp, ' ');
if (cp == NULL) if (cp == NULL)
break; break;
*cp++ = '\0'; *cp++ = '\0';
while (*cp == ' ') while (*cp == ' ')
cp++; cp++;
if (*cp == '\0') if (*cp == '\0')
break; break;
} }
/* For more(1) and less(1), use the tag file. */ /* For less(1), use the tag file. */
if ((cmdlen = strlen(argv[0])) >= 4) { if ((cmdlen = strlen(argv[0])) >= 4) {
cp = argv[0] + cmdlen - 4; cp = argv[0] + cmdlen - 4;
if (strcmp(cp, "less") == 0 || strcmp(cp, "more") == 0) { if (strcmp(cp, "less") == 0) {
argv[argc++] = mandoc_strdup("-T"); argv[argc++] = mandoc_strdup("-T");
argv[argc++] = tag_files->tfn; argv[argc++] = tag_files->tfn;
} }
} }
argv[argc++] = tag_files->ofn; argv[argc++] = tag_files->ofn;
argv[argc] = NULL; argv[argc] = NULL;
switch (pager_pid = fork()) { switch (pager_pid = fork()) {
case -1: case -1:
err((int)MANDOCLEVEL_SYSERR, "fork"); err((int)MANDOCLEVEL_SYSERR, "fork");
 End of changes. 5 change blocks. 
3 lines changed or deleted 11 lines changed or added

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