MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / processCommandLine

Function processCommandLine

src/common/IntlParametersBlock.cpp:54–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void processCommandLine(IntlParametersBlock::ProcessString* processString, string& par)
55{
56 bool flagIn = false;
57 string current, result;
58
59 for (const char* s = par.begin(); s < par.end(); ++s)
60 {
61 if (s[0] == SVC_TRMNTR)
62 {
63 if (!flagIn)
64 {
65 flagIn = true;
66 }
67 else if (s[1] == SVC_TRMNTR)
68 {
69 current += SVC_TRMNTR;
70 ++s;
71 }
72 else
73 {
74 flagIn = false;
75 processString(current);
76 UtilSvc::addStringWithSvcTrmntr(current, result);
77 current = "";
78 }
79 }
80 else if (s[0] != ' ' || flagIn || current.hasData())
81 {
82 current += s[0];
83 }
84 }
85
86 if (current.hasData())
87 {
88 processString(current);
89 UtilSvc::addStringWithSvcTrmntr(current, result);
90 }
91
92 result.rtrim();
93 par = result;
94}
95
96}
97

Callers 1

Calls 4

rtrimMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
hasDataMethod · 0.45

Tested by

no test coverage detected