1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 #ifndef UCX_STRING_H
37 #define UCX_STRING_H
38
39 #include "common.h"
40 #include "allocator.h"
41
42
43
44
45 extern const unsigned cx_strstr_sbo_size;
46
47
48
49
50 struct cx_mutstr_s {
51
52
53
54
55
56 char *ptr;
57
58 size_t length;
59 };
60
61
62
63
64 typedef struct cx_mutstr_s cxmutstr;
65
66
67
68
69 struct cx_string_s {
70
71
72
73
74
75 const char *ptr;
76
77 size_t length;
78 };
79
80
81
82
83 typedef struct cx_string_s cxstring;
84
85
86
87
88 struct cx_strtok_ctx_s {
89
90
91
92 cxstring str;
93
94
95
96 cxstring delim;
97
98
99
100 const cxstring *delim_more;
101
102
103
104 size_t delim_more_count;
105
106
107
108 size_t pos;
109
110
111
112
113
114
115
116 size_t delim_pos;
117
118
119
120 size_t next_pos;
121
122
123
124 size_t found;
125
126
127
128 size_t limit;
129 };
130
131
132
133
134 typedef struct cx_strtok_ctx_s CxStrtokCtx;
135
136 #ifdef __cplusplus
137 extern "C" {
138
139
140
141
142
143
144 #define CX_STR(literal) cxstring{literal,
sizeof(literal) -
1}
145
146 #else
147
148
149
150
151
152
153
154
155 #define CX_STR(literal) (cxstring){literal,
sizeof(literal) -
1}
156
157 #endif
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175 cx_attr_nonnull
176 cx_attr_nodiscard
177 cx_attr_cstr_arg(
1)
178 cxmutstr cx_mutstr(
char *cstring);
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196 cx_attr_nodiscard
197 cx_attr_access_rw(
1,
2)
198 cxmutstr cx_mutstrn(
199 char *cstring,
200 size_t length
201 );
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218 cx_attr_nonnull
219 cx_attr_nodiscard
220 cx_attr_cstr_arg(
1)
221 cxstring cx_str(
const char *cstring);
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240 cx_attr_nodiscard
241 cx_attr_access_r(
1,
2)
242 cxstring cx_strn(
243 const char *cstring,
244 size_t length
245 );
246
247 #ifdef __cplusplus
248 }
249 cx_attr_nodiscard
250 static inline cxstring cx_strcast(cxmutstr str) {
251 return cx_strn(str.ptr, str.length);
252 }
253 cx_attr_nodiscard
254 static inline cxstring cx_strcast(cxstring str) {
255 return str;
256 }
257 extern "C" {
258 #else
259
260
261
262
263
264
265 cx_attr_nodiscard
266 static inline cxstring cx_strcast_m(cxmutstr str) {
267 return (cxstring) {str.ptr, str.length};
268 }
269
270
271
272
273
274
275 cx_attr_nodiscard
276 static inline cxstring cx_strcast_c(cxstring str) {
277 return str;
278 }
279
280
281
282
283
284
285
286
287
288
289
290
291
292 #define cx_strcast(str) _Generic((str), \
293 cxmutstr: cx_strcast_m, \
294 cxstring: cx_strcast_c) \
295 (str)
296 #endif
297
298
299
300
301
302
303
304
305
306
307
308
309 void cx_strfree(cxmutstr *str);
310
311
312
313
314
315
316
317
318
319
320
321
322
323 cx_attr_nonnull_arg(
1)
324 void cx_strfree_a(
325 const CxAllocator *alloc,
326 cxmutstr *str
327 );
328
329
330
331
332
333
334
335
336
337
338
339
340
341 cx_attr_nodiscard
342 size_t cx_strlen(
343 size_t count,
344 ...
345 );
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369 cx_attr_nodiscard
370 cx_attr_nonnull
371 cxmutstr cx_strcat_ma(
372 const CxAllocator *alloc,
373 cxmutstr str,
374 size_t count,
375 ...
376 );
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396 #define cx_strcat_a(alloc, count, ...) \
397 cx_strcat_ma(alloc, cx_mutstrn(
NULL,
0), count,
__VA_ARGS__)
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416 #define cx_strcat(count, ...) \
417 cx_strcat_ma(cxDefaultAllocator, cx_mutstrn(
NULL,
0), count,
__VA_ARGS__)
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440 #define cx_strcat_m(str, count, ...) \
441 cx_strcat_ma(cxDefaultAllocator, str, count,
__VA_ARGS__)
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458 cx_attr_nodiscard
459 cxstring cx_strsubs(
460 cxstring string,
461 size_t start
462 );
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483 cx_attr_nodiscard
484 cxstring cx_strsubsl(
485 cxstring string,
486 size_t start,
487 size_t length
488 );
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505 cx_attr_nodiscard
506 cxmutstr cx_strsubs_m(
507 cxmutstr string,
508 size_t start
509 );
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530 cx_attr_nodiscard
531 cxmutstr cx_strsubsl_m(
532 cxmutstr string,
533 size_t start,
534 size_t length
535 );
536
537
538
539
540
541
542
543
544
545
546
547
548
549 cx_attr_nodiscard
550 cxstring cx_strchr(
551 cxstring string,
552 int chr
553 );
554
555
556
557
558
559
560
561
562
563
564
565
566
567 cx_attr_nodiscard
568 cxmutstr cx_strchr_m(
569 cxmutstr string,
570 int chr
571 );
572
573
574
575
576
577
578
579
580
581
582
583
584
585 cx_attr_nodiscard
586 cxstring cx_strrchr(
587 cxstring string,
588 int chr
589 );
590
591
592
593
594
595
596
597
598
599
600
601
602
603 cx_attr_nodiscard
604 cxmutstr cx_strrchr_m(
605 cxmutstr string,
606 int chr
607 );
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625 cx_attr_nodiscard
626 cxstring cx_strstr(
627 cxstring haystack,
628 cxstring needle
629 );
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647 cx_attr_nodiscard
648 cxmutstr cx_strstr_m(
649 cxmutstr haystack,
650 cxstring needle
651 );
652
653
654
655
656
657
658
659
660
661
662
663
664
665 cx_attr_nodiscard
666 cx_attr_nonnull
667 cx_attr_access_w(
4,
3)
668 size_t cx_strsplit(
669 cxstring string,
670 cxstring delim,
671 size_t limit,
672 cxstring *output
673 );
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694 cx_attr_nodiscard
695 cx_attr_nonnull
696 cx_attr_access_w(
5)
697 size_t cx_strsplit_a(
698 const CxAllocator *allocator,
699 cxstring string,
700 cxstring delim,
701 size_t limit,
702 cxstring **output
703 );
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718 cx_attr_nodiscard
719 cx_attr_nonnull
720 cx_attr_access_w(
4,
3)
721 size_t cx_strsplit_m(
722 cxmutstr string,
723 cxstring delim,
724 size_t limit,
725 cxmutstr *output
726 );
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747 cx_attr_nodiscard
748 cx_attr_nonnull
749 cx_attr_access_w(
5)
750 size_t cx_strsplit_ma(
751 const CxAllocator *allocator,
752 cxmutstr string,
753 cxstring delim,
754 size_t limit,
755 cxmutstr **output
756 );
757
758
759
760
761
762
763
764
765
766 cx_attr_nodiscard
767 int cx_strcmp(
768 cxstring s1,
769 cxstring s2
770 );
771
772
773
774
775
776
777
778
779
780 cx_attr_nodiscard
781 int cx_strcasecmp(
782 cxstring s1,
783 cxstring s2
784 );
785
786
787
788
789
790
791
792
793
794
795
796 cx_attr_nodiscard
797 cx_attr_nonnull
798 int cx_strcmp_p(
799 const void *s1,
800 const void *s2
801 );
802
803
804
805
806
807
808
809
810
811
812
813 cx_attr_nodiscard
814 cx_attr_nonnull
815 int cx_strcasecmp_p(
816 const void *s1,
817 const void *s2
818 );
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833 cx_attr_nodiscard
834 cx_attr_nonnull
835 cxmutstr cx_strdup_a(
836 const CxAllocator *allocator,
837 cxstring string
838 );
839
840
841
842
843
844
845
846
847
848
849
850
851
852 #define cx_strdup(string) cx_strdup_a(cxDefaultAllocator, string)
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867 #define cx_strdup_ma(allocator, string) cx_strdup_a(allocator, cx_strcast(string))
868
869
870
871
872
873
874
875
876
877
878
879
880
881 #define cx_strdup_m(string) cx_strdup_a(cxDefaultAllocator, cx_strcast(string))
882
883
884
885
886
887
888
889
890
891
892 cx_attr_nodiscard
893 cxstring cx_strtrim(cxstring string);
894
895
896
897
898
899
900
901
902
903
904 cx_attr_nodiscard
905 cxmutstr cx_strtrim_m(cxmutstr string);
906
907
908
909
910
911
912
913
914
915 cx_attr_nodiscard
916 bool cx_strprefix(
917 cxstring string,
918 cxstring prefix
919 );
920
921
922
923
924
925
926
927
928
929 cx_attr_nodiscard
930 bool cx_strsuffix(
931 cxstring string,
932 cxstring suffix
933 );
934
935
936
937
938
939
940
941
942
943 cx_attr_nodiscard
944 bool cx_strcaseprefix(
945 cxstring string,
946 cxstring prefix
947 );
948
949
950
951
952
953
954
955
956
957 cx_attr_nodiscard
958 bool cx_strcasesuffix(
959 cxstring string,
960 cxstring suffix
961 );
962
963
964
965
966
967
968
969
970
971 void cx_strlower(cxmutstr string);
972
973
974
975
976
977
978
979
980
981 void cx_strupper(cxmutstr string);
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002 cx_attr_nodiscard
1003 cx_attr_nonnull
1004 cxmutstr cx_strreplacen_a(
1005 const CxAllocator *allocator,
1006 cxstring str,
1007 cxstring pattern,
1008 cxstring replacement,
1009 size_t replmax
1010 );
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030 #define cx_strreplacen(str, pattern, replacement, replmax) \
1031 cx_strreplacen_a(cxDefaultAllocator, str, pattern, replacement, replmax)
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050 #define cx_strreplace_a(allocator, str, pattern, replacement) \
1051 cx_strreplacen_a(allocator, str, pattern, replacement,
SIZE_MAX)
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070 #define cx_strreplace(str, pattern, replacement) \
1071 cx_strreplacen_a(cxDefaultAllocator, str, pattern, replacement,
SIZE_MAX)
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081 cx_attr_nodiscard
1082 CxStrtokCtx cx_strtok(
1083 cxstring str,
1084 cxstring delim,
1085 size_t limit
1086 );
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096 cx_attr_nodiscard
1097 CxStrtokCtx cx_strtok_m(
1098 cxmutstr str,
1099 cxstring delim,
1100 size_t limit
1101 );
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113 cx_attr_nonnull
1114 cx_attr_nodiscard
1115 cx_attr_access_w(
2)
1116 bool cx_strtok_next(
1117 CxStrtokCtx *ctx,
1118 cxstring *token
1119 );
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133 cx_attr_nonnull
1134 cx_attr_nodiscard
1135 cx_attr_access_w(
2)
1136 bool cx_strtok_next_m(
1137 CxStrtokCtx *ctx,
1138 cxmutstr *token
1139 );
1140
1141
1142
1143
1144
1145
1146
1147
1148 cx_attr_nonnull
1149 cx_attr_access_r(
2,
3)
1150 void cx_strtok_delim(
1151 CxStrtokCtx *ctx,
1152 const cxstring *delim,
1153 size_t count
1154 );
1155
1156
1157
1158
1159
1160
1161
1162
1163 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1164 int cx_strtos_lc(cxstring str,
short *output,
int base,
const char *groupsep);
1165
1166
1167
1168 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1169 int cx_strtoi_lc(cxstring str,
int *output,
int base,
const char *groupsep);
1170
1171
1172
1173 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1174 int cx_strtol_lc(cxstring str,
long *output,
int base,
const char *groupsep);
1175
1176
1177
1178 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1179 int cx_strtoll_lc(cxstring str,
long long *output,
int base,
const char *groupsep);
1180
1181
1182
1183 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1184 int cx_strtoi8_lc(cxstring str,
int8_t *output,
int base,
const char *groupsep);
1185
1186
1187
1188 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1189 int cx_strtoi16_lc(cxstring str,
int16_t *output,
int base,
const char *groupsep);
1190
1191
1192
1193 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1194 int cx_strtoi32_lc(cxstring str,
int32_t *output,
int base,
const char *groupsep);
1195
1196
1197
1198 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1199 int cx_strtoi64_lc(cxstring str,
int64_t *output,
int base,
const char *groupsep);
1200
1201
1202
1203 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1204 int cx_strtoz_lc(cxstring str,
ssize_t *output,
int base,
const char *groupsep);
1205
1206
1207
1208 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1209 int cx_strtous_lc(cxstring str,
unsigned short *output,
int base,
const char *groupsep);
1210
1211
1212
1213 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1214 int cx_strtou_lc(cxstring str,
unsigned int *output,
int base,
const char *groupsep);
1215
1216
1217
1218 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1219 int cx_strtoul_lc(cxstring str,
unsigned long *output,
int base,
const char *groupsep);
1220
1221
1222
1223 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1224 int cx_strtoull_lc(cxstring str,
unsigned long long *output,
int base,
const char *groupsep);
1225
1226
1227
1228 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1229 int cx_strtou8_lc(cxstring str,
uint8_t *output,
int base,
const char *groupsep);
1230
1231
1232
1233 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1234 int cx_strtou16_lc(cxstring str,
uint16_t *output,
int base,
const char *groupsep);
1235
1236
1237
1238 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1239 int cx_strtou32_lc(cxstring str,
uint32_t *output,
int base,
const char *groupsep);
1240
1241
1242
1243 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1244 int cx_strtou64_lc(cxstring str,
uint64_t *output,
int base,
const char *groupsep);
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1261 int cx_strtouz_lc(cxstring str,
size_t *output,
int base,
const char *groupsep);
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1282 int cx_strtof_lc(cxstring str,
float *output,
char decsep,
const char *groupsep);
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302 cx_attr_access_w(
2) cx_attr_nonnull_arg(
2)
1303 int cx_strtod_lc(cxstring str,
double *output,
char decsep,
const char *groupsep);
1304
1305 #ifndef CX_STR_IMPLEMENTATION
1306
1307
1308
1309 #define cx_strtos_lc(str, output, base, groupsep) cx_strtos_lc(cx_strcast(str), output, base, groupsep)
1310
1311
1312
1313 #define cx_strtoi_lc(str, output, base, groupsep) cx_strtoi_lc(cx_strcast(str), output, base, groupsep)
1314
1315
1316
1317 #define cx_strtol_lc(str, output, base, groupsep) cx_strtol_lc(cx_strcast(str), output, base, groupsep)
1318
1319
1320
1321 #define cx_strtoll_lc(str, output, base, groupsep) cx_strtoll_lc(cx_strcast(str), output, base, groupsep)
1322
1323
1324
1325 #define cx_strtoi8_lc(str, output, base, groupsep) cx_strtoi8_lc(cx_strcast(str), output, base, groupsep)
1326
1327
1328
1329 #define cx_strtoi16_lc(str, output, base, groupsep) cx_strtoi16_lc(cx_strcast(str), output, base, groupsep)
1330
1331
1332
1333 #define cx_strtoi32_lc(str, output, base, groupsep) cx_strtoi32_lc(cx_strcast(str), output, base, groupsep)
1334
1335
1336
1337 #define cx_strtoi64_lc(str, output, base, groupsep) cx_strtoi64_lc(cx_strcast(str), output, base, groupsep)
1338
1339
1340
1341 #define cx_strtoz_lc(str, output, base, groupsep) cx_strtoz_lc(cx_strcast(str), output, base, groupsep)
1342
1343
1344
1345 #define cx_strtous_lc(str, output, base, groupsep) cx_strtous_lc(cx_strcast(str), output, base, groupsep)
1346
1347
1348
1349 #define cx_strtou_lc(str, output, base, groupsep) cx_strtou_lc(cx_strcast(str), output, base, groupsep)
1350
1351
1352
1353 #define cx_strtoul_lc(str, output, base, groupsep) cx_strtoul_lc(cx_strcast(str), output, base, groupsep)
1354
1355
1356
1357 #define cx_strtoull_lc(str, output, base, groupsep) cx_strtoull_lc(cx_strcast(str), output, base, groupsep)
1358
1359
1360
1361 #define cx_strtou8_lc(str, output, base, groupsep) cx_strtou8_lc(cx_strcast(str), output, base, groupsep)
1362
1363
1364
1365 #define cx_strtou16_lc(str, output, base, groupsep) cx_strtou16_lc(cx_strcast(str), output, base, groupsep)
1366
1367
1368
1369 #define cx_strtou32_lc(str, output, base, groupsep) cx_strtou32_lc(cx_strcast(str), output, base, groupsep)
1370
1371
1372
1373 #define cx_strtou64_lc(str, output, base, groupsep) cx_strtou64_lc(cx_strcast(str), output, base, groupsep)
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388 #define cx_strtouz_lc(str, output, base, groupsep) cx_strtouz_lc(cx_strcast(str), output, base, groupsep)
1389
1390
1391
1392
1393 #define cx_strtos(str, output, base) cx_strtos_lc(str, output, base,
",")
1394
1395
1396
1397 #define cx_strtoi(str, output, base) cx_strtoi_lc(str, output, base,
",")
1398
1399
1400
1401 #define cx_strtol(str, output, base) cx_strtol_lc(str, output, base,
",")
1402
1403
1404
1405 #define cx_strtoll(str, output, base) cx_strtoll_lc(str, output, base,
",")
1406
1407
1408
1409 #define cx_strtoi8(str, output, base) cx_strtoi8_lc(str, output, base,
",")
1410
1411
1412
1413 #define cx_strtoi16(str, output, base) cx_strtoi16_lc(str, output, base,
",")
1414
1415
1416
1417 #define cx_strtoi32(str, output, base) cx_strtoi32_lc(str, output, base,
",")
1418
1419
1420
1421 #define cx_strtoi64(str, output, base) cx_strtoi64_lc(str, output, base,
",")
1422
1423
1424
1425 #define cx_strtoz(str, output, base) cx_strtoz_lc(str, output, base,
",")
1426
1427
1428
1429 #define cx_strtous(str, output, base) cx_strtous_lc(str, output, base,
",")
1430
1431
1432
1433 #define cx_strtou(str, output, base) cx_strtou_lc(str, output, base,
",")
1434
1435
1436
1437 #define cx_strtoul(str, output, base) cx_strtoul_lc(str, output, base,
",")
1438
1439
1440
1441 #define cx_strtoull(str, output, base) cx_strtoull_lc(str, output, base,
",")
1442
1443
1444
1445 #define cx_strtou8(str, output, base) cx_strtou8_lc(str, output, base,
",")
1446
1447
1448
1449 #define cx_strtou16(str, output, base) cx_strtou16_lc(str, output, base,
",")
1450
1451
1452
1453 #define cx_strtou32(str, output, base) cx_strtou32_lc(str, output, base,
",")
1454
1455
1456
1457 #define cx_strtou64(str, output, base) cx_strtou64_lc(str, output, base,
",")
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474 #define cx_strtouz(str, output, base) cx_strtouz_lc(str, output, base,
",")
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494 #define cx_strtof_lc(str, output, decsep, groupsep) cx_strtof_lc(cx_strcast(str), output, decsep, groupsep)
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512 #define cx_strtod_lc(str, output, decsep, groupsep) cx_strtod_lc(cx_strcast(str), output, decsep, groupsep)
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530 #define cx_strtof(str, output) cx_strtof_lc(str, output,
'.',
",")
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546 #define cx_strtod(str, output) cx_strtod_lc(str, output,
'.',
",")
1547
1548 #endif
1549
1550 #ifdef __cplusplus
1551 }
1552 #endif
1553
1554 #endif
1555