sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: pj@sam.engr.sgi.com (Paul Jackson)
To: sam-fans@hawkwind.utcs.toronto.edu
Subject: Applying old samx patch to newer sam?
Date: Wed, 22 Mar 2000 22:30:41 -0500	[thread overview]
Message-ID: <200003230057.QAA92854@sam.engr.sgi.com> (raw)

Summary:

    The only samx patch I could find was old, and didn't entirely
    apply to the latest sam code.  But it (the samkey features)
    seem to work.  Should I worry?  Is there a more recent
    samx patch?

Background:

    I've just stumbled onto sam and samx, while casting about for
    a 'decent' editor for use on Linux, Irix and occassionally
    Windows.

    For the last few years, I had used 'ed' for global work,
    and Rick Davis' jot (aka zip) for mouse work.  But jot only
    runs on Irix, and now I am working more with Linux.  So
    off to look for another editor.

    Thanks especially to all who have contributed to this email
    list over the years -- the ~500 messages in the archives
    were very useful in getting up to speed quickly.
    
    Sam and samx are great - I am glad I found them.

Details:

    The only samx patches I could find were:
    
	Samx Version 2: Extensions to the Unix/X11 Sam Editor
	-----------------------------------------------------
	Ed Kubaitis (ejk@uiuc.edu)
	17 April 1993
    
    from:

	ftp://ftp.funet.fi/pub/unix/editors/sam/samx2/

    I've managed to apply these patches to the most recent sam
    that I could find, circa April 1999, under:

	ftp://ftp.demon.co.uk/pub/unix/plan9/sam-9libs.*

    and the result seems to work, after a little futzing around,
    _except_ that the following piece of the patch seems to be
    quite inapplicable.

    The old samx patch would change the file strwidth.c thusly:
    
	***************
	*** 13,18 ****
		l = 0;
		n = f->n;
		info = f->info;
		if(s)
			while(c = *s++)
				if(c < n)
	--- 13,28 ----
		l = 0;
		n = f->n;
		info = f->info;
	+       if (Keydefs && s) {
	+               while (*s) {
	+                       unsigned short r;
	+                       s += chartorune(&r, s);
	+                       if (r >= n || info[r].width == 0)
	+                               r = 0x7e;
	+                       l += info[r].width;
	+               }
	+               return Pt(l,f->height);
	+       }
		if(s)
			while(c = *s++)
				if(c < n)

Should I worry that I could find no place resembling the above
location to add this code?


=======================================================================
I won't rest till it's the best ...	   Software Production Engineer
Paul Jackson (pj@sgi.com; pj@usa.net) 3x1373 http://sam.engr.sgi.com/pj


             reply	other threads:[~2000-03-23  6:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-23  3:30 Paul Jackson [this message]
2000-03-23 10:26 Bengt Kleberg
2000-03-23 17:03 Paul Jackson
2000-03-24 12:32 ` Ed Kubaitis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003230057.QAA92854@sam.engr.sgi.com \
    --to=pj@sam.engr.sgi.com \
    --cc=sam-fans@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).