Deleted Added
full compact
mdoc_validate.c (241754) mdoc_validate.c (241774)
1/* $Id: mdoc_validate.c,v 1.182 2012/03/23 05:50:25 kristaps Exp $ */
2/*
3 * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4 * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.

--- 2220 unchanged lines hidden (view full) ---

2229 if (strlcat(buf, utsname.sysname, BUFSIZ) >= BUFSIZ) {
2230 mdoc_nmsg(mdoc, n, MANDOCERR_MEM);
2231 return(0);
2232 }
2233 if (strlcat(buf, " ", BUFSIZ) >= BUFSIZ) {
2234 mdoc_nmsg(mdoc, n, MANDOCERR_MEM);
2235 return(0);
2236 }
1/* $Id: mdoc_validate.c,v 1.182 2012/03/23 05:50:25 kristaps Exp $ */
2/*
3 * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4 * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.

--- 2220 unchanged lines hidden (view full) ---

2229 if (strlcat(buf, utsname.sysname, BUFSIZ) >= BUFSIZ) {
2230 mdoc_nmsg(mdoc, n, MANDOCERR_MEM);
2231 return(0);
2232 }
2233 if (strlcat(buf, " ", BUFSIZ) >= BUFSIZ) {
2234 mdoc_nmsg(mdoc, n, MANDOCERR_MEM);
2235 return(0);
2236 }
2237 if (strncmp(utsname.sysname, "FreeBSD", sizeof("FreeBSD")) == 0)
2238 strtok(utsname.release, "-");
2237 if (strlcat(buf, utsname.release, BUFSIZ) >= BUFSIZ) {
2238 mdoc_nmsg(mdoc, n, MANDOCERR_MEM);
2239 return(0);
2240 }
2241#endif /*!OSNAME*/
2242 }
2243
2244 mdoc->meta.os = mandoc_strdup(buf);

--- 159 unchanged lines hidden ---
2239 if (strlcat(buf, utsname.release, BUFSIZ) >= BUFSIZ) {
2240 mdoc_nmsg(mdoc, n, MANDOCERR_MEM);
2241 return(0);
2242 }
2243#endif /*!OSNAME*/
2244 }
2245
2246 mdoc->meta.os = mandoc_strdup(buf);

--- 159 unchanged lines hidden ---