| @@ -1,23 +1,23 @@ | | | @@ -1,23 +1,23 @@ |
1 | /* $NetBSD: plist.c,v 1.25 2009/04/23 19:35:52 joerg Exp $ */ | | 1 | /* $NetBSD: plist.c,v 1.26 2009/04/23 19:38:14 joerg Exp $ */ |
2 | | | 2 | |
3 | #if HAVE_CONFIG_H | | 3 | #if HAVE_CONFIG_H |
4 | #include "config.h" | | 4 | #include "config.h" |
5 | #endif | | 5 | #endif |
6 | #include <nbcompat.h> | | 6 | #include <nbcompat.h> |
7 | #if HAVE_SYS_CDEFS_H | | 7 | #if HAVE_SYS_CDEFS_H |
8 | #include <sys/cdefs.h> | | 8 | #include <sys/cdefs.h> |
9 | #endif | | 9 | #endif |
10 | __RCSID("$NetBSD: plist.c,v 1.25 2009/04/23 19:35:52 joerg Exp $"); | | 10 | __RCSID("$NetBSD: plist.c,v 1.26 2009/04/23 19:38:14 joerg Exp $"); |
11 | | | 11 | |
12 | /* | | 12 | /* |
13 | * FreeBSD install - a package for the installation and maintainance | | 13 | * FreeBSD install - a package for the installation and maintainance |
14 | * of non-core utilities. | | 14 | * of non-core utilities. |
15 | * | | 15 | * |
16 | * Redistribution and use in source and binary forms, with or without | | 16 | * Redistribution and use in source and binary forms, with or without |
17 | * modification, are permitted provided that the following conditions | | 17 | * modification, are permitted provided that the following conditions |
18 | * are met: | | 18 | * are met: |
19 | * 1. Redistributions of source code must retain the above copyright | | 19 | * 1. Redistributions of source code must retain the above copyright |
20 | * notice, this list of conditions and the following disclaimer. | | 20 | * notice, this list of conditions and the following disclaimer. |
21 | * 2. Redistributions in binary form must reproduce the above copyright | | 21 | * 2. Redistributions in binary form must reproduce the above copyright |
22 | * notice, this list of conditions and the following disclaimer in the | | 22 | * notice, this list of conditions and the following disclaimer in the |
23 | * documentation and/or other materials provided with the distribution. | | 23 | * documentation and/or other materials provided with the distribution. |
| @@ -73,27 +73,26 @@ __RCSID("$NetBSD: plist.c,v 1.25 2009/04 | | | @@ -73,27 +73,26 @@ __RCSID("$NetBSD: plist.c,v 1.25 2009/04 |
73 | | | 73 | |
74 | /* This struct defines a plist command type */ | | 74 | /* This struct defines a plist command type */ |
75 | typedef struct cmd_t { | | 75 | typedef struct cmd_t { |
76 | const char *c_s; /* string to recognise */ | | 76 | const char *c_s; /* string to recognise */ |
77 | pl_ent_t c_type; /* type of command */ | | 77 | pl_ent_t c_type; /* type of command */ |
78 | int c_argc; /* # of arguments */ | | 78 | int c_argc; /* # of arguments */ |
79 | int c_subst; /* can substitute real prefix */ | | 79 | int c_subst; /* can substitute real prefix */ |
80 | } cmd_t; | | 80 | } cmd_t; |
81 | | | 81 | |
82 | /* Commands to recognise */ | | 82 | /* Commands to recognise */ |
83 | static const cmd_t cmdv[] = { | | 83 | static const cmd_t cmdv[] = { |
84 | {"cwd", PLIST_CWD, 1, 1}, | | 84 | {"cwd", PLIST_CWD, 1, 1}, |
85 | {"src", PLIST_SRC, 1, 1}, | | 85 | {"src", PLIST_SRC, 1, 1}, |
86 | {"cd", PLIST_CWD, 1, 1}, | | | |
87 | {"exec", PLIST_CMD, 1, 0}, | | 86 | {"exec", PLIST_CMD, 1, 0}, |
88 | {"unexec", PLIST_UNEXEC, 1, 0}, | | 87 | {"unexec", PLIST_UNEXEC, 1, 0}, |
89 | {"mode", PLIST_CHMOD, 1, 0}, | | 88 | {"mode", PLIST_CHMOD, 1, 0}, |
90 | {"owner", PLIST_CHOWN, 1, 0}, | | 89 | {"owner", PLIST_CHOWN, 1, 0}, |
91 | {"group", PLIST_CHGRP, 1, 0}, | | 90 | {"group", PLIST_CHGRP, 1, 0}, |
92 | {"comment", PLIST_COMMENT, 1, 0}, | | 91 | {"comment", PLIST_COMMENT, 1, 0}, |
93 | {"ignore", PLIST_IGNORE, 0, 0}, | | 92 | {"ignore", PLIST_IGNORE, 0, 0}, |
94 | {"name", PLIST_NAME, 1, 0}, | | 93 | {"name", PLIST_NAME, 1, 0}, |
95 | {"display", PLIST_DISPLAY, 1, 0}, | | 94 | {"display", PLIST_DISPLAY, 1, 0}, |
96 | {"pkgdep", PLIST_PKGDEP, 1, 0}, | | 95 | {"pkgdep", PLIST_PKGDEP, 1, 0}, |
97 | {"pkgcfl", PLIST_PKGCFL, 1, 0}, | | 96 | {"pkgcfl", PLIST_PKGCFL, 1, 0}, |
98 | {"dirrm", PLIST_DIR_RM, 1, 0}, | | 97 | {"dirrm", PLIST_DIR_RM, 1, 0}, |
99 | {"option", PLIST_OPTION, 1, 0}, | | 98 | {"option", PLIST_OPTION, 1, 0}, |