1 /*****************************************************************************/
2 /*                                                                           */
3 /*                 (C) Copyright 1992-1997  Alberto Pasquale                 */
4 /*                                                                           */
5 /*                   A L L   R I G H T S   R E S E R V E D                   */
6 /*                                                                           */
7 /*****************************************************************************/
8 /*                                                                           */
9 /* This source code is NOT in the public domain and it CANNOT be used or     */
10 /* distributed without written permission from the author.                   */
11 /*                                                                           */
12 /*****************************************************************************/
13 /*                                                                           */
14 /* How to contact the author:  Alberto Pasquale of 2:332/504@fidonet         */
15 /*                             Viale Verdi 106                               */
16 /*                             41100 Modena                                  */
17 /*                             Italy                                         */
18 /*                                                                           */
19 /*****************************************************************************/
20 
21 // ParseCia.Cpp
22 
23 #ifdef __OS2__
24     #define INCL_DOS
25     #include <os2.h>
26 #endif
27 
28 #include <string.h>
29 
30 #ifdef __QNXNTO__
31    #include <strings.h>
32 #endif // __QNXNTO__
33 
34 #include "parsetyp.hpp"
35 #include "parsecia.hpp"
36 #include "misc.hpp"
37 
38 
ParseCia(CfgFile & f1,InpAll * cia)39 BOOL ParseCia (CfgFile &f1, InpAll *cia)
40 {
41     pcsz tok = f1.ReGetToken ();
42     pcsz tkp = f1.RestOfLine ();
43 
44     if (stricmp (tok, "NeededBeforeKill") == 0) {
45         cia->NeededBeforeKill = TRUE;
46         return TRUE;
47     }
48 
49     if (stricmp (tok, "BeforeArcList") == 0) {
50         if (*tkp == '\0')
51             CfgError (f1);
52         cia->BeforeArcList = getallocline (tkp);
53         return TRUE;
54     }
55 
56     if (stricmp (tok, "AfterArcList") == 0) {
57         if (*tkp == '\0')
58             CfgError (f1);
59         cia->AfterArcList = getallocline (tkp);
60         return TRUE;
61     }
62 
63     if (stricmp (tok, "BeforeUnArcList") == 0) {
64         if (*tkp == '\0')
65             CfgError (f1);
66         cia->BeforeUnArcList = getallocline (tkp);
67         return TRUE;
68     }
69 
70     if (stricmp (tok, "AfterUnArcList") == 0) {
71         if (*tkp == '\0')
72             CfgError (f1);
73         cia->AfterUnArcList = getallocline (tkp);
74         return TRUE;
75     }
76 
77     if (stricmp (tok, "BeforeArcDiff") == 0) {
78         if (*tkp == '\0')
79             CfgError (f1);
80         cia->BeforeArcDiff = getallocline (tkp);
81         return TRUE;
82     }
83 
84     if (stricmp (tok, "AfterArcDiff") == 0) {
85         if (*tkp == '\0')
86             CfgError (f1);
87         cia->AfterArcDiff = getallocline (tkp);
88         return TRUE;
89     }
90 
91     if (stricmp (tok, "BeforeUnArcDiff") == 0) {
92         if (*tkp == '\0')
93             CfgError (f1);
94         cia->BeforeUnArcDiff = getallocline (tkp);
95         return TRUE;
96     }
97 
98     if (stricmp (tok, "AfterUnArcDiff") == 0) {
99         if (*tkp == '\0')
100             CfgError (f1);
101         cia->AfterUnArcDiff = getallocline (tkp);
102         return TRUE;
103     }
104 
105     if (stricmp (tok, "BeforeEdit") == 0) {
106         if (*tkp == '\0')
107             CfgError (f1);
108         cia->BeforeEdit = getallocline (tkp);
109         return TRUE;
110     }
111 
112     if (stricmp (tok, "AfterEdit") == 0) {
113         if (*tkp == '\0')
114             CfgError (f1);
115         cia->AfterEdit = getallocline (tkp);
116         return TRUE;
117     }
118 
119     if (stricmp (tok, "ArcMethod") == 0) {
120         if (!GetArcMethods (tkp, &cia->ArcMethHead))
121             CfgError (f1);
122         return TRUE;
123     }
124 
125     if (stricmp (tok, "ArcDiffMethod") == 0) {
126         if (!GetArcMethods (tkp, &cia->ArcDiffMethHead))
127             CfgError (f1);
128         return TRUE;
129     }
130 
131     return FALSE;
132 }
133 
134