The R Project SVN R

Rev

Rev 59177 | Rev 60801 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59177 Rev 60241
Line 158... Line 158...
158
    _PRINT_INIT_rl_rn;
158
    _PRINT_INIT_rl_rn;
159
    int *x = LOGICAL(sx) + offset;
159
    int *x = LOGICAL(sx) + offset;
160
 
160
 
161
    /* compute w[j] = column-width of j(+1)-th column : */
161
    /* compute w[j] = column-width of j(+1)-th column : */
162
    for (j = 0; j < c; j++) {
162
    for (j = 0; j < c; j++) {
163
	formatLogical(&x[j * r], r, &w[j]);
163
	formatLogical(&x[j * r], (R_xlen_t) r, &w[j]);
164
 
164
 
165
#	define _PRINT_SET_clabw					\
165
#	define _PRINT_SET_clabw					\
166
								\
166
								\
167
	if (!isNull(cl)) {					\
167
	if (!isNull(cl)) {					\
168
	    if(STRING_ELT(cl, j) == NA_STRING)			\
168
	    if(STRING_ELT(cl, j) == NA_STRING)			\
Line 228... Line 228...
228
{
228
{
229
    _PRINT_INIT_rl_rn;
229
    _PRINT_INIT_rl_rn;
230
    int *x = INTEGER(sx) + offset;
230
    int *x = INTEGER(sx) + offset;
231
 
231
 
232
    for (j = 0; j < c; j++) {
232
    for (j = 0; j < c; j++) {
233
	formatInteger(&x[j * r], r, &w[j]);
233
	formatInteger(&x[j * r], (R_xlen_t) r, &w[j]);
234
	_PRINT_SET_clabw;
234
	_PRINT_SET_clabw;
235
	if (w[j] < clabw)
235
	if (w[j] < clabw)
236
	    w[j] = clabw;
236
	    w[j] = clabw;
237
	w[j] += R_print.gap;
237
	w[j] += R_print.gap;
238
    }
238
    }
Line 268... Line 268...
268
 
268
 
269
    int *d = (int *) R_alloc(c, sizeof(int)),
269
    int *d = (int *) R_alloc(c, sizeof(int)),
270
	*e = (int *) R_alloc(c, sizeof(int));
270
	*e = (int *) R_alloc(c, sizeof(int));
271
 
271
 
272
    for (j = 0; j < c; j++) {
272
    for (j = 0; j < c; j++) {
273
	formatReal(&x[j * r], r, &w[j], &d[j], &e[j], 0);
273
	formatReal(&x[j * r], (R_xlen_t) r, &w[j], &d[j], &e[j], 0);
274
	_PRINT_SET_clabw;
274
	_PRINT_SET_clabw;
275
	if (w[j] < clabw)
275
	if (w[j] < clabw)
276
	    w[j] = clabw;
276
	    w[j] = clabw;
277
	w[j] += R_print.gap;
277
	w[j] += R_print.gap;
278
    }
278
    }
Line 314... Line 314...
314
	*wi = (int *) R_alloc(c, sizeof(int));
314
	*wi = (int *) R_alloc(c, sizeof(int));
315
 
315
 
316
    /* Determine the column widths */
316
    /* Determine the column widths */
317
 
317
 
318
    for (j = 0; j < c; j++) {
318
    for (j = 0; j < c; j++) {
319
	formatComplex(&x[j * r], r,
319
	formatComplex(&x[j * r], (R_xlen_t) r,
320
		      &wr[j], &dr[j], &er[j],
320
		      &wr[j], &dr[j], &er[j],
321
		      &wi[j], &di[j], &ei[j], 0);
321
		      &wi[j], &di[j], &ei[j], 0);
322
	_PRINT_SET_clabw;
322
	_PRINT_SET_clabw;
323
	w[j] = wr[j] + wi[j] + 2;
323
	w[j] = wr[j] + wi[j] + 2;
324
	if (w[j] < clabw)
324
	if (w[j] < clabw)
Line 362... Line 362...
362
{
362
{
363
    _PRINT_INIT_rl_rn;
363
    _PRINT_INIT_rl_rn;
364
    SEXP *x = STRING_PTR(sx)+offset;
364
    SEXP *x = STRING_PTR(sx)+offset;
365
 
365
 
366
    for (j = 0; j < c; j++) {
366
    for (j = 0; j < c; j++) {
367
	formatString(&x[j * r], r, &w[j], quote);
367
	formatString(&x[j * r], (R_xlen_t) r, &w[j], quote);
368
	_PRINT_SET_clabw;
368
	_PRINT_SET_clabw;
369
	if (w[j] < clabw)
369
	if (w[j] < clabw)
370
	    w[j] = clabw;
370
	    w[j] = clabw;
371
    }
371
    }
372
    _PRINT_DEAL_c_eq_0;
372
    _PRINT_DEAL_c_eq_0;
Line 405... Line 405...
405
{
405
{
406
    _PRINT_INIT_rl_rn;
406
    _PRINT_INIT_rl_rn;
407
    Rbyte *x = RAW(sx) + offset;
407
    Rbyte *x = RAW(sx) + offset;
408
 
408
 
409
    for (j = 0; j < c; j++) {
409
    for (j = 0; j < c; j++) {
410
	formatRaw(&x[j * r], r, &w[j]);
410
	formatRaw(&x[j * r], (R_xlen_t) r, &w[j]);
411
	_PRINT_SET_clabw;
411
	_PRINT_SET_clabw;
412
	if (w[j] < clabw)
412
	if (w[j] < clabw)
413
	    w[j] = clabw;
413
	    w[j] = clabw;
414
	w[j] += R_print.gap;
414
	w[j] += R_print.gap;
415
    }
415
    }