9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa <arisawa@ar.aichi-u.ac.jp>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] DEL code in file name
Date: Sun, 10 Mar 2013 08:41:29 +0900	[thread overview]
Message-ID: <E0B35B4F-C433-4DB4-BE43-07F78CFC6ADA@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <c4d896f804a41d50b8f894d4e4f4fd57@brasstown.quanstro.net>

thanks erik,

some careless misses.

int
checkname(char *s)
{
	int i, n;
-	Rune c;
+	Rune r;

	if(s == nil || *s == 0)
		return Ename;
	if(*s == '.' && (s[1] == 0 || (s[1] == '.' && s[2] == 0)))
		return Edot;
	for(i = 0;; i += n) {
-		n = chartorune(&r, s);
+		n = chartorune(&r, &s[i]);
		if(i+n >= NAMELEN)
			return Etoolong;
		if(r == 0)
			return 0;
		if(n == 1 && r == Runeerror)
			return Ename;
-		if(r <= 040 || r == 0x7f)
+		if(r < 040 || r == 0x7f)
			return Ename;
	}
}




      reply	other threads:[~2013-03-09 23:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-09 13:38 arisawa
2013-03-09 14:12 ` erik quanstrom
2013-03-09 23:41   ` arisawa [this message]

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=E0B35B4F-C433-4DB4-BE43-07F78CFC6ADA@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@9fans.net \
    /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).