]> git.cameronkatri.com Git - mandoc.git/blobdiff - soelim.c
Clarify that .Ta as a line macro is a portability problem,
[mandoc.git] / soelim.c
index de6911f3c83c8840fd23359acc3cb64417fa3fe7..3ef30820e318a9a5fbabe6a0a6b43943c7441df6 100644 (file)
--- a/soelim.c
+++ b/soelim.c
@@ -1,4 +1,5 @@
-/*-
+/*     $Id: soelim.c,v 1.5 2015/11/07 14:22:29 schwarze Exp $  */
+/*
  * Copyright (c) 2014 Baptiste Daroussin <bapt@FreeBSD.org>
  * All rights reserved.
  *
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+#include "config.h"
 
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+#include <sys/types.h>
 
-#include <sys/param.h>
-
-#define _WITH_GETLINE
+#include <ctype.h>
+#if HAVE_ERR
+#include <err.h>
+#endif
+#include <limits.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <stdlib.h>
-#include <stdbool.h>
 #include <string.h>
+#if HAVE_STRINGLIST
 #include <stringlist.h>
-#include <err.h>
-#include <ctype.h>
+#else
+#include "compat_stringlist.h"
+#endif
+#include <unistd.h>
 
 #define C_OPTION 0x1
 
@@ -56,7 +60,7 @@ static FILE *
 soelim_fopen(const char *name)
 {
        FILE *f;
-       char path[MAXPATHLEN];
+       char path[PATH_MAX];
        size_t i;
 
        if (strcmp(name, "-") == 0)