9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Micah Stetson" <micah@stetsonnet.org>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] quote file name
Date: Fri, 28 Jul 2006 10:52:30 -0700	[thread overview]
Message-ID: <b3b4f6f30607281052u2aed68a8n407a9cc3e49578f4@mail.gmail.com> (raw)
In-Reply-To: <b94cd358e11d3ffb43628c10bc786087@quanstro.net>

> in addition, one would need to change the string from
>         "`^#*[]=|\\?${}()'<>&;"         (char*)
> to
>         L"`^#*[]=|\\?${}()'<>&;"        (Rune*)
> i was trying to avoid that.  i think it would make p9p harder.
> (i dont trust gcc with L"".)

No, utfrune finds a rune in a UTF-8 string (char *).  R is already a
Rune (even though it's declared int), so nothing needs to change,
except to replace strchr with utfrune.  Utfrune starts like this:

char*
utfrune(char *s, long c)
{
	...
	if(c < Runesync)		/* not part of utf sequence */
		return strchr(s, c);
	...

Which is exactly what you were doing (Runesync == 0x80).

Micah


  reply	other threads:[~2006-07-28 17:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-09 10:24 arisawa
2006-07-09 10:53 ` quanstro
2006-07-10  0:46   ` quanstro
2006-07-28 12:41     ` arisawa
2006-07-28 12:48       ` erik quanstrom
2006-07-28 15:09         ` Micah Stetson
2006-07-28 15:33           ` erik quanstrom
2006-07-28 17:52             ` Micah Stetson [this message]
2006-07-28 18:19               ` erik quanstrom
2006-07-28 19:16                 ` Micah Stetson
2006-07-28 15:26         ` arisawa
2006-07-28 15:49           ` erik quanstrom
2006-07-28 15:51           ` erik quanstrom
2006-07-28 13:23       ` "Nils O. Selåsdal"
2006-07-28 19:37         ` geoff

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=b3b4f6f30607281052u2aed68a8n407a9cc3e49578f4@mail.gmail.com \
    --to=micah@stetsonnet.org \
    --cc=9fans@cse.psu.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).