Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.sbin / ctm / ctm / ctm_syntax.c
1 /*
2  * ----------------------------------------------------------------------------
3  * "THE BEER-WARE LICENSE" (Revision 42):
4  * <phk@login.dknet.dk> wrote this file.  As long as you retain this notice you
5  * can do whatever you want with this stuff. If we meet some day, and you think
6  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
7  * ----------------------------------------------------------------------------
8  *
9  * $FreeBSD: src/usr.sbin/ctm/ctm/ctm_syntax.c,v 1.10 1999/08/28 01:16:00 peter Exp $
10  * $DragonFly: src/usr.sbin/ctm/ctm/Attic/ctm_syntax.c,v 1.2 2003/06/17 04:29:53 dillon Exp $
11  *
12  */
13
14 #include "ctm.h"
15
16 /* The fields... */
17 #define Name    CTM_F_Name
18 #define Uid     CTM_F_Uid
19 #define Gid     CTM_F_Gid
20 #define Mode    CTM_F_Mode
21 #define MD5     CTM_F_MD5
22 #define Count   CTM_F_Count
23 #define Bytes   CTM_F_Bytes
24
25 /* The qualifiers... */
26 #define File    CTM_Q_Name_File
27 #define Dir     CTM_Q_Name_Dir
28 #define New     CTM_Q_Name_New
29 #define Subst   CTM_Q_Name_Subst
30 #define After   CTM_Q_MD5_After
31 #define Before  CTM_Q_MD5_Before
32 #define Chunk   CTM_Q_MD5_Chunk
33 #define Force   CTM_Q_MD5_Force
34
35 static int ctmFM[] = /* File Make */
36     { Name|File|New|Subst, Uid, Gid, Mode,
37         MD5|After|Chunk, Count, Bytes,0 };
38
39 static int ctmFS[] = /* File Substitute */
40     { Name|File|Subst, Uid, Gid, Mode,
41         MD5|Before|Force, MD5|After|Chunk, Count, Bytes,0 };
42
43 static int ctmFE[] = /* File Edit */
44     { Name|File|Subst, Uid, Gid, Mode,
45         MD5|Before, MD5|After, Count, Bytes,0 };
46
47 static int ctmFR[] = /* File Remove */
48     { Name|File|Subst, MD5|Before, 0 };
49
50 static int ctmAS[] = /* Attribute Substitute */
51     { Name|Subst, Uid, Gid, Mode, 0 };
52
53 static int ctmDM[] = /* Directory Make */
54     { Name|Dir|New , Uid, Gid, Mode, 0 };
55
56 static int ctmDR[] = /* Directory Remove */
57     { Name|Dir, 0 };
58
59 struct CTM_Syntax Syntax[] = {
60     { "FM",     ctmFM },
61     { "FS",     ctmFS },
62     { "FE",     ctmFE },
63     { "FN",     ctmFE },
64     { "FR",     ctmFR },
65     { "AS",     ctmAS },
66     { "DM",     ctmDM },
67     { "DR",     ctmDR },
68     { 0,        0} };