You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (; i<ncol; i++) str[i] =typeLetter[abs(type[i])];// abs for out-of-sample type bumps (negative)
231
+
for (; i<ncol; i++) str[i] =typeLetter[IGNORE_BUMP(type[i])];
224
232
} else {
225
-
for (; i<80; i++) str[i] =typeLetter[abs(type[i])];
233
+
for (; i<80; i++) str[i] =typeLetter[IGNORE_BUMP(type[i])];
226
234
str[i++]='.'; str[i++]='.'; str[i++]='.';
227
-
for (intj=ncol-10; j<ncol; j++) str[i++] =typeLetter[abs(type[j])];
235
+
for (intj=ncol-10; j<ncol; j++) str[i++] =typeLetter[IGNORE_BUMP(type[j])];
228
236
}
229
237
str[i] ='\0';
230
238
returnstr;
@@ -2405,7 +2413,7 @@ int freadMain(freadMainArgs _args) {
2405
2413
// DTPRINT(_("Field %d: '%.10s' as type %d (tch=%p)\n"), j+1, tch, type[j], tch);
2406
2414
fieldStart=tch;
2407
2415
int8_tthisType=type[j]; // fetch shared type once. Cannot read half-written byte is one reason type's type is single byte to avoid atomic read here.
2408
-
fun[abs(thisType)](&fctx);
2416
+
fun[IGNORE_BUMP(thisType)](&fctx);
2409
2417
if (*tch!=sep) break;
2410
2418
int8_tthisSize=size[j];
2411
2419
if (thisSize) ((char**) targets)[thisSize] +=thisSize; // 'if' for when rereading to avoid undefined NULL+0
@@ -2455,7 +2463,7 @@ int freadMain(freadMainArgs _args) {
2455
2463
fieldStart=tch;
2456
2464
int8_tjoldType=type[j];
2457
2465
int8_tthisType=joldType; // to know if it was bumped in (rare) out-of-sample type exceptions
2458
-
int8_tabsType= (int8_t)abs(thisType);
2466
+
int8_tabsType= (int8_t)IGNORE_BUMP(thisType);
2459
2467
2460
2468
while (absType<NUMTYPE) {
2461
2469
tch=fieldStart;
@@ -2468,7 +2476,7 @@ int freadMain(freadMainArgs _args) {
2468
2476
if (!end_of_field(tch)) tch=afterSpace; // else it is the field_end, we're on closing sep|eol and we'll let processor write appropriate NA as if field was empty
2469
2477
if (*tch==quote&"e) { quoted=true; tch++; }
2470
2478
} // else Field() handles NA inside it unlike other processors e.g. ,, is interpreted as "" or NA depending on option read inside Field()
2471
-
fun[abs(thisType)](&fctx);
2479
+
fun[IGNORE_BUMP(thisType)](&fctx);
2472
2480
if (quoted) { // quoted was only set to true with '&& quote' above (=> quote!='\0' now)
2473
2481
if (*tch==quote) tch++;
2474
2482
else goto typebump;
@@ -2487,7 +2495,7 @@ int freadMain(freadMainArgs _args) {
2487
2495
// sure a single re-read will definitely work.
2488
2496
typebump:
2489
2497
while (++absType<CT_STRING&&disabled_parsers[absType]) {};
2490
-
thisType=-absType;
2498
+
thisType=TOGGLE_BUMP(absType);
2491
2499
tch=fieldStart;
2492
2500
}
2493
2501
@@ -2499,7 +2507,7 @@ int freadMain(freadMainArgs _args) {
2499
2507
if (j+fieldsRemaining!=ncol) break;
2500
2508
checkedNumberOfFields= true;
2501
2509
}
2502
-
if (thisType <= -NUMTYPE) {
2510
+
if (thisType <= TOGGLE_BUMP(NUMTYPE)) {
2503
2511
break; // Improperly quoted char field needs to be healed below, other columns will be filled #5041 and #4774
2504
2512
}
2505
2513
#pragma omp critical
@@ -2512,7 +2520,7 @@ int freadMain(freadMainArgs _args) {
2512
2520
intlen=snprintf(temp, 1000,
2513
2521
_("Column %d%s%.*s%s bumped from '%s' to '%s' due to <<%.*s>> on row %"PRIu64"\n"),
0 commit comments