/Config.cpp

https://gitlab.com/DELTA_37/Config · C++ · 746 lines · 716 code · 26 blank · 4 comment · 151 complexity · a35d23a9c16753b914a13f7457a72b8f MD5 · raw file

  1. #include "Config.h"
  2. #include "analize.h"
  3. int CConfig::AddInt(const char *s, int x)
  4. {
  5. if (this->IntK == IntN)
  6. {
  7. printf("AddIntMax");
  8. return -1;
  9. }
  10. else
  11. {
  12. this->IntName[IntK] = new char[strlen(s) + 1];
  13. memcpy(this->IntName[IntK], s, strlen(s) + 1);
  14. this->Ints[IntK] = x;
  15. this->IntK++;
  16. return 0;
  17. }
  18. }
  19. int CConfig::AddDouble(const char *s, double x)
  20. {
  21. if (DoubleK == DoubleN)
  22. {
  23. printf("AddDoubleMax");
  24. return -1;
  25. }
  26. else
  27. {
  28. this->DoubleName[DoubleK] = new char[strlen(s) + 1];
  29. memcpy(this->DoubleName[DoubleK], s, strlen(s) + 1);
  30. this->Doubles[DoubleK] = x;
  31. DoubleK++;
  32. return 0;
  33. }
  34. }
  35. int CConfig::AddString(const char *s, const char *x)
  36. {
  37. if (StringK == StringN)
  38. {
  39. printf("AddStringMax");
  40. }
  41. else
  42. {
  43. this->StringName[StringK] = new char[strlen(s) + 1];
  44. memcpy(this->StringName[StringK], s, strlen(s) + 1);
  45. this->Strings[StringK] = new char[strlen(x) + 1];
  46. memcpy(this->StringName[StringK], x, strlen(x) + 1);
  47. StringK++;
  48. return 0;
  49. }
  50. }
  51. int CConfig::SetInt(const char *s, int x)
  52. {
  53. int i;
  54. for (i = 0; i <= IntK - 1; i++)
  55. {
  56. if (strlen(s) == strlen(IntName[i]))
  57. {
  58. if (strncmp(s, IntName[i], strlen(s)) == 0)
  59. {
  60. Ints[i] = x;
  61. }
  62. }
  63. }
  64. return 0;
  65. }
  66. int CConfig::SetDouble(const char *s, double x)
  67. {
  68. int i;
  69. for (i = 0; i <= DoubleK - 1; i++)
  70. {
  71. if (strlen(s) == strlen(DoubleName[i]))
  72. {
  73. if (strncmp(s, DoubleName[i], strlen(s)) == 0)
  74. {
  75. Doubles[i] = x;
  76. }
  77. }
  78. }
  79. return 0;
  80. }
  81. int CConfig::SetString(const char *s, const char *x)
  82. {
  83. int i;
  84. for (i = 0; i <= StringK - 1; i++)
  85. {
  86. if (strlen(s) == strlen(StringName[i]))
  87. {
  88. if (strncmp(s, StringName[i], strlen(s)) == 0)
  89. {
  90. int j;
  91. delete[] Strings[i];
  92. Strings[i] = new char[strlen(x) + 1];
  93. for (j = 0; j <= strlen(x) - 1; j++)
  94. {
  95. Strings[i][j] = x[j];
  96. }
  97. Strings[strlen(x)] = '\0';
  98. }
  99. }
  100. }
  101. return 0;
  102. }
  103. int CConfig::GetInt(const char *s, int *x)
  104. {
  105. int i;
  106. for (i = 0; i <= IntK - 1; i++)
  107. {
  108. if (strlen(s) == strlen(IntName[i]))
  109. {
  110. if (strncmp(s, IntName[i], strlen(s)) == 0)
  111. {
  112. (*x) = Ints[i];
  113. }
  114. }
  115. }
  116. return 0;
  117. }
  118. int CConfig::GetDouble(const char *s, double *x)
  119. {
  120. int i;
  121. for (i = 0; i <= DoubleK - 1; i++)
  122. {
  123. if (strlen(s) == strlen(DoubleName[i]))
  124. {
  125. if (strncmp(s, DoubleName[i], strlen(s)) == 0)
  126. {
  127. (*x) = Doubles[i];
  128. }
  129. }
  130. }
  131. return 0;
  132. }
  133. int CConfig::GetString(const char *s, char **x)
  134. {
  135. int i;
  136. for (i = 0; i <= StringK - 1; i++)
  137. {
  138. if (strlen(s) == strlen(StringName[i]))
  139. {
  140. if (strncmp(s, StringName[i], strlen(s)) == 0)
  141. {
  142. int j;
  143. (*x) = new char[strlen(Strings[i]) + 1];
  144. for (j = 0; j <= strlen(Strings[i]) - 1; j++)
  145. {
  146. (*x)[j] = Strings[i][j];
  147. }
  148. (*x)[strlen(Strings[i])] = '\0';
  149. }
  150. }
  151. }
  152. return 0;
  153. }
  154. int CConfig::WhatType(const char *s)
  155. {
  156. int i;
  157. for (i = 0; i <= IntK - 1; i++)
  158. {
  159. if (strlen(s) == strlen(IntName[i]))
  160. {
  161. if (strncmp(s, IntName[i], strlen(s)) == 0)
  162. {
  163. return 1;
  164. }
  165. }
  166. }
  167. for (i = 0; i <= DoubleK - 1; i++)
  168. {
  169. if (strlen(s) == strlen(DoubleName[i]))
  170. {
  171. if (strncmp(s, DoubleName[i], strlen(s)) == 0)
  172. {
  173. return 2;
  174. }
  175. }
  176. }
  177. for (i = 0; i <= StringK - 1; i++)
  178. {
  179. if (strlen(s) == strlen(StringName[i]))
  180. {
  181. if (strncmp(s, StringName[i], strlen(s)) == 0)
  182. {
  183. return 3;
  184. }
  185. }
  186. }
  187. return 0;
  188. }
  189. CConfig CConfig::operator+(const CConfig &Q)
  190. {
  191. int i, j;
  192. CConfig R(this->IntN + Q.IntN, this->DoubleN + Q.DoubleN, this->StringN + Q.StringN);
  193. for (i = 0; i <= Q.IntK - 1; i++)
  194. {
  195. R.IntName[i] = new char[strlen(Q.IntName[i]) + 1];
  196. strcpy(R.IntName[i], Q.IntName[i]);
  197. R.IntName[strlen(Q.IntName[i])] = '\0';
  198. R.Ints[i] = Q.Ints[i];
  199. R.IntK++;
  200. }
  201. for (i = 0; i <= this->IntK - 1; i++)
  202. {
  203. int bl = 1;
  204. for (j = 0; j <= R.IntK - 1; j++)
  205. {
  206. if (strlen(this->IntName[i]) == strlen(R.IntName[j]))
  207. {
  208. if (strcmp(R.IntName[j], this->IntName[i]) == 0)
  209. {
  210. bl = 0;
  211. break;
  212. }
  213. }
  214. }
  215. if (bl == 1)
  216. {
  217. R.IntName[R.IntK] = new char[strlen(this->IntName[i]) + 1];
  218. strcpy(R.IntName[R.IntK], this->IntName[i]);
  219. R.IntName[R.IntK][strlen(this->IntName[i]) + 1] = '\0';
  220. R.Ints[R.IntK] = this->Ints[i];
  221. R.IntK++;
  222. }
  223. }
  224. for (i = 0; i <= Q.DoubleK - 1; i++)
  225. {
  226. R.DoubleName[i] = new char[strlen(Q.DoubleName[i]) + 1];
  227. strcpy(R.DoubleName[i], Q.DoubleName[i]);
  228. R.DoubleName[strlen(Q.DoubleName[i])] = '\0';
  229. R.Doubles[i] = Q.Doubles[i];
  230. R.DoubleK++;
  231. }
  232. for (i = 0; i <= this->DoubleK - 1; i++)
  233. {
  234. int bl = 1;
  235. for (j = 0; j <= R.DoubleK - 1; j++)
  236. {
  237. if (strlen(this->DoubleName[i]) == strlen(R.DoubleName[j]))
  238. {
  239. if (strcmp(R.DoubleName[j], this->DoubleName[i]) == 0)
  240. {
  241. bl = 0;
  242. break;
  243. }
  244. }
  245. }
  246. if (bl == 1)
  247. {
  248. R.DoubleName[R.DoubleK] = new char[strlen(this->DoubleName[i]) + 1];
  249. strcpy(R.DoubleName[R.DoubleK], this->DoubleName[i]);
  250. R.DoubleName[R.DoubleK][strlen(this->DoubleName[i]) + 1] = '\0';
  251. R.Doubles[R.DoubleK] = this->Doubles[i];
  252. R.DoubleK++;
  253. }
  254. }
  255. for (i = 0; i <= Q.StringK - 1; i++)
  256. {
  257. R.StringName[i] = new char[strlen(Q.StringName[i]) + 1];
  258. strcpy(R.StringName[i], Q.StringName[i]);
  259. R.StringName[strlen(Q.StringName[i])] = '\0';
  260. R.Strings[i] = new char[strlen(Q.Strings[i]) + 1];
  261. strcpy(R.Strings[i], Q.Strings[i]);
  262. R.Strings[i][strlen(Q.Strings[i])] = '\0';
  263. R.StringK++;
  264. }
  265. for (i = 0; i <= this->StringK - 1; i++)
  266. {
  267. int bl = 1;
  268. for (j = 0; j <= R.StringK - 1; j++)
  269. {
  270. if (strlen(this->StringName[i]) == strlen(R.StringName[j]))
  271. {
  272. if (strcmp(R.StringName[j], this->StringName[i]) == 0)
  273. {
  274. bl = 0;
  275. break;
  276. }
  277. }
  278. }
  279. if (bl == 1)
  280. {
  281. R.StringName[R.StringK] = new char[strlen(this->StringName[i]) + 1];
  282. strcpy(R.StringName[R.StringK], this->StringName[i]);
  283. R.StringName[R.StringK][strlen(this->StringName[i]) + 1] = '\0';
  284. R.Strings[R.StringK] = new char[strlen(this->Strings[i]) + 1];
  285. strcpy(R.Strings[R.StringK], this->Strings[i]);
  286. R.Strings[R.StringK][strlen(this->Strings[i])] = '\0';
  287. R.StringK++;
  288. }
  289. }
  290. return R;
  291. }
  292. CConfig::CConfig(const CConfig &Q)
  293. {
  294. int i;
  295. this->IntK = Q.IntK;
  296. this->DoubleK = Q.DoubleK;
  297. this->StringK = Q.StringK;
  298. this->IntN = Q.IntN;
  299. this->DoubleN = Q.DoubleN;
  300. this->StringN = Q.StringN;
  301. this->StringName = new char*[Q.StringN];
  302. this->IntName = new char*[Q.IntN];
  303. this->DoubleName = new char*[Q.DoubleN];
  304. this->Ints = new int[Q.IntN];
  305. this->Doubles = new double[Q.DoubleN];
  306. this->Strings = new char*[Q.StringN];
  307. for (i = 0; i <= Q.StringK - 1; i++)
  308. {
  309. int j;
  310. this->Strings[i] = new char[strlen(Q.Strings[i]) + 1];
  311. for (j = 0; j <= strlen(Q.Strings[i]); j++)
  312. {
  313. this->Strings[i][j] = Q.Strings[i][j];
  314. }
  315. this->Strings[i][strlen(Q.Strings[i])] = '\0';
  316. }
  317. for (i = 0; i <= Q.IntK - 1; i++)
  318. {
  319. this->Ints[i] = Q.Ints[i];
  320. }
  321. for (i = 0; i <= Q.DoubleK - 1; i++)
  322. {
  323. this->Doubles[i] = Q.Doubles[i];
  324. }
  325. for (i = 0; i <= Q.StringK - 1; i++)
  326. {
  327. int j;
  328. this->StringName[i] = new char[strlen(Q.StringName[i]) + 1];
  329. for (j = 0; j <= strlen(Q.StringName[i]); j++)
  330. {
  331. this->Strings[i][j] = Q.Strings[i][j];
  332. }
  333. this->StringName[i][strlen(Q.StringName[i])] = '\0';
  334. }
  335. for (i = 0; i <= Q.DoubleK - 1; i++)
  336. {
  337. int j;
  338. this->DoubleName[i] = new char[strlen(Q.DoubleName[i]) + 1];
  339. for (j = 0; j <= strlen(Q.DoubleName[i]); j++)
  340. {
  341. this->DoubleName[i][j] = Q.DoubleName[i][j];
  342. }
  343. this->DoubleName[i][strlen(Q.DoubleName[i])] = '\0';
  344. }
  345. for (i = 0; i <= Q.IntK - 1; i++)
  346. {
  347. int j;
  348. this->IntName[i] = new char[strlen(Q.IntName[i]) + 1];
  349. for (j = 0; j <= strlen(Q.IntName[i]); j++)
  350. {
  351. this->IntName[i][j] = Q.IntName[i][j];
  352. }
  353. this->IntName[i][strlen(Q.IntName[i])] = '\0';
  354. }
  355. }
  356. CConfig & CConfig::operator=(const CConfig &Q)
  357. {
  358. int i;
  359. this->IntK = Q.IntK;
  360. this->DoubleK = Q.DoubleK;
  361. this->StringK = Q.StringK;
  362. this->IntN = Q.IntN;
  363. this->DoubleN = Q.DoubleN;
  364. this->StringN = Q.StringN;
  365. this->StringName = new char*[Q.StringN];
  366. this->IntName = new char*[Q.IntN];
  367. this->DoubleName = new char*[Q.DoubleN];
  368. this->Ints = new int[Q.IntN];
  369. this->Doubles = new double[Q.DoubleN];
  370. this->Strings = new char*[Q.StringN];
  371. for (i = 0; i <= Q.StringK - 1; i++)
  372. {
  373. int j;
  374. this->Strings[i] = new char[strlen(Q.Strings[i]) + 1];
  375. for (j = 0; j <= strlen(Q.Strings[i]); j++)
  376. {
  377. this->Strings[i][j] = Q.Strings[i][j];
  378. }
  379. this->Strings[i][strlen(Q.Strings[i])] = '\0';
  380. }
  381. for (i = 0; i <= Q.IntK - 1; i++)
  382. {
  383. this->Ints[i] = Q.Ints[i];
  384. }
  385. for (i = 0; i <= Q.DoubleK - 1; i++)
  386. {
  387. this->Doubles[i] = Q.Doubles[i];
  388. }
  389. for (i = 0; i <= Q.StringK - 1; i++)
  390. {
  391. int j;
  392. this->StringName[i] = new char[strlen(Q.StringName[i]) + 1];
  393. for (j = 0; j <= strlen(Q.StringName[i]); j++)
  394. {
  395. this->StringName[i][j] = Q.StringName[i][j];
  396. }
  397. this->StringName[i][strlen(Q.StringName[i])] = '\0';
  398. }
  399. for (i = 0; i <= Q.DoubleK - 1; i++)
  400. {
  401. int j;
  402. this->DoubleName[i] = new char[strlen(Q.DoubleName[i]) + 1];
  403. for (j = 0; j <= strlen(Q.DoubleName[i]); j++)
  404. {
  405. this->DoubleName[i][j] = Q.DoubleName[i][j];
  406. }
  407. this->DoubleName[i][strlen(Q.DoubleName[i])] = '\0';
  408. }
  409. for (i = 0; i <= Q.IntK - 1; i++)
  410. {
  411. int j;
  412. this->IntName[i] = new char[strlen(Q.IntName[i]) + 1];
  413. for (j = 0; j <= strlen(Q.IntName[i]); j++)
  414. {
  415. this->IntName[i][j] = Q.IntName[i][j];
  416. }
  417. this->IntName[i][strlen(Q.IntName[i])] = '\0';
  418. }
  419. return (*this);
  420. }
  421. int CConfig::ToPush(char **str)
  422. {
  423. char *s = *str;
  424. int n = strlen(s); // s[n] = '\0'
  425. int i;
  426. for (i = 0; i <= n - 1; i++)
  427. {
  428. if (s[i] == '$')
  429. {
  430. int j = i + 2;
  431. int k; // счетчик
  432. int p;
  433. char *c;
  434. //выделяем имя переменной
  435. while (s[j] != ')')
  436. {
  437. j++;
  438. }
  439. // получаем фрагмент i+2 ... j-1 имя переменной, длина переменной j-i-2
  440. p = j - i - 2;
  441. c = s + i + 2;
  442. for (k = 0; k <= this->IntK - 1; k++)
  443. {
  444. if (strnlen(c, p) == strnlen(this->IntName[k], p))
  445. {
  446. if (strncmp(c, IntName[k], p) == 0)
  447. {
  448. char *dop;
  449. char *result;
  450. dop = new char[(int)(floor(log10(Ints[k])) + 4)];
  451. sprintf(dop, "(%d)", Ints[k]);
  452. insert(dop, i, j, str);
  453. delete[] dop;
  454. return this->ToPush(str);
  455. }
  456. }
  457. }
  458. for (k = 0; k <= this->DoubleK - 1; k++)
  459. {
  460. if (strnlen(c, p) == strnlen(this->DoubleName[k], p))
  461. {
  462. if (strncmp(c, DoubleName[k], p) == 0)
  463. {
  464. char *dop;
  465. dop = new char[(int)(floor(log10(Doubles[k])) + 10)];
  466. sprintf(dop, "(%.5lf)", Doubles[k]);
  467. insert(dop, i, j, str);
  468. delete[] dop;
  469. return this->ToPush(str);
  470. }
  471. }
  472. }
  473. for (k = 0; k <= this->StringK - 1; k++)
  474. {
  475. if (strnlen(c, p) == strnlen(this->StringName[k], p))
  476. {
  477. if (strncmp(c, StringName[k], p) == 0)
  478. {
  479. insert(Strings[k], i, j, str);
  480. return this->ToPush(str);
  481. }
  482. }
  483. }
  484. }
  485. }
  486. }
  487. //*/
  488. int CConfig::Add(const char *str, int q)
  489. {
  490. char *s = new char[strlen(str) + 1];
  491. strcpy(s, str);
  492. int i = 0;
  493. int k = 0;
  494. int n = strlen(s);
  495. char *VarName;
  496. char *Val;
  497. Trim(&s);
  498. while(s[k] != '=')
  499. {
  500. k++;
  501. }
  502. // 0 ... k - 1 имя = k + 1 ... n - 1 значение
  503. VarName = new char[k + 1];
  504. Val = new char[n - k];
  505. for (i = 0; i <= k - 1; i++)
  506. {
  507. VarName[i] = s[i];
  508. }
  509. VarName[k] = '\0';
  510. for (i = k + 1; i <= n - 1; i++)
  511. {
  512. Val[i - k - 1] = s[i];
  513. }
  514. Val[n - k - 1] = '\0';
  515. if (WhatType(VarName) == 0)
  516. {
  517. switch(q)
  518. {
  519. case 1 : // int
  520. {
  521. char *dop;
  522. dop = new char[strlen(Val) + 1];
  523. SEqInt Q;
  524. strcpy(dop, Val);
  525. this->ToPush(&dop);
  526. if (CreateSEqInt(&Q, dop) == -1)
  527. {
  528. break;
  529. }
  530. this->IntK++;
  531. this->Ints[this->IntK - 1] = IntEval(&Q);
  532. this->IntName[this->IntK - 1] = new char[strlen(VarName) + 1];
  533. strcpy(this->IntName[this->IntK - 1], VarName);
  534. DeleteSEqInt(&Q);
  535. delete[] dop;
  536. delete[] VarName;
  537. delete[] Val;
  538. delete[] s;
  539. break;
  540. }
  541. case 2 :
  542. {
  543. char *dop;
  544. dop = new char[strlen(Val) + 1];
  545. SEqDouble Q;
  546. strcpy(dop, Val);
  547. this->ToPush(&dop);
  548. if(CreateSEqDouble(&Q, dop) == -1)
  549. {
  550. break;
  551. }
  552. this->DoubleK++;
  553. this->Doubles[this->DoubleK - 1] = DoubleEval(&Q);
  554. this->DoubleName[this->DoubleK - 1] = new char[strlen(VarName) + 1];
  555. strcpy(this->DoubleName[this->DoubleK - 1], VarName);
  556. DeleteSEqDouble(&Q);
  557. delete[] dop;
  558. delete[] VarName;
  559. delete[] Val;
  560. delete[] s;
  561. break;
  562. }
  563. case 3 :
  564. {
  565. char *dop;
  566. dop = new char[strlen(Val) + 1];
  567. strcpy(dop, Val);
  568. this->ToPush(&dop);
  569. this->Strings[this->StringK] = new char[strlen(dop) + 1];
  570. strcpy(this->Strings[this->StringK], dop);
  571. this->Strings[this->StringK][strlen(dop)] = '\0';
  572. this->StringName[this->StringK] = new char[strlen(VarName) + 1];
  573. strcpy(this->StringName[this->StringK], VarName);
  574. this->StringK++;
  575. delete[] dop;
  576. delete[] VarName;
  577. delete[] Val;
  578. delete[] s;
  579. break;
  580. }
  581. default :
  582. {
  583. delete[] VarName;
  584. delete[] Val;
  585. delete[] s;
  586. return -1;
  587. }
  588. }
  589. }
  590. else
  591. {
  592. delete[] VarName;
  593. delete[] Val;
  594. delete[] s;
  595. return -1;
  596. }
  597. return 0;
  598. }
  599. CConfig::~CConfig(void)
  600. {
  601. int i;
  602. for (i = 0; i <= IntK - 1; i++)
  603. {
  604. delete[] IntName[i];
  605. }
  606. for (i = 0; i <= DoubleK - 1; i++)
  607. {
  608. delete[] DoubleName[i];
  609. }
  610. for (i = 0; i <= StringK - 1; i++)
  611. {
  612. delete[] StringName[i];
  613. delete[] Strings[i];
  614. }
  615. delete[] IntName;
  616. delete[] DoubleName;
  617. delete[] StringName;
  618. delete[] Strings;
  619. delete[] Ints;
  620. delete[] Doubles;
  621. }
  622. CConfig::CConfig(const char *FileName)
  623. {
  624. FILE *fp;
  625. fp = fopen(FileName, "r");
  626. int k = 0;
  627. int i;
  628. char c;
  629. int *len;
  630. while ((c = fgetc(fp)) != EOF)
  631. {
  632. if (c == '\n')
  633. {
  634. k++;
  635. }
  636. }
  637. len = new int[k];
  638. this->IntN = k;
  639. this->DoubleN = k;
  640. this->StringN = k;
  641. this->IntK = 0;
  642. this->DoubleK = 0;
  643. this->StringK = 0;
  644. this->IntName = new char*[k];
  645. this->DoubleName = new char*[k];
  646. this->StringName = new char*[k];
  647. this->Ints = new int[k];
  648. this->Doubles = new double[k];
  649. this->Strings = new char*[k];
  650. rewind(fp);
  651. for (i = 0; i <= k - 1; i++)
  652. {
  653. char d;
  654. char *dop;
  655. int len = 0;
  656. while((d = fgetc(fp)) != '\n')
  657. {
  658. if (d != EOF)
  659. {
  660. len++;
  661. }
  662. else
  663. {
  664. break;
  665. }
  666. }
  667. dop = new char[len + 1];
  668. fseek(fp, -len - 1, SEEK_CUR);
  669. fgets(dop, len + 1, fp);
  670. fgetc(fp);
  671. if (strncmp(dop, "int", 3) == 0)
  672. {
  673. this->Add(dop + 3, 1);
  674. }
  675. else if (strncmp(dop, "double", 6) == 0)
  676. {
  677. this->Add(dop + 6, 2);
  678. }
  679. else
  680. {
  681. this->Add(dop + 6, 3);
  682. }
  683. delete[] dop;
  684. }
  685. fclose(fp);
  686. }
  687. CConfig::CConfig(int n1, int n2, int n3)
  688. {
  689. this->IntN = n1;
  690. this->DoubleN = n2;
  691. this->StringN = n3;
  692. this->IntK = 0;
  693. this->DoubleK = 0;
  694. this->StringK = 0;
  695. this->IntName = new char*[n1];
  696. this->DoubleName = new char*[n2];
  697. this->StringName = new char*[n3];
  698. this->Ints = new int[n1];
  699. this->Doubles = new double[n2];
  700. this->Strings = new char*[n3];
  701. }
  702. void CConfig::Print(void)
  703. {
  704. int i;
  705. printf("Ints:\n");
  706. for (i = 0; i <= IntK - 1; i++)
  707. {
  708. printf(" %s : %d\n", IntName[i], Ints[i]);
  709. }
  710. printf("Doubles:\n");
  711. for (i = 0; i <= DoubleK - 1; i++)
  712. {
  713. printf(" %s : %lf\n", DoubleName[i], Doubles[i]);
  714. }
  715. printf("Strings:\n");
  716. for (i = 0; i <= StringK - 1; i++)
  717. {
  718. printf(" %s : %s\n", StringName[i], Strings[i]);
  719. }
  720. }