Deleted Added
full compact
match.c (178753) match.c (206043)
1/*
2 * FreeBSD install - a package for the installation and maintainance
3 * of non-core utilities.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

14 * Maxim Sobolev
15 * 24 February 2001
16 *
17 * Routines used to query installed packages.
18 *
19 */
20
21#include <sys/cdefs.h>
1/*
2 * FreeBSD install - a package for the installation and maintainance
3 * of non-core utilities.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

14 * Maxim Sobolev
15 * 24 February 2001
16 *
17 * Routines used to query installed packages.
18 *
19 */
20
21#include <sys/cdefs.h>
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/lib/match.c 178753 2008-05-03 22:56:50Z pav $");
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/lib/match.c 206043 2010-04-01 14:27:29Z flz $");
23
24#include "lib.h"
25#include <err.h>
26#include <fnmatch.h>
27#include <fts.h>
28#include <regex.h>
29
30/*

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

262
263 snprintf(tmp, PATH_MAX, "%s/%s", LOG_DIR, installed[i]);
264 /*
265 * SPECIAL CASE: ignore empty dirs, since we can can see them
266 * during port installation.
267 */
268 if (isemptydir(tmp))
269 continue;
23
24#include "lib.h"
25#include <err.h>
26#include <fnmatch.h>
27#include <fts.h>
28#include <regex.h>
29
30/*

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

262
263 snprintf(tmp, PATH_MAX, "%s/%s", LOG_DIR, installed[i]);
264 /*
265 * SPECIAL CASE: ignore empty dirs, since we can can see them
266 * during port installation.
267 */
268 if (isemptydir(tmp))
269 continue;
270 snprintf(tmp, PATH_MAX, "%s/%s", tmp, CONTENTS_FNAME);
270 strncat(tmp, "/" CONTENTS_FNAME, PATH_MAX);
271 fp = fopen(tmp, "r");
272 if (fp == NULL) {
273 warnx("the package info for package '%s' is corrupt", installed[i]);
274 continue;
275 }
276
277 cmd = -1;
278 while (fgets(tmp, sizeof(tmp), fp)) {

--- 325 unchanged lines hidden ---
271 fp = fopen(tmp, "r");
272 if (fp == NULL) {
273 warnx("the package info for package '%s' is corrupt", installed[i]);
274 continue;
275 }
276
277 cmd = -1;
278 while (fgets(tmp, sizeof(tmp), fp)) {

--- 325 unchanged lines hidden ---