From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17750 invoked from network); 11 May 2022 19:23:10 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 11 May 2022 19:23:10 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob0.topicbox.com (Postfix) with ESMTP id 0888620969 for ; Wed, 11 May 2022 15:23:09 -0400 (EDT) (envelope-from bounce.mM738ed39a9ebb9a95372a4aad.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 03EF44CCBFBC; Wed, 11 May 2022 15:23:09 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=prosimetrum.com; spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:date:from:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding:list-help :list-id:list-post:list-subscribe:reply-to:list-unsubscribe; s= sysmsg-1; t=1652296988; bh=WK/VYidMZblPa+zNYLW38dm0CfGKgNBlPy/WB 4qAink=; b=kRKQ8cgIHZVWVgOk4HaIQGJreLhYmqwuAv6/+bJNzQZ3FK7qWPYgW oXRdtcT6z0Z8k8wq7pOLAMo9d7cuJqpUNySjqBSc2vh7nWgQLgZEj/bxN60r1ynT c4F2SFm6mSIewCAd6krd62r4JwIKfsMtbUvxByyVaxhd0gZRh+F1Ak= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1652296988; b=mW3/AzcUKieYGafPbTEkZa1GRDAvMwt3br8uuyYjpJDUbnjSum Htkq+EdO+JtEZRqtMrRNdG91ujFvtTog0h0w/piD/pc4QxLdgajsgMKwzs5jYTKW gHDUjPhjRNZAlTbif56gmGvyu65nTxGr0mtGSVhVZalk5Podq3HQ8astY= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=prosimetrum.com; spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=prosimetrum.com; iprev=pass smtp.remote-ip=125.236.209.157 (asquith.prosimetrum.com); spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=asquith.prosimetrum.com policy.ptr=asquith.prosimetrum.com; x-return-mx=pass header.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-return-mx=pass smtp.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=message-id :date:from:to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:list-unsubscribe; s=dkim-1; bh=aQM88rfO ANVlKEKuJJplr+weNpi2iW3aRe2t0MhZde8=; b=TMP5au8JjHUIQoEaSVlHRj0c Mh0eIVT6hsldmX2JPY4fdF5PjW43m4iaN4PGGYDGSCYKwVDN4bRcOoxS8bM0vZOL u8yiW+39ET3ymqF7ybdnS7i/yUvvbVcqlx3hkocheOJMeddpiADQeziHVFjsPM2I nR1+7MNhABvzTiZRPRQ= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id B78BA14817A3 for <9fans@9fans.net>; Wed, 11 May 2022 15:22:49 -0400 (EDT) (envelope-from umbraticus@prosimetrum.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 82E71C30225; Wed, 11 May 2022 15:22:49 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1652296969; b=aFimYK2pucRgNADUeXlzBEduMUg6VISyBb5+lIYgQ+9y/mSEhf VQiAh9v+Ol6rjvgyFcMGZ+32dT85R37GPJ4PzHaU0D60egfI8WFCwWhWVobojpaW 5ZhYTKXCFZpkJi3j6I6tyVSPIiTULBIw2vx2dY4EJSOOXFX0xLUtLr4xTrQhf0RY E4QJ2CY4xsU9j148TvaxraH8Q+6jCixm1SvAhGWculN5DsYMwxZ11zDE3JcyOikN ePhVKGh0VPX4o5EjdZUHbNuwIqd2yQnvT5G+nraiz7vaiGncBNEAZc6R0lbYpxcu AI18c0G3HBjQGYz7iOPHWN3Lc9mk4d0Gfd7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:date:from:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding; s=arcseal; t=1652296969; bh=E6F+Y29AcIK9DMr4pUnHvO2lF8DQuP0PvWPY2VieGhU=; b= LcV81/zpTMvscw3G9KVhYKWZhEfwg+GSTHyySceSPWp+6JzK3IdU7mAaONUmWWY2 m12BCqYl2hu1f5I2gYjZmeRipTTmec3vagHuoetMN6MlXJvW7VxpqCSDZUBjhq3z Eo4JyvogiDTRsCnUuQYRZF1lo54JkPBlUQiEl7acwXmQRgTIiUp/sC6pDjkOC9ZJ a2LLaoICaA5mfrP4MuEeysf4lyaBpm8mqQvA3ZgDO79cE0gcw8UAv7DtWfj3wG8m Wj1Y3cHelUmJTuz2C46WKvCbzpZuNMz/LfNLP+8mmmv7UWs8CO9tf/5fV9Vftubz S/rqp7VGudWAG84dOFn93A== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=prosimetrum.com; iprev=pass smtp.remote-ip=125.236.209.157 (asquith.prosimetrum.com); spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=asquith.prosimetrum.com policy.ptr=asquith.prosimetrum.com; x-return-mx=pass header.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-return-mx=pass smtp.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvfedrgeehgddufeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkfffhvf fujgggtgfgsehtkeejtddttdejnecuhfhrohhmpehumhgsrhgrthhitghushesphhrohhs ihhmvghtrhhumhdrtghomhenucggtffrrghtthgvrhhnpeehudelteefieekjeduffeltd evhefgvdefjedvtdejheejgeefheffvdeihfejffenucfkphepuddvhedrvdefiedrvddt ledrudehjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvd ehrddvfeeirddvtdelrdduheejpdhhvghloheprghsqhhuihhthhdrphhrohhsihhmvght rhhumhdrtghomhdpmhgrihhlfhhrohhmpeeouhhmsghrrghtihgtuhhssehprhhoshhimh gvthhruhhmrdgtohhmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (prosimetrum.com: 125.236.209.157 is authorized to use 'umbraticus@prosimetrum.com' in 'mfrom' identity (mechanism 'mx' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="umbraticus@prosimetrum.com"; helo=asquith.prosimetrum.com; client-ip=125.236.209.157 Received: from asquith.prosimetrum.com (asquith.prosimetrum.com [125.236.209.157]) by tb-mx1.topicbox.com (Postfix) with ESMTP for <9fans@9fans.net>; Wed, 11 May 2022 15:22:47 -0400 (EDT) (envelope-from umbraticus@prosimetrum.com) Message-ID: <476022036E2F79108FF992088E604799@prosimetrum.com> Date: Thu, 12 May 2022 07:22:45 +1200 From: umbraticus@prosimetrum.com To: 9fans@9fans.net Subject: Re: [9fans] Deleting lines in sam - d In-Reply-To: <16522963000.08D5B.40230@composer.9fans.topicbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: c1702976-d15f-11ec-83bd-d10db42f8b13 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UYzVjNDkyMDc3YTYxMjc1Yy1NNzM4ZWQzOWE5ZWJiOWE5NTM3MmE0?= =?UTF-8?B?YWFkPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M738ed39a9ebb9a95372a4aad:1:QS-dyiG3kVOkS0UFZjzj3vWd_wegFN3RI7rRFZUvnhU =3D prints line number 3,7d deletes some lines Setting and working with the mark may also suit your problem find a place, press k, find another place, then ',.d or .,' deletes everything in between. Multiple marks =C3=A0 la ed would be a nice addition to sam. umbraticus P.S. Here's a patch to make =3D more sensible (ie. plumbable): --- a/sys/man/1/sam Wed Apr 27 19:24:07 2022 +++ b/sys/man/1/sam Sat Apr 16 02:53:35 2022 @@ -403,10 +403,10 @@ Set dot. .TP .B =3D -Print the line address and character address of the range. +Print the file name and line address of the range. .TP .B =3D# -Print just the character address of the range. +Print the file name and character address of the range. .PD .SS File commands .PD 0 --- a/sys/src/cmd/sam/sam.c Wed Apr 27 19:24:07 2022 +++ b/sys/src/cmd/sam/sam.c Sat Apr 16 02:53:35 2022 @@ -688,11 +688,27 @@ } =20 void -printposn(File *f, int charsonly) +printposn(File *f, int chars) { Posn l1, l2; + char *s; =20 - if(!charsonly){ + if(f->name.s[0]){ + if(f->name.s[0]!=3D'/'){ + getcurwd(); + s =3D Strtoc(&curwd); + dprint("%s", s); + free(s); + } + s =3D Strtoc(&f->name); + dprint("%s:", s); + free(s); + } + if(chars){ + dprint("#%lud", addr.r.p1); + if(addr.r.p2 !=3D addr.r.p1) + dprint(",#%lud", addr.r.p2); + }else{ l1 =3D 1+nlcount(f, (Posn)0, addr.r.p1); l2 =3D l1+nlcount(f, addr.r.p1, addr.r.p2); /* check if addr ends with '\n' */ @@ -701,11 +717,7 @@ dprint("%lud", l1); if(l2 !=3D l1) dprint(",%lud", l2); - dprint("; "); } - dprint("#%lud", addr.r.p1); - if(addr.r.p2 !=3D addr.r.p1) - dprint(",#%lud", addr.r.p2); dprint("\n"); } ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tc5c492077a61275c-M738ed= 39a9ebb9a95372a4aad Delivery options: https://9fans.topicbox.com/groups/9fans/subscription