openbsd-ports/math/R/patches/patch-src_main_CommandLineArgs_c
dcoppa a5f12d808a Update to R-2.15.1.
Initial diff by Rafael Sadowski.
Patch to allow building with USE_SYSTRACE=Yes by lum@.
Tested by Amit Kulkarni, Benjamin Nadland and Stefan Unterweger.

Portswise OK sthen@
2012-07-04 12:38:05 +00:00

31 lines
1.0 KiB
Plaintext

$OpenBSD: patch-src_main_CommandLineArgs_c,v 1.6 2012/07/04 12:38:06 dcoppa Exp $
--- src/main/CommandLineArgs.c.orig Fri Mar 2 00:02:25 2012
+++ src/main/CommandLineArgs.c Thu Jun 28 16:33:17 2012
@@ -191,7 +191,7 @@ R_common_command_line(int *pac, char **argv, Rstart Rp
!strcmp(*av, "-V") ||
!strcmp(*av, "-n") ||
!strcmp(*av, "-v")) {
- snprintf(msg, 1024,
+ snprintf(msg, sizeof(msg),
_("WARNING: option '%s' no longer supported"), *av);
R_ShowMessage(msg);
}
@@ -204,7 +204,7 @@ R_common_command_line(int *pac, char **argv, Rstart Rp
}
else p = &(*av)[12];
if (p == NULL) {
- snprintf(msg, 1024,
+ snprintf(msg, sizeof(msg),
_("WARNING: no value given for '%s'"), *av);
R_ShowMessage(msg);
break;
@@ -214,7 +214,7 @@ R_common_command_line(int *pac, char **argv, Rstart Rp
value = R_Decode2Long(p, &ierr);
if(ierr) {
if(ierr < 0)
- snprintf(msg, 1024,
+ snprintf(msg, sizeof(msg),
_("WARNING: '%s' value is invalid: ignored"),
*av);
else