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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8119 invoked from network); 20 Feb 2023 17:24:14 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 20 Feb 2023 17:24:14 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob0.topicbox.com (Postfix) with ESMTP id 7654832F7B for ; Mon, 20 Feb 2023 12:24:13 -0500 (EST) (envelope-from bounce.mMe2fd07d75186728fa9b3aae1.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 700D7DF2B85; Mon, 20 Feb 2023 12:24:13 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=D1ZoDR/1 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=23hiro@gmail.com smtp.helo=mail-vs1-f52.google.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=mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:list-help:list-id:list-post :list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1676913853; bh=/3lZqnJeTLJbtZ9j YRW5xLDCFU54ZeC7pJMSDrXoz5A=; b=Iq9eEk7aldSoAdi64V7lJ5Vo4GllD943 M9XxyKb4AfAgB2ttiXNCZxd2Ho/oCntBkqj877vX0///bzDKgyRMu12oig/W/0KD ynrvlZiPNVtPijgm8jDHy33PsTYTxXyqdESH0JTUZeU4WaGqJsrutI0u3TwNQuD9 p3sjimqcbzo= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1676913853; b=MCuXUFnHUcdwH55CVeFc43F5KGkB3pfpekCoAKiqPTjzWZHySv RX80Ys8FzI2IXWwlgPDNUKtiAdDy2cf54L4SznrLxq9RS6w0DRRUon3La5Jc9fn9 dTcNpi2+AESOfhyjd7GtDw9KmewaNuyW+dW0vBv+IQ96fy/seyHlmr1Ik= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=D1ZoDR/1 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=23hiro@gmail.com smtp.helo=mail-vs1-f52.google.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-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=D1ZoDR/1 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.217.52 (mail-vs1-f52.google.com); spf=pass smtp.mailfrom=23hiro@gmail.com smtp.helo=mail-vs1-f52.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=p741JaTS; x-me-sender=none; x-ptr=pass smtp.helo=mail-vs1-f52.google.com policy.ptr=mail-vs1-f52.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:in-reply-to:references:from:date:message-id:subject :to:content-type:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; t=1676913853; x=1677000253; bh=XGR2z+zd/TXdGTn3RB3Y5MRbRpmReDFa ZueXgdBNDs0=; b=qg6g044QLhSYlvs0uVjY0VcvDB2o0E21mtuMp01wzBOfSvoO F5IhEI2jZ5BQerty0tBPuZxBgDnWCY9Xor4yW37MqWKfz2f7oRxJVWaqQFBAoEqf tnARtsYS6DOldLbrf0FrretJ1FEuXkrrCrwN2EhZXL9vsd1eVO16eFvHgWs= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id E21ABF55C2E for <9fans@9fans.net>; Mon, 20 Feb 2023 12:23:51 -0500 (EST) (envelope-from 23hiro@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 53C1E1A8A37; Mon, 20 Feb 2023 12:23:51 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1676913831; b=V/NXiizTVvP2rao/jRETnQVUpnKJm3k7Ln03MZeH6saFjMny1L SYqwUNGOD78A+tIPycb65bIMX5NB3JuavzaHdpm/T6QA9TSXj7T5i7dGsWKfqGrl Mj0JJkk8nDjXHI42IfnwJFF839nnrEw8Jr1ldBpLTmSV8tV41upbVd+uPTpqNM5q XSdSiKUohOqExoSpvZoztoPxDGDxrnqf8utDLQABL+UItdXBLazhSN4X4jftS22P BcoxYOaqVML15QHAVSgBvEg5tvnTIJQYKoSSCpdYHG2BkB9mglYedYVUQz0bJt+7 Q0Mu/DQtRNph/Qr2wFLBBY5ZLt+JYxuRvHHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=arcseal; t=1676913831; bh=eSooT+FsZHp8Av1Q4hBMemKB6MXMLZSf4n8qER0bC5g=; b=uOvYOSMSOrJT B2ANnR9bm0I7noYulePGhlrYnBfq5qzwVN5pUiQ4J9yU9iSurjrBxVw9MtdLZAD6 8AyEbvn5N72cLn4rvVFZqR5NH1bqYXxUM/kRNBTlZnHy/WPj+Lpye9gDpcfC0H5z 7jSjNETW+VDPTZYHB0RxX/XNwUGIADm9H6URsgIB69YG9+lvseT9JYf3OpVcft7q xPwIt1PBvaK8vUFZiP0qdp1Xw1dvck2Nmc8x/dFkF6jojE1UitBQuLW5GEPzCs11 pDWu07N4H6pwgxWX/wPvRW8elX+d4W57vWBG6u9gxN/wkVrWfHGt7m04cHse4Q1Z wjWT3suyyg== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=D1ZoDR/1 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.217.52 (mail-vs1-f52.google.com); spf=pass smtp.mailfrom=23hiro@gmail.com smtp.helo=mail-vs1-f52.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=p741JaTS; x-me-sender=none; x-ptr=pass smtp.helo=mail-vs1-f52.google.com policy.ptr=mail-vs1-f52.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejhedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpegjfhfhff fkuffvtgesthdtredttddtjeenucfhrhhomhephhhirhhouceovdefhhhirhhosehgmhgr ihhlrdgtohhmqeenucggtffrrghtthgvrhhnpedtveekveffvdeiieetuedvgffhudekhf eltdevhefgfeekleffheelhedtvdeigfenucffohhmrghinhepthhophhitggsohigrdgt ohhmnecukfhppedvtdelrdekhedrvddujedrhedvnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehinhgvthepvddtledrkeehrddvudejrdehvddphhgvlhhopehmrghi lhdqvhhsuddqfhehvddrghhoohhglhgvrdgtohhmpdhmrghilhhfrhhomhepoedvfehhih hrohesghhmrghilhdrtghomheq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use '23hiro@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="23hiro@gmail.com"; helo=mail-vs1-f52.google.com; client-ip=209.85.217.52 Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Mon, 20 Feb 2023 12:23:51 -0500 (EST) (envelope-from 23hiro@gmail.com) Received: by mail-vs1-f52.google.com with SMTP id e5so1964612vsl.11 for <9fans@9fans.net>; Mon, 20 Feb 2023 09:23:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eSooT+FsZHp8Av1Q4hBMemKB6MXMLZSf4n8qER0bC5g=; b=p741JaTS04FlHgz+NmDBZORGtHneM7Gc1FYBXGGcOSSCoJEAVLjVbMozoUdkVlq1IJ L68AkKwPJ0b1e2enJwmwQbNzP8KcHhWhhCfhSuiBR3eEyWFZmUeA3LvJIK7YBjwTrzxI qoyj6qdI4YlWeACGcWyDlh6Fvdfz8GJ+0Szyzic5OYlscOZNRMN6EGv2TpRG6cGv/hI3 pYUAutEls8ouHxh48F0aV8LNcNrSZwFXmPpYXbG1PsPT2yV71tFe7zA7cVqBVroLkTO1 nZUceUoq5bHFVRh0aM9SkoOxzAOpccE3L78rfFazoLnDi1yO0WujceEMnCeTgTh1Ps5J niWw== X-Gm-Message-State: AO0yUKXNG6cCGRcKSXi53BIF4OaeF8dx4bfI6Ki5wkW5QApXzCchvTbz 3NMpunaqG1hN9UQU+oH/bVo07puKV+kpSV3WQnRwv7tc X-Google-Smtp-Source: AK7set/etPGv8ppS/cfsm591RzjVQLsWdqenVSOqmRvbjy6nyZsky5cQh4ur41Vhkr0A6O5OWGJ3wRDYYrUBYzqQa+Q= X-Received: by 2002:a67:eb15:0:b0:3e9:ed58:dcfc with SMTP id a21-20020a67eb15000000b003e9ed58dcfcmr471261vso.49.1676913830651; Mon, 20 Feb 2023 09:23:50 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ab0:3d82:0:0:0:0:0 with HTTP; Mon, 20 Feb 2023 09:23:50 -0800 (PST) In-Reply-To: <5032d5dd-7583-64f5-b3ab-284d2c4c8290@sdf.org> References: <5032d5dd-7583-64f5-b3ab-284d2c4c8290@sdf.org> From: hiro <23hiro@gmail.com> Date: Mon, 20 Feb 2023 18:23:50 +0100 Message-ID: Subject: Re: [9fans] Acme: support spaces in file|dir names To: 9fans <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 5b3df92a-b143-11ed-8bf0-ee8fd6c721dd Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UYzFkOWQ5Y2EzYTk0ZTI4NS1NZTJmZDA3ZDc1MTg2NzI4ZmE5YjNh?= =?UTF-8?B?YWUxPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: quoted-printable List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Me2fd07d75186728fa9b3aae1:1:i6xuUF5MBrJvCWZBweS40uREP-XrlDvYokAlOds1G7o 9front has a p9p version? i was not aware... can you link to it? On 2/20/23, adr wrote: > Hi, >=20 > this patch adds code from p9p to support spaces in file or dir > names. I use the 9front version because it has been mantained, but > there are more fixes in p9p to be imported. >=20 > adr > diff -Nur /n/9front/sys/src/cmd/acme/fns.h /sys/src/cmd/acme/fns.h > --- /n/9front/sys/src/cmd/acme/fns.h Mon Jul 11 20:01:08 2022 > +++ /sys/src/cmd/acme/fns.h Mon Feb 20 15:23:42 2023 > @@ -90,6 +90,7 @@ > void flushwarnings(void); > long nlcount(Text*, long, long, long*); > long nlcounttopos(Text*, long, long, long); > +Rune* parsetag(Window*, int, int*); >=20 > #define runemalloc(a) (Rune*)emalloc((a)*sizeof(Rune)) > #define runerealloc(a, b) (Rune*)erealloc((a), > (b)*sizeof(Rune)) > diff -Nur /n/9front/sys/src/cmd/acme/look.c /sys/src/cmd/acme/look.c > --- /n/9front/sys/src/cmd/acme/look.c Mon Jul 11 20:01:08 2022 > +++ /sys/src/cmd/acme/look.c Mon Feb 20 15:47:24 2023 > @@ -397,9 +397,9 @@ > Runestr > dirname(Text *t, Rune *r, int n) > { > - Rune *b, c; > - uint m, nt; > - int slash; > + Rune *b; > + uint nt; > + int slash, i; > Runestr tmp; >=20 > b =3D nil; > @@ -410,15 +410,13 @@ > goto Rescue; > if(n>=3D1 && r[0]=3D=3D'/') > goto Rescue; > - b =3D runemalloc(nt+n+1); > - bufread(t->w->tag.file, 0, b, nt); > + b =3D parsetag(t->w, n, &i); > slash =3D -1; > - for(m=3D0; m - c =3D b[m]; > - if(c =3D=3D '/') > - slash =3D m; > - if(c=3D=3D' ' || c=3D=3D'\t') > + for(i--; i >=3D 0; i--){ > + if(b[i] =3D=3D '/'){ > + slash =3D i; > break; > + } > } > if(slash < 0) > goto Rescue; > @@ -502,7 +500,7 @@ > if(nname =3D=3D -1) > nname =3D n; > for(i=3D0; i - if(!isfilec(r[i])) > + if(!isfilec(r[i]) && r[i] !=3D ' ') > goto Isntfile; > /* > * See if it's a file name in <>, and turn that into an include > diff -Nur /n/9front/sys/src/cmd/acme/wind.c /sys/src/cmd/acme/wind.c > --- /n/9front/sys/src/cmd/acme/wind.c Mon Jul 11 20:01:08 2022 > +++ /sys/src/cmd/acme/wind.c Mon Feb 20 15:20:37 2023 > @@ -109,14 +109,26 @@ > return rr - r; > } >=20 > +int > +delrunepos(Window *w) > +{ > + Rune *r; > + int i; > + > + r =3D parsetag(w, 0, &i); > + free(r); > + i +=3D 2; > + if(i >=3D w->tag.file->nc) > + return -1; > + return i; > +} > + > void > movetodel(Window *w) > { > int n; > - > - n =3D tagrunepos(w, delcmd); > - free(delcmd); > - delcmd =3D nil; > + > + n =3D delrunepos(w); > if(n < 0) > return; > moveto(mousectl, addpt(frptofchar(&w->tag, n), Pt(4, > w->tag.font->height-4))); > @@ -141,7 +153,7 @@ >=20 > if(!w->tagexpand) { > /* use just as many lines as needed to show the Del */ > - n =3D tagrunepos(w, delcmd); > + n =3D delrunepos(w); > if(n < 0) > return 1; > p =3D subpt(frptofchar(&w->tag, n), w->tag.r.min); > @@ -412,11 +424,7 @@ >=20 > /* w must be committed */ > n =3D w->tag.file->nc; > - r =3D runemalloc(n); > - bufread(w->tag.file, 0, r, n); > - for(i=3D0; i - if(r[i]=3D=3D' ' || r[i]=3D=3D'\t') > - break; > + r =3D parsetag(w, 0, &i); > for(; i if(r[i] =3D=3D '|') > break; > @@ -433,6 +441,38 @@ > textsetselect(&w->tag, w->tag.q0, w->tag.q1); > } >=20 > +Rune* > +parsetag(Window *w, int extra, int *len) > +{ > + static Rune Ldelsnarf[] =3D { ' ', 'D', 'e', 'l', ' ', 'S', 'n', = 'a', > 'r', 'f', 0 }; > + static Rune Lspacepipe[] =3D { ' ', '|', 0 }; > + static Rune Ltabpipe[] =3D { '\t', '|', 0 }; > + int i; > + Rune *r, *p, *pipe; > + > + r =3D runemalloc(w->tag.file->nc+extra+1); > + bufread(w->tag.file, 0, r, w->tag.file->nc); > + r[w->tag.file->nc] =3D '\0'; > + > + /* > + * " |" or "\t|" ends left half of tag > + * If we find " Del Snarf" in the left half of the tag > + * (before the pipe), that ends the file name. > + */ > + pipe =3D runestrstr(r, Lspacepipe); > + if((p =3D runestrstr(r, Ltabpipe)) !=3D nil && (pipe =3D=3D nil |= | p < > pipe)) > + pipe =3D p; > + if((p =3D runestrstr(r, Ldelsnarf)) !=3D nil && (pipe =3D=3D nil = || p < > pipe)) > + i =3D p - r; > + else { > + for(i=3D0; itag.file->nc; i++) > + if(r[i]=3D=3D' ' || r[i]=3D=3D'\t') > + break; > + } > + *len =3D i; > + return r; > +} > + > void > winsettag1(Window *w) > { > @@ -445,12 +485,7 @@ > /* there are races that get us here with stuff in the tag cache, = so > we take extra care to sync it */ > if(w->tag.ncache!=3D0 || w->tag.file->mod) > wincommit(w, &w->tag); /* check file name; also guarante= es > we can modify tag contents */ > - old =3D runemalloc(w->tag.file->nc+1); > - bufread(w->tag.file, 0, old, w->tag.file->nc); > - old[w->tag.file->nc] =3D '\0'; > - for(i=3D0; itag.file->nc; i++) > - if(old[i]=3D=3D' ' || old[i]=3D=3D'\t') > - break; > + old =3D parsetag(w, 0, &i); > if(runeeq(old, i, w->body.file->name, w->body.file->nname) =3D=3D > FALSE){ > textdelete(&w->tag, 0, i, TRUE); > textinsert(&w->tag, 0, w->body.file->name, > w->body.file->nname, TRUE); > @@ -458,7 +493,6 @@ > old =3D runemalloc(w->tag.file->nc+1); > bufread(w->tag.file, 0, old, w->tag.file->nc); > old[w->tag.file->nc] =3D '\0'; > - w->tagsafe =3D FALSE; > } > new =3D runemalloc(w->body.file->nname+100); > i =3D 0; > @@ -572,11 +606,7 @@ > textcommit(f->text[i], FALSE); /* no-op for t */ > if(t->what =3D=3D Body) > return; > - r =3D runemalloc(w->tag.file->nc); > - bufread(w->tag.file, 0, r, w->tag.file->nc); > - for(i=3D0; itag.file->nc; i++) > - if(r[i]=3D=3D' ' || r[i]=3D=3D'\t') > - break; > + r =3D parsetag(w, 0, &i); > if(runeeq(r, i, w->body.file->name, w->body.file->nname) =3D=3D F= ALSE){ > seq++; > filemark(w->body.file); > @@ -611,11 +641,11 @@ > r =3D runerealloc(r, n+1); > r[n] =3D 0; > } > + free(a); > if((d->qid.type&QTDIR) =3D=3D 0){ > free(d); > warning(nil, "%s: not a directory\n", a); > free(r); > - free(a); > return; > } > free(a); ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tc1d9d9ca3a94e285-Me2fd0= 7d75186728fa9b3aae1 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription