Skip to content

Commit 675d6db

Browse files
Merge branch 'master' into new-es-po
2 parents 63bb108 + d0887df commit 675d6db

File tree

9 files changed

+16
-14
lines changed

9 files changed

+16
-14
lines changed

po/data.table.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ msgstr ""
481481
#: assign.c:970
482482
#, c-format
483483
msgid ""
484-
"%d (type '%s' at RHS position %d taken as 0 when assigning to type '%s' %s"
484+
"%d (type '%s') at RHS position %d taken as 0 when assigning to type '%s' %s"
485485
msgstr ""
486486

487487
#: assign.c:972
@@ -896,7 +896,7 @@ msgstr ""
896896
#: dogroups.c:454 dogroups.c:468
897897
#, c-format
898898
msgid ""
899-
"\rProcessed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."
899+
"Processed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."
900900
msgstr ""
901901

902902
#: dogroups.c:473

src/assign.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ const char *memrecycle(const SEXP target, const SEXP where, const int start, con
967967
} break;
968968
case RAWSXP:
969969
switch (TYPEOF(source)) {
970-
case INTSXP: CHECK_RANGE(int, INTEGER, val<0 || val>255, val, _("%d (type '%s' at RHS position %d taken as 0 when assigning to type '%s' %s"))
970+
case INTSXP: CHECK_RANGE(int, INTEGER, val<0 || val>255, val, _("%d (type '%s') at RHS position %d taken as 0 when assigning to type '%s' %s"))
971971
case REALSXP: if (sourceIsI64)
972972
CHECK_RANGE(int64_t, REAL, val<0 || val>255, val, _("%"PRId64" (type '%s') at RHS position %d taken as 0 when assigning to type '%s' %s"))
973973
else CHECK_RANGE(double, REAL, !R_FINITE(val) || val<0.0 || val>256.0 || (int)val!=val, val, _("%f (type '%s') at RHS position %d either truncated (precision lost) or taken as 0 when assigning to type '%s' %s"))
@@ -1061,7 +1061,7 @@ const char *memrecycle(const SEXP target, const SEXP where, const int start, con
10611061
case RAWSXP: BODY(Rbyte, RAW, int, val!=0, td[i]=cval)
10621062
case LGLSXP:
10631063
if (mc) {
1064-
memcpy(td, LOGICAL(source), slen*sizeof(Rboolean)); break;
1064+
memcpy(td, LOGICAL(source), slen*sizeof(int)); break;
10651065
} else BODY(int, LOGICAL, int, val, td[i]=cval)
10661066
case INTSXP: BODY(int, INTEGER, int, val==NA_INTEGER ? NA_LOGICAL : val!=0, td[i]=cval)
10671067
case REALSXP:
@@ -1207,7 +1207,7 @@ void writeNA(SEXP v, const int from, const int n, const bool listNA)
12071207
memset(RAW(v)+from, 0, n*sizeof(Rbyte));
12081208
break;
12091209
case LGLSXP: {
1210-
Rboolean *vd = (Rboolean *)LOGICAL(v);
1210+
int *vd = (int *)LOGICAL(v);
12111211
for (int i=from; i<=to; ++i) vd[i] = NA_LOGICAL;
12121212
} break;
12131213
case INTSXP: {

src/dogroups.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,8 @@ SEXP dogroups(SEXP dt, SEXP dtcols, SEXP groups, SEXP grpcols, SEXP jiscols, SEX
451451
int ETA = (int)(avgTimePerGroup*(ngrp-i-1));
452452
if (hasPrinted || ETA >= 0) {
453453
if (verbose && !hasPrinted) Rprintf(_("\n"));
454-
Rprintf(_("\rProcessed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."), i+1, ngrp, 100.0*(i+1)/ngrp, (int)(now-startTime), ETA);
454+
Rprintf("\r"); // \r is not internationalizable
455+
Rprintf(_("Processed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."), i+1, ngrp, 100.0*(i+1)/ngrp, (int)(now-startTime), ETA);
455456
}
456457
nextTime = now+1;
457458
hasPrinted = true;
@@ -465,7 +466,8 @@ SEXP dogroups(SEXP dt, SEXP dtcols, SEXP groups, SEXP grpcols, SEXP jiscols, SEX
465466
else UNPROTECT(1); // the jval. Don't want them to build up. The first jval can stay protected till the end ok.
466467
}
467468
if (showProgress && hasPrinted) {
468-
Rprintf(_("\rProcessed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."), ngrp, ngrp, 100.0, (int)(wallclock()-startTime), 0);
469+
Rprintf("\r"); // \r is not internationalizable
470+
Rprintf(_("Processed %d groups out of %d. %.0f%% done. Time elapsed: %ds. ETA: %ds."), ngrp, ngrp, 100.0, (int)(wallclock()-startTime), 0);
469471
Rprintf("\n"); // separated so this & the earlier message are identical for translation purposes.
470472
}
471473
if (isNull(lhs) && ans!=NULL) {

src/freadR.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ void pushBuffer(ThreadLocalFreadParsingContext *ctx)
644644
} else
645645
if (thisSize == 1) {
646646
if (type[j] > CT_BOOL8_Y) STOP(_("Field size is 1 but the field is of type %d\n"), type[j]);
647-
Rboolean *dest = (Rboolean *)LOGICAL(VECTOR_ELT(DT, resj)) + DTi;
647+
int *dest = LOGICAL(VECTOR_ELT(DT, resj)) + DTi;
648648
const char *src1 = (char*)buff1 + off1;
649649
for (int i=0; i<nRows; ++i) {
650650
int8_t v = *(int8_t *)src1;

src/fsort.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ SEXP fsort(SEXP x, SEXP verboseArg) {
117117
t[0] = wallclock();
118118
if (!IS_TRUE_OR_FALSE(verboseArg))
119119
error(_("%s must be TRUE or FALSE"), "verbose");
120-
Rboolean verbose = LOGICAL(verboseArg)[0];
120+
int verbose = LOGICAL(verboseArg)[0];
121121
if (!isNumeric(x)) error(_("x must be a vector of type double currently"));
122122
// TODO: not only detect if already sorted, but if it is, just return x to save the duplicate
123123

src/negate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ void negateByRef(SEXP x) {
55
error("not logical or integer vector"); // # nocov
66
}
77
const int n = length(x);
8-
Rboolean *ansd = (Rboolean *)LOGICAL(x);
8+
int *ansd = (int *)LOGICAL(x);
99
for(int i=0; i<n; ++i) {
1010
ansd[i] ^= (ansd[i] != NA_LOGICAL); // invert true/false but leave NA alone
1111
}

src/rbindlist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SEXP rbindlist(SEXP l, SEXP usenamesArg, SEXP fillArg, SEXP idcolArg, SEXP ignor
1212
error(_("%s should be TRUE or FALSE"), "ignore.attr");
1313
if (!length(l)) return(l);
1414
if (TYPEOF(l) != VECSXP) error(_("Input to rbindlist must be a list. This list can contain data.tables, data.frames or plain lists."));
15-
Rboolean usenames = LOGICAL(usenamesArg)[0];
15+
int usenames = LOGICAL(usenamesArg)[0];
1616
const bool fill = LOGICAL(fillArg)[0];
1717
const bool ignoreattr = LOGICAL(ignoreattrArg)[0];
1818
if (fill && usenames==NA_LOGICAL) {

src/uniqlist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,13 @@ SEXP uniqueNlogical(SEXP x, SEXP narmArg) {
356356
const R_xlen_t n = xlength(x);
357357
if (n==0)
358358
return ScalarInteger(0); // empty vector
359-
Rboolean first = LOGICAL(x)[0];
359+
int first = LOGICAL(x)[0];
360360
R_xlen_t i=0;
361361
const int *ix = LOGICAL(x);
362362
while (++i<n && ix[i]==first);
363363
if (i==n)
364364
return ScalarInteger(first==NA_INTEGER && narm ? 0 : 1); // all one value
365-
Rboolean second = ix[i];
365+
int second = ix[i];
366366
// we've found 2 different values (first and second). Which one didn't we find? Then just look for that.
367367
// NA_LOGICAL == INT_MIN checked in init.c
368368
const int third = (first+second == 1) ? NA_LOGICAL : ( first+second == INT_MIN ? TRUE : FALSE );

src/utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ SEXP copyAsPlain(SEXP x) {
227227
memcpy(RAW(ans), RAW(x), n*sizeof(Rbyte));
228228
break;
229229
case LGLSXP:
230-
memcpy(LOGICAL(ans), LOGICAL(x), n*sizeof(Rboolean));
230+
memcpy(LOGICAL(ans), LOGICAL(x), n*sizeof(int));
231231
break;
232232
case INTSXP:
233233
memcpy(INTEGER(ans), INTEGER(x), n*sizeof(int)); // covered by 10:1 after test 178

0 commit comments

Comments
 (0)