summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2002-09-26 09:48:31 +0000
committeragc <agc@pkgsrc.org>2002-09-26 09:48:31 +0000
commit10eb5a57c7e50eaccffcfdae733935f42f1c689b (patch)
treec5023ba6fe87da09a62aaae9321507eb5114bdf0 /editors
parent1523d6fa97e234afee2f0e075a0eed72be1cf132 (diff)
downloadpkgsrc-10eb5a57c7e50eaccffcfdae733935f42f1c689b.tar.gz
Add a patch so that, when reading commands from a script file, the
correct number of arguments is preserved. With thanks to Stoned Elipot for noticing the bug.
Diffstat (limited to 'editors')
-rw-r--r--editors/ssam/distinfo3
-rw-r--r--editors/ssam/patches/patch-ab37
2 files changed, 39 insertions, 1 deletions
diff --git a/editors/ssam/distinfo b/editors/ssam/distinfo
index 2caa255a102..8fd593b718b 100644
--- a/editors/ssam/distinfo
+++ b/editors/ssam/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.2 2001/04/19 11:01:05 agc Exp $
+$NetBSD: distinfo,v 1.3 2002/09/26 09:48:31 agc Exp $
SHA1 (ssam-1.9.tar.gz) = 6fee1e64d3cbf6bef72fe60798cc8ad7eab9260e
Size (ssam-1.9.tar.gz) = 41186 bytes
SHA1 (patch-aa) = 63872a665c11feaa03567115a64888f973c77c3e
+SHA1 (patch-ab) = 7ea16aa146e9a68d1b921a56fb80dc968df140f3
diff --git a/editors/ssam/patches/patch-ab b/editors/ssam/patches/patch-ab
new file mode 100644
index 00000000000..858b67a6f2c
--- /dev/null
+++ b/editors/ssam/patches/patch-ab
@@ -0,0 +1,37 @@
+$NetBSD: patch-ab,v 1.1 2002/09/26 09:48:32 agc Exp $
+
+--- main.c 2002/09/26 09:40:23 1.1
++++ main.c 2002/09/26 09:40:51
+@@ -109,11 +109,12 @@
+ char *f;
+ char *collseq;
+ int flags;
++ int off;
+ int i;
+
+ (void) memset(&sam, 0, sizeof(sam));
+ command = f = (char *) NULL;
+- flags = 0;
++ off = flags = 0;
+ collseq = getenv("UTFCOLLSEQ");
+ while ((i = getopt(argc, argv, "a:bf:nvwx")) != -1) {
+ switch(i) {
+@@ -124,6 +125,7 @@
+ flags |= ByteOffsets;
+ break;
+ case 'f':
++ off = 1;
+ f = optarg;
+ break;
+ case 'n':
+@@ -146,8 +148,8 @@
+ if ((command = getcommand(f, &argv[optind])) == (char *) NULL) {
+ exit(1);
+ }
+- argc -= optind + 1;
+- argv += optind + 1;
++ argc -= optind + 1 - off;
++ argv += optind + 1 - off;
+ if (!ssamfiles(&sam, argc, argv)) {
+ exit(1);
+ }