@@ -141,7 +141,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
141
141
while (sublen > 0 && isspace (* substr )) {
142
142
++ substr ;
143
143
-- sublen ;
144
- if (exact == INEXACT_MATCH && !format_len ) {
144
+ if (exact == PARTIAL_MATCH && !format_len ) {
145
145
goto finish ;
146
146
}
147
147
if (compare_format (& format , & format_len , " " , 1 , exact )) {
@@ -160,7 +160,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
160
160
}
161
161
162
162
/* PARSE THE YEAR (4 digits) */
163
- if (exact == INEXACT_MATCH && !format_len ) {
163
+ if (exact == PARTIAL_MATCH && !format_len ) {
164
164
goto finish ;
165
165
}
166
166
if (compare_format (& format , & format_len , "%Y" , 2 , exact )) {
@@ -210,7 +210,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
210
210
++ substr ;
211
211
-- sublen ;
212
212
213
- if (exact == INEXACT_MATCH && !format_len ) {
213
+ if (exact == PARTIAL_MATCH && !format_len ) {
214
214
goto finish ;
215
215
}
216
216
if (compare_format (& format , & format_len , & ymd_sep , 1 , exact )) {
@@ -223,7 +223,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
223
223
}
224
224
225
225
/* PARSE THE MONTH */
226
- if (exact == INEXACT_MATCH && !format_len ) {
226
+ if (exact == PARTIAL_MATCH && !format_len ) {
227
227
goto finish ;
228
228
}
229
229
if (compare_format (& format , & format_len , "%m" , 2 , exact )) {
@@ -272,7 +272,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
272
272
}
273
273
++ substr ;
274
274
-- sublen ;
275
- if (exact == INEXACT_MATCH && !format_len ) {
275
+ if (exact == PARTIAL_MATCH && !format_len ) {
276
276
goto finish ;
277
277
}
278
278
if (compare_format (& format , & format_len , & ymd_sep , 1 , exact )) {
@@ -281,7 +281,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
281
281
}
282
282
283
283
/* PARSE THE DAY */
284
- if (exact == INEXACT_MATCH && !format_len ) {
284
+ if (exact == PARTIAL_MATCH && !format_len ) {
285
285
goto finish ;
286
286
}
287
287
if (compare_format (& format , & format_len , "%d" , 2 , exact )) {
@@ -326,7 +326,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
326
326
if ((* substr != 'T' && * substr != ' ' ) || sublen == 1 ) {
327
327
goto parse_error ;
328
328
}
329
- if (exact == INEXACT_MATCH && !format_len ) {
329
+ if (exact == PARTIAL_MATCH && !format_len ) {
330
330
goto finish ;
331
331
}
332
332
if (compare_format (& format , & format_len , substr , 1 , exact )) {
@@ -336,7 +336,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
336
336
-- sublen ;
337
337
338
338
/* PARSE THE HOURS */
339
- if (exact == INEXACT_MATCH && !format_len ) {
339
+ if (exact == PARTIAL_MATCH && !format_len ) {
340
340
goto finish ;
341
341
}
342
342
if (compare_format (& format , & format_len , "%H" , 2 , exact )) {
@@ -385,7 +385,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
385
385
if (sublen == 0 || !isdigit (* substr )) {
386
386
goto parse_error ;
387
387
}
388
- if (exact == INEXACT_MATCH && !format_len ) {
388
+ if (exact == PARTIAL_MATCH && !format_len ) {
389
389
goto finish ;
390
390
}
391
391
if (compare_format (& format , & format_len , ":" , 1 , exact )) {
@@ -399,7 +399,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
399
399
}
400
400
401
401
/* PARSE THE MINUTES */
402
- if (exact == INEXACT_MATCH && !format_len ) {
402
+ if (exact == PARTIAL_MATCH && !format_len ) {
403
403
goto finish ;
404
404
}
405
405
if (compare_format (& format , & format_len , "%M" , 2 , exact )) {
@@ -437,7 +437,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
437
437
/* If we make it through this condition block, then the next
438
438
* character is a digit. */
439
439
if (has_hms_sep && * substr == ':' ) {
440
- if (exact == INEXACT_MATCH && !format_len ) {
440
+ if (exact == PARTIAL_MATCH && !format_len ) {
441
441
goto finish ;
442
442
}
443
443
if (compare_format (& format , & format_len , ":" , 1 , exact )) {
@@ -455,7 +455,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
455
455
}
456
456
457
457
/* PARSE THE SECONDS */
458
- if (exact == INEXACT_MATCH && !format_len ) {
458
+ if (exact == PARTIAL_MATCH && !format_len ) {
459
459
goto finish ;
460
460
}
461
461
if (compare_format (& format , & format_len , "%S" , 2 , exact )) {
@@ -486,7 +486,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
486
486
if (sublen > 0 && * substr == '.' ) {
487
487
++ substr ;
488
488
-- sublen ;
489
- if (exact == INEXACT_MATCH && !format_len ) {
489
+ if (exact == PARTIAL_MATCH && !format_len ) {
490
490
goto finish ;
491
491
}
492
492
if (compare_format (& format , & format_len , "." , 1 , exact )) {
@@ -498,7 +498,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
498
498
}
499
499
500
500
/* PARSE THE MICROSECONDS (0 to 6 digits) */
501
- if (exact == INEXACT_MATCH && !format_len ) {
501
+ if (exact == PARTIAL_MATCH && !format_len ) {
502
502
goto finish ;
503
503
}
504
504
if (compare_format (& format , & format_len , "%f" , 2 , exact )) {
@@ -568,7 +568,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
568
568
while (sublen > 0 && isspace (* substr )) {
569
569
++ substr ;
570
570
-- sublen ;
571
- if (exact == INEXACT_MATCH && !format_len ) {
571
+ if (exact == PARTIAL_MATCH && !format_len ) {
572
572
goto finish ;
573
573
}
574
574
if (compare_format (& format , & format_len , " " , 1 , exact )) {
@@ -586,7 +586,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
586
586
587
587
/* UTC specifier */
588
588
if (* substr == 'Z' ) {
589
- if (exact == INEXACT_MATCH && !format_len ) {
589
+ if (exact == PARTIAL_MATCH && !format_len ) {
590
590
goto finish ;
591
591
}
592
592
if (compare_format (& format , & format_len , "%z" , 2 , exact )) {
@@ -611,7 +611,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
611
611
-- sublen ;
612
612
}
613
613
} else if (* substr == '-' || * substr == '+' ) {
614
- if (exact == INEXACT_MATCH && !format_len ) {
614
+ if (exact == PARTIAL_MATCH && !format_len ) {
615
615
goto finish ;
616
616
}
617
617
if (compare_format (& format , & format_len , "%z" , 2 , exact )) {
@@ -700,7 +700,7 @@ int parse_iso_8601_datetime(const char *str, int len, int want_exc,
700
700
while (sublen > 0 && isspace (* substr )) {
701
701
++ substr ;
702
702
-- sublen ;
703
- if (exact == INEXACT_MATCH && !format_len ) {
703
+ if (exact == PARTIAL_MATCH && !format_len ) {
704
704
goto finish ;
705
705
}
706
706
if (compare_format (& format , & format_len , " " , 1 , exact )) {
0 commit comments