summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorjoerg <joerg>2007-04-18 18:18:24 +0000
committerjoerg <joerg>2007-04-18 18:18:24 +0000
commit01453397ec7f39b0078c8936418d52a2a54534b6 (patch)
tree512d3623ddf7f7c4ed8d3346ab900a3a65039df0 /editors
parentfb1ff3342522bbb28b3879a7927120bccbd0e3dd (diff)
downloadpkgsrc-01453397ec7f39b0078c8936418d52a2a54534b6.tar.gz
Rename setcontext to avoid conflicts with libc.
Diffstat (limited to 'editors')
-rw-r--r--editors/ssam/distinfo3
-rw-r--r--editors/ssam/patches/patch-ac171
2 files changed, 173 insertions, 1 deletions
diff --git a/editors/ssam/distinfo b/editors/ssam/distinfo
index 27864b5ddc2..a05d9829a5e 100644
--- a/editors/ssam/distinfo
+++ b/editors/ssam/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.4 2005/02/23 17:15:12 agc Exp $
+$NetBSD: distinfo,v 1.5 2007/04/18 18:18:24 joerg Exp $
SHA1 (ssam-1.9.tar.gz) = 6fee1e64d3cbf6bef72fe60798cc8ad7eab9260e
RMD160 (ssam-1.9.tar.gz) = 378f838fad503693caec5ec3e699d08fc3b7e9eb
Size (ssam-1.9.tar.gz) = 41186 bytes
SHA1 (patch-aa) = 63872a665c11feaa03567115a64888f973c77c3e
SHA1 (patch-ab) = 7ea16aa146e9a68d1b921a56fb80dc968df140f3
+SHA1 (patch-ac) = 14536f279e719d9a43e4c9ca1f9367d8909e39bf
diff --git a/editors/ssam/patches/patch-ac b/editors/ssam/patches/patch-ac
new file mode 100644
index 00000000000..ad2f2ea0f76
--- /dev/null
+++ b/editors/ssam/patches/patch-ac
@@ -0,0 +1,171 @@
+$NetBSD: patch-ac,v 1.1 2007/04/18 18:18:24 joerg Exp $
+
+--- ssam.c.orig 2007-04-18 17:58:21.000000000 +0000
++++ ssam.c
+@@ -552,7 +552,7 @@ maketag(char *buf, int n, f_t *fp, f_t *
+
+ /* set a context structure */
+ static void
+-setcontext(context_t *dot, f_t *fp, long from, long to, int type)
++my_setcontext(context_t *dot, f_t *fp, long from, long to, int type)
+ {
+ dot->c_fp = fp;
+ switch(type) {
+@@ -746,7 +746,7 @@ findfile(ssam_t *sp, context_t *ndot, in
+ if (i == sp->s_fsize) {
+ RunError(sp, ErrBadFilespec, &sp->s_progv[cmd], "No such file", 0);
+ }
+- setcontext(ndot, sp->s_fv[i], sp->s_fv[i]->f_r.r_from, sp->s_fv[i]->f_r.r_to, BGChar);
++ my_setcontext(ndot, sp->s_fv[i], sp->s_fv[i]->f_r.r_from, sp->s_fv[i]->f_r.r_to, BGChar);
+ }
+
+ /* reverse search */
+@@ -796,7 +796,7 @@ findpat(ssam_t *sp, context_t *ndot, con
+ int base;
+
+ base = pushmatch(sp, &cmdp->c_u);
+- setcontext(&tmp, dot->c_fp, dot->c_r.r_from, dot->c_r.r_to, BGChar);
++ my_setcontext(&tmp, dot->c_fp, dot->c_r.r_from, dot->c_r.r_to, BGChar);
+ if (!f_seek(tmp.c_fp, off = tmp.c_r.r_from, BGFromBOF, BGChar)) {
+ RunError(sp, ErrInvalidAddr, cmdp, "(%ld)", off);
+ }
+@@ -806,12 +806,12 @@ findpat(ssam_t *sp, context_t *ndot, con
+ &sp->s_matchv[base], 0, sp->s_collseq) == URE_NOMATCH) {
+ RunError(sp, ErrBadURE, cmdp, "Not found", 0);
+ }
+- setcontext(ndot, tmp.c_fp, boff + sp->s_matchv[base].rm_so, boff + sp->s_matchv[base].rm_eo, BGByte);
++ my_setcontext(ndot, tmp.c_fp, boff + sp->s_matchv[base].rm_so, boff + sp->s_matchv[base].rm_eo, BGByte);
+ } else {
+ if (!revsearch(sp, &cmdp->c_u, &tmp, cmdp->c_u.u_subc, &sp->s_matchv[base])) {
+ RunError(sp, ErrBadURE, cmdp, "Not found", 0);
+ }
+- setcontext(ndot, tmp.c_fp, sp->s_matchv[base].rm_so, sp->s_matchv[base].rm_eo, BGByte);
++ my_setcontext(ndot, tmp.c_fp, sp->s_matchv[base].rm_so, sp->s_matchv[base].rm_eo, BGByte);
+ }
+ popmatch(sp, &cmdp->c_u);
+ }
+@@ -828,17 +828,17 @@ setaddress(ssam_t *sp, context_t *ndot,
+ sign = 0;
+ switch(sp->s_progv[cmd].c_gcp->gc_ch) {
+ case '#':
+- setcontext(ndot, dot->c_fp, sp->s_progv[cmd].c_iargv[0], sp->s_progv[cmd].c_iargv[0], BGChar);
++ my_setcontext(ndot, dot->c_fp, sp->s_progv[cmd].c_iargv[0], sp->s_progv[cmd].c_iargv[0], BGChar);
+ return;
+ case '$':
+ n = f_size(dot->c_fp, BGChar);
+- setcontext(ndot, dot->c_fp, n, n, BGChar);
++ my_setcontext(ndot, dot->c_fp, n, n, BGChar);
+ return;
+ case '.':
+- setcontext(ndot, dot->c_fp, dot->c_r.r_from, dot->c_r.r_to, BGChar);
++ my_setcontext(ndot, dot->c_fp, dot->c_r.r_from, dot->c_r.r_to, BGChar);
+ return;
+ case '\'':
+- setcontext(ndot, sp->s_mark.c_fp, sp->s_mark.c_r.r_from, sp->s_mark.c_r.r_to, BGChar);
++ my_setcontext(ndot, sp->s_mark.c_fp, sp->s_mark.c_r.r_from, sp->s_mark.c_r.r_to, BGChar);
+ return;
+ case '"':
+ findfile(sp, ndot, cmd);
+@@ -848,7 +848,7 @@ setaddress(ssam_t *sp, context_t *ndot,
+ RunError(sp, ErrBadLineNumber, &sp->s_progv[cmd], "Bad line number", 0);
+ }
+ n = f_tell(dot->c_fp, BGChar);
+- setcontext(ndot, dot->c_fp, n, (f_seek(dot->c_fp, 1, BGFromHere, BGLine)) ?
++ my_setcontext(ndot, dot->c_fp, n, (f_seek(dot->c_fp, 1, BGFromHere, BGLine)) ?
+ f_tell(dot->c_fp, BGChar) :
+ f_size(dot->c_fp, BGChar), BGChar);
+ return;
+@@ -865,7 +865,7 @@ setaddress(ssam_t *sp, context_t *ndot,
+ sign = -1;
+ break;
+ }
+- setcontext(ndot, lhs.c_fp, lhs.c_r.r_from, lhs.c_r.r_to, BGChar);
++ my_setcontext(ndot, lhs.c_fp, lhs.c_r.r_from, lhs.c_r.r_to, BGChar);
+ rhs = sp->s_progv[cmd].c_rhs;
+ switch(sp->s_progv[rhs].c_gcp->gc_ch) {
+ case '/':
+@@ -876,7 +876,7 @@ setaddress(ssam_t *sp, context_t *ndot,
+ if (!f_seek(ndot->c_fp, n, BGFromBOF, BGChar)) {
+ RunError(sp, ErrInvalidAddr, &sp->s_progv[rhs], "(%ld)", n);
+ }
+- setcontext(ndot, ndot->c_fp, n, n, BGChar);
++ my_setcontext(ndot, ndot->c_fp, n, n, BGChar);
+ break;
+ case '1':
+ n = (sign == 1) ? ndot->c_r.r_to : ndot->c_r.r_from;
+@@ -885,10 +885,10 @@ setaddress(ssam_t *sp, context_t *ndot,
+ }
+ n = sign * sp->s_progv[rhs].c_iargv[0];
+ if (!f_seek(ndot->c_fp, n, BGFromHere, BGLine)) {
+- setcontext(ndot, ndot->c_fp, 0, 0, BGChar);
++ my_setcontext(ndot, ndot->c_fp, 0, 0, BGChar);
+ } else {
+ n = f_tell(ndot->c_fp, BGChar);
+- setcontext(ndot, ndot->c_fp, n, (f_seek(ndot->c_fp, 1, BGFromHere, BGLine)) ?
++ my_setcontext(ndot, ndot->c_fp, n, (f_seek(ndot->c_fp, 1, BGFromHere, BGLine)) ?
+ f_tell(ndot->c_fp, BGChar) :
+ f_size(ndot->c_fp, BGChar), BGChar);
+ }
+@@ -918,7 +918,7 @@ do_comma(ssam_t *sp, context_t *dot, int
+
+ setaddress(sp, &lhs, dot, sp->s_progv[*cmdp].c_lhs);
+ setaddress(sp, &rhs, dot, sp->s_progv[*cmdp].c_rhs);
+- setcontext(&ndot, lhs.c_fp, lhs.c_r.r_from, rhs.c_r.r_to, BGChar);
++ my_setcontext(&ndot, lhs.c_fp, lhs.c_r.r_from, rhs.c_r.r_to, BGChar);
+ *cmdp = sp->s_progv[*cmdp].c_next;
+ return samcmd(sp, &ndot, cmdp);
+ }
+@@ -972,7 +972,7 @@ do_X(ssam_t *sp, context_t *dot, int *cm
+ if (sp->s_fv[i] != (f_t *) NULL) {
+ maketag(buf, sizeof(buf), sp->s_fv[i], sp->s_fcurr);
+ if (ureexec(up, buf, up->u_subc, &sp->s_matchv[base], 0, sp->s_collseq) == URE_SUCCESS) {
+- setcontext(&ndot, sp->s_fv[i], sp->s_fv[i]->f_r.r_from,
++ my_setcontext(&ndot, sp->s_fv[i], sp->s_fv[i]->f_r.r_from,
+ sp->s_fv[i]->f_r.r_to, BGChar);
+ j = sp->s_progv[*cmdp].c_sub;
+ if (!samcmd(sp, &ndot, &j)) {
+@@ -1003,7 +1003,7 @@ do_Y(ssam_t *sp, context_t *dot, int *cm
+ if (sp->s_fv[i] != (f_t *) NULL) {
+ maketag(buf, sizeof(buf), sp->s_fv[i], sp->s_fcurr);
+ if (ureexec(up, buf, up->u_subc, &sp->s_matchv[base], 0, sp->s_collseq) == URE_NOMATCH) {
+- setcontext(&ndot, sp->s_fv[i], sp->s_fv[i]->f_r.r_from,
++ my_setcontext(&ndot, sp->s_fv[i], sp->s_fv[i]->f_r.r_from,
+ sp->s_fv[i]->f_r.r_to, BGChar);
+ j = sp->s_progv[*cmdp].c_sub;
+ if (!samcmd(sp, &ndot, &j)) {
+@@ -1266,7 +1266,7 @@ do_x(ssam_t *sp, context_t *dot, int *cm
+ up->u_subc, &sp->s_matchv[base], eflag, sp->s_collseq) == URE_NOMATCH) {
+ break;
+ }
+- setcontext(&ndot, dot->c_fp, boff + sp->s_matchv[base].rm_so, boff + sp->s_matchv[base].rm_eo, BGByte);
++ my_setcontext(&ndot, dot->c_fp, boff + sp->s_matchv[base].rm_so, boff + sp->s_matchv[base].rm_eo, BGByte);
+ if (ndot.c_r.r_to > dot->c_r.r_to) {
+ break;
+ }
+@@ -1314,7 +1314,7 @@ do_y(ssam_t *sp, context_t *dot, int *cm
+ break;
+ }
+ /* got a match - now do cmd from `from' to here */
+- setcontext(&ndot, dot->c_fp, from, from + sp->s_matchv[base].rm_so, BGByte);
++ my_setcontext(&ndot, dot->c_fp, from, from + sp->s_matchv[base].rm_so, BGByte);
+ if (ndot.c_r.r_to > dot->c_r.r_to) {
+ break;
+ }
+@@ -1333,7 +1333,7 @@ do_y(ssam_t *sp, context_t *dot, int *cm
+ }
+ if (from < dot->c_r.r_to) {
+ (void) f_seek(dot->c_fp, dot->c_r.r_to, BGFromBOF, BGChar);
+- setcontext(&ndot, dot->c_fp, from, f_tell(dot->c_fp, BGByte), BGByte);
++ my_setcontext(&ndot, dot->c_fp, from, f_tell(dot->c_fp, BGByte), BGByte);
+ j = sp->s_progv[*cmdp].c_sub;
+ if (!samcmd(sp, &ndot, &j)) {
+ popmatch(sp, up);
+@@ -1931,7 +1931,7 @@ ssam(ssam_t *sp, char *command, int argc
+ print(sp, cmd, 0);
+ } else {
+ (void) f_seek(sp->s_fcurr, 0, BGFromBOF, BGChar);
+- setcontext(&sp->s_dot, sp->s_fcurr, sp->s_fcurr->f_r.r_from, sp->s_fcurr->f_r.r_to, BGChar);
++ my_setcontext(&sp->s_dot, sp->s_fcurr, sp->s_fcurr->f_r.r_from, sp->s_fcurr->f_r.r_to, BGChar);
+ (void) samcmd(sp, &sp->s_dot, &cmd);
+ if (!popchanges(sp)) {
+ RunError(sp, ErrChangeStack, &sp->s_progv[0], "Corrupted change stack", 0);