The R Project SVN R

Rev

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

Rev 57281 Rev 58515
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1997-2008   The R Development Core Team
3
 *  Copyright (C) 1997-2012   The R Development Core Team
4
 *
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by
6
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 2 of the License, or
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
8
 *  (at your option) any later version.
Line 184... Line 184...
184
		     !strcmp(*av, "-norestore") ||
184
		     !strcmp(*av, "-norestore") ||
185
		     !strcmp(*av, "-noreadline") ||
185
		     !strcmp(*av, "-noreadline") ||
186
		     !strcmp(*av, "-quiet") ||
186
		     !strcmp(*av, "-quiet") ||
187
		     !strcmp(*av, "-nsize") ||
187
		     !strcmp(*av, "-nsize") ||
188
		     !strcmp(*av, "-vsize") ||
188
		     !strcmp(*av, "-vsize") ||
189
		     !strncmp(*av, "--min-nsize", 11) ||
-
 
190
		     !strncmp(*av, "--max-nsize", 11) ||
189
		     !strncmp(*av, "--max-nsize", 11) ||
191
		     !strncmp(*av, "--min-vsize", 11) ||
-
 
192
		     !strncmp(*av, "--max-vsize", 11) ||
190
		     !strncmp(*av, "--max-vsize", 11) ||
193
		     !strcmp(*av, "-V") ||
191
		     !strcmp(*av, "-V") ||
194
		     !strcmp(*av, "-n") ||
192
		     !strcmp(*av, "-n") ||
195
		     !strcmp(*av, "-v")) {
193
		     !strcmp(*av, "-v")) {
196
		snprintf(msg, 1024,
194
		snprintf(msg, 1024,
197
			 _("WARNING: option '%s' no longer supported"), *av);
195
			 _("WARNING: option '%s' no longer supported"), *av);
198
		R_ShowMessage(msg);
196
		R_ShowMessage(msg);
199
	    }
197
	    }
-
 
198
	    /* mop up --min-[nv]size */
-
 
199
	    else if( !strncmp(*av, "--min-nsize", 11) ||
-
 
200
		     !strncmp(*av, "--min-vsize", 11) ) {
-
 
201
		R_ShowMessage(msg);
-
 
202
		if(strlen(*av) < 13) {
-
 
203
		    if(ac > 1) {ac--; av++; p = *av;} else p = NULL;
-
 
204
		}
-
 
205
		else p = &(*av)[12];
-
 
206
		if (p == NULL) {
-
 
207
		    snprintf(msg, 1024,
-
 
208
			     _("WARNING: no value given for '%s'"), *av);
-
 
209
		    R_ShowMessage(msg);
-
 
210
		    break;
-
 
211
		}
-
 
212
		int ierr;
-
 
213
		R_size_t value;
-
 
214
		value = R_Decode2Long(p, &ierr);
-
 
215
		if(ierr) {
-
 
216
		    if(ierr < 0)
-
 
217
			snprintf(msg, 1024,
-
 
218
				 _("WARNING: '%s' value is invalid: ignored"),
-
 
219
				 *av);
-
 
220
		    else
-
 
221
			sprintf(msg,
-
 
222
				_("WARNING: %s: too large and ignored"),
-
 
223
				*av);
-
 
224
		    R_ShowMessage(msg);
-
 
225
 
-
 
226
		} else {
-
 
227
		    if(!strncmp(*av, "--min-nsize", 11)) Rp->nsize = value;
-
 
228
		    if(!strncmp(*av, "--min-vsize", 11)) Rp->vsize = value;
-
 
229
		}
-
 
230
	    }
200
	    else if(strncmp(*av, "--max-ppsize", 12) == 0) {
231
	    else if(strncmp(*av, "--max-ppsize", 12) == 0) {
201
		if(strlen(*av) < 14) {
232
		if(strlen(*av) < 14) {
202
		    if(ac > 1) {ac--; av++; p = *av;} else p = NULL;
233
		    if(ac > 1) {ac--; av++; p = *av;} else p = NULL;
203
		} else p = &(*av)[13];
234
		} else p = &(*av)[13];
204
		if (p == NULL) {
235
		if (p == NULL) {