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 // ParseCin.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 "misc.hpp"
35 #include "parsecin.hpp"
36 #include "apgenlib.hpp"
37
38
ParseCin(CfgFile & f1,InpNnc * cin)39 BOOL ParseCin (CfgFile &f1, InpNnc *cin)
40 {
41 pcsz tok = f1.ReGetToken ();
42 pcsz tkp = f1.RestOfLine ();
43
44 if (stricmp (tok, "MsgRem") == 0) {
45 cin->MsgRem = GetAllocLn (tkp, GL_Empty);
46 return TRUE;
47 }
48
49 if (stricmp (tok, "MsgLog") == 0) {
50 while ((tok = GetToken (&tkp)) != NULL) {
51 if (stricmp (tok, "NullPhone") == 0)
52 cin->MsgLog |= MsgLogNullPhone;
53 else if (stricmp (tok, "Redirected") == 0)
54 cin->MsgLog |= MsgLogRedirected;
55 else if (stricmp (tok, "Points") == 0)
56 cin->MsgLog |= MsgLogPoints;
57 else CfgError (f1);
58 }
59 return TRUE;
60 }
61
62 if (stricmp (tok, "GermanPointList") == 0) {
63 cin->flags |= GermanPointLst;
64 return TRUE;
65 }
66
67 if (stricmp (tok, "NoPointLstPhone") == 0) {
68 cin->flags |= NoPointLstPhone;
69 return TRUE;
70 }
71
72 if (stricmp (tok, "BeforeCompile") == 0) {
73 if (*tkp == '\0')
74 CfgError (f1);
75 cin->BeforeCompile = getallocline (tkp);
76 return TRUE;
77 }
78
79 if (stricmp (tok, "AfterCompile") == 0) {
80 if (*tkp == '\0')
81 CfgError (f1);
82 cin->AfterCompile = getallocline (tkp);
83 return TRUE;
84 }
85
86 if (stricmp (tok, "FidoTxt") == 0) {
87 getallocpath (*tkp ? tkp : "Nodelist.Txt", &cin->FidoTxt, Build);
88 return TRUE;
89 }
90
91 if (stricmp (tok, "FidoPrn") == 0) {
92 getallocpath (*tkp ? tkp : "Nodelist.Prn", &cin->FidoPrn, Build);
93 return TRUE;
94 }
95
96 if (stricmp (tok, "IncCoord") == 0) {
97 tok = GetToken (&tkp);
98 if (!tok)
99 CfgError (f1);
100 if (stricmp (tok, "ZC") == 0)
101 cin->IncCoord = ZONE;
102 else if (stricmp (tok, "RC") == 0)
103 cin->IncCoord = REGION;
104 else if (stricmp (tok, "NC") == 0)
105 cin->IncCoord = HOST;
106 else if (stricmp (tok, "HC") == 0)
107 cin->IncCoord = HUB;
108 else
109 CfgError (f1);
110 return TRUE;
111 }
112
113 return FALSE;
114 }
115
116
117