plist.c (96076) | plist.c (96388) |
---|---|
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 * Jordan K. Hubbard 15 * 18 July 1993 16 * 17 * General packing list routines. 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 * Jordan K. Hubbard 15 * 18 July 1993 16 * 17 * General packing list routines. 18 * 19 */ 20 21#include <sys/cdefs.h> |
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/lib/plist.c 96076 2002-05-05 21:03:25Z sobomax $"); | 22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/lib/plist.c 96388 2002-05-11 03:48:49Z alfred $"); |
23 24#include "lib.h" 25#include <err.h> 26#include <md5.h> 27 28/* Add an item to a packing list */ 29void 30add_plist(Package *p, plist_t type, const char *arg) --- 239 unchanged lines hidden (view full) --- 270 cp = pline; 271 if (pline[0] != CMD_CHAR) { 272 cmd = PLIST_FILE; 273 goto bottom; 274 } 275 cmd = plist_cmd(pline + 1, &cp); 276 if (cmd == FAIL) { 277 cleanup(0); | 23 24#include "lib.h" 25#include <err.h> 26#include <md5.h> 27 28/* Add an item to a packing list */ 29void 30add_plist(Package *p, plist_t type, const char *arg) --- 239 unchanged lines hidden (view full) --- 270 cp = pline; 271 if (pline[0] != CMD_CHAR) { 272 cmd = PLIST_FILE; 273 goto bottom; 274 } 275 cmd = plist_cmd(pline + 1, &cp); 276 if (cmd == FAIL) { 277 cleanup(0); |
278 errx(2, __FUNCTION__ ": bad command '%s'", pline); | 278 errx(2, "%s: bad command '%s'", __FUNCTION__, pline); |
279 } 280 if (*cp == '\0') { 281 cp = NULL; 282 goto bottom; 283 } 284 if (cmd == PLIST_COMMENT && sscanf(cp, "PKG_FORMAT_REVISION:%d.%d\n", 285 &major, &minor) == 2) { 286 pkg->fmtver_maj = major; --- 92 unchanged lines hidden (view full) --- 379 break; 380 381 case PLIST_DEPORIGIN: 382 fprintf(fp, "%ccomment DEPORIGIN:%s\n", CMD_CHAR, plist->name); 383 break; 384 385 default: 386 cleanup(0); | 279 } 280 if (*cp == '\0') { 281 cp = NULL; 282 goto bottom; 283 } 284 if (cmd == PLIST_COMMENT && sscanf(cp, "PKG_FORMAT_REVISION:%d.%d\n", 285 &major, &minor) == 2) { 286 pkg->fmtver_maj = major; --- 92 unchanged lines hidden (view full) --- 379 break; 380 381 case PLIST_DEPORIGIN: 382 fprintf(fp, "%ccomment DEPORIGIN:%s\n", CMD_CHAR, plist->name); 383 break; 384 385 default: 386 cleanup(0); |
387 errx(2, __FUNCTION__ ": unknown command type %d (%s)", plist->type, plist->name); | 387 errx(2, "%s: unknown command type %d (%s)", __FUNCTION__, 388 plist->type, plist->name); |
388 break; 389 } 390 plist = plist->next; 391 } 392} 393 394/* 395 * Delete the results of a package installation. --- 175 unchanged lines hidden --- | 389 break; 390 } 391 plist = plist->next; 392 } 393} 394 395/* 396 * Delete the results of a package installation. --- 175 unchanged lines hidden --- |