From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sgi.com ([192.48.153.1]) by hawkwind.utcs.utoronto.ca with SMTP id <25894>; Thu, 23 Mar 2000 01:25:43 -0500 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id QAA01232 for <@external-mail-relay.sgi.com:sam-fans@hawkwind.utcs.toronto.edu>; Wed, 22 Mar 2000 16:57:49 -0800 (PST) mail_from (pj@sam.engr.sgi.com) Received: from sam.engr.sgi.com (sam.engr.sgi.com [163.154.6.37]) by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id QAA10957 for <@cthulhu.engr.sgi.com:sam-fans@hawkwind.utcs.toronto.edu>; Wed, 22 Mar 2000 16:57:48 -0800 (PST) mail_from (pj@sam.engr.sgi.com) Received: (from pj@localhost) by sam.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) id QAA92854 for sam-fans@hawkwind.utcs.toronto.edu; Wed, 22 Mar 2000 16:57:19 -0800 (PST) From: pj@sam.engr.sgi.com (Paul Jackson) Message-Id: <200003230057.QAA92854@sam.engr.sgi.com> To: sam-fans@hawkwind.utcs.toronto.edu Subject: Applying old samx patch to newer sam? Date: Wed, 22 Mar 2000 22:30:41 -0500 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