The R Project SVN R

Rev

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

Rev 1895 Rev 2342
Line 35... Line 35...
35
 * then it is alloc-ed and the second pass stuffs the information in.
35
 * then it is alloc-ed and the second pass stuffs the information in.
36
 */
36
 */
37
 
37
 
38
SEXP do_paste(SEXP call, SEXP op, SEXP args, SEXP env)
38
SEXP do_paste(SEXP call, SEXP op, SEXP args, SEXP env)
39
{
39
{
40
    SEXP ans, collapse, sep, px, x, tmpchar;
40
    SEXP ans, collapse, sep, x, tmpchar;
41
    int i, j, k, maxlen, nx, pwidth, sepw;
41
    int i, j, k, maxlen, nx, pwidth, sepw;
42
    char *s, *buf;
42
    char *s, *buf;
43
 
43
 
44
    checkArity(op, args);
44
    checkArity(op, args);
45
 
45
 
Line 136... Line 136...
136
}
136
}
137
 
137
 
138
SEXP do_format(SEXP call, SEXP op, SEXP args, SEXP env)
138
SEXP do_format(SEXP call, SEXP op, SEXP args, SEXP env)
139
{
139
{
140
    SEXP l, x, y;
140
    SEXP l, x, y;
141
    int i, n, trim;
141
    int i, n, trim=0;
142
    int w, d, e;
142
    int w, d, e;
143
    int wi, di, ei;
143
    int wi, di, ei;
144
    char *strp;
144
    char *strp;
145
 
145
 
146
    PrintDefaults(env);
146
    PrintDefaults(env);
Line 220... Line 220...
220
	    strp = EncodeString(CHAR(STRING(x)[i]), w, 0, adj_left);
220
	    strp = EncodeString(CHAR(STRING(x)[i]), w, 0, adj_left);
221
	    STRING(y)[i] = mkChar(strp);
221
	    STRING(y)[i] = mkChar(strp);
222
	}
222
	}
223
	UNPROTECT(1);
223
	UNPROTECT(1);
224
	break;
224
	break;
-
 
225
    default:
-
 
226
	errorcall(call, "Impossible mode ( x )\n"); y = R_NilValue;/* -Wall */
225
    }
227
    }
226
    PROTECT(y);
228
    PROTECT(y);
227
    if((l = getAttrib(x, R_DimSymbol)) != R_NilValue)
229
    if((l = getAttrib(x, R_DimSymbol)) != R_NilValue)
228
	setAttrib(y, R_DimSymbol, l);
230
	setAttrib(y, R_DimSymbol, l);
229
    if((l = getAttrib(x, R_DimNamesSymbol)) != R_NilValue)
231
    if((l = getAttrib(x, R_DimNamesSymbol)) != R_NilValue)