9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Presotto <presotto@closedmind.org>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] nedmail.c
Date: Mon,  4 Aug 2003 20:01:49 -0400	[thread overview]
Message-ID: <f63e8b1126d237ed0c1900d2264f161e@plan9.bell-labs.com> (raw)
In-Reply-To: <1450f0a4c5f10e8a355290f54d4f148d@sdgm.net>

[-- Attachment #1: Type: text/plain, Size: 138 bytes --]

ARRGGGHHHHH!  I hate the friggin update command.  I've updated twice now
and the local copy still hasn't made it out.  I'll just to a cp.

[-- Attachment #2: Type: message/rfc822, Size: 4655 bytes --]

From: boyd@sdgm.net
To: 9fans@cse.psu.edu
Subject: [9fans] nedmail.c
Date: Mon, 4 Aug 2003 17:07:15 -0400
Message-ID: <1450f0a4c5f10e8a355290f54d4f148d@sdgm.net>

doesn't look right to me:

brahma% 9fs sources

!Adding key: dom=outside.plan9.bell-labs.com proto=p9sk1
user[boyd]:
password:
!
brahma% ls -l /n/sources/plan9/sys/src/cmd/upas/ned/nedmail.c
--rw-rw-r-- M 2478 glenda sys 42722 Jun 15 14:52 /n/sources/plan9/sys/src/cmd/upas/ned/nedmail.c
brahma% ape/diff -c /n/sources/plan9/sys/src/cmd/upas/ned/nedmail.c src/upas/ned
*** /n/sources/plan9/sys/src/cmd/upas/ned/nedmail.c	Sun Jun 15 14:52:38 2003
--- src/upas/ned/nedmail.c	Mon Jul 28 20:05:26 2003
***************
*** 123,129 ****
  	{ "u",	0,	ucmd,	"u        remove deletion mark" },
  	{ "w",	1,	wcmd,	"w file   store message contents as file" },
  	{ "x",	0,	xcmd,	"x        exit without flushing deleted messages" },
! 	{ "y",	0,	ycmd,	"x        synchronize with mail box" },
  	{ "=",	1,	eqcmd,	"=        print current message number" },
  	{ "|",	1,	pipecmd, "|cmd     pipe message body to a command" },
  	{ "||",	1,	rpipecmd, "|cmd     pipe raw message to a command" },
--- 123,129 ----
  	{ "u",	0,	ucmd,	"u        remove deletion mark" },
  	{ "w",	1,	wcmd,	"w file   store message contents as file" },
  	{ "x",	0,	xcmd,	"x        exit without flushing deleted messages" },
! 	{ "y",	0,	ycmd,	"y        synchronize with mail box" },
  	{ "=",	1,	eqcmd,	"=        print current message number" },
  	{ "|",	1,	pipecmd, "|cmd     pipe message body to a command" },
  	{ "||",	1,	rpipecmd, "|cmd     pipe raw message to a command" },
***************
*** 191,196 ****
--- 191,205 ----
  	noted(NDFLT);
  }

+ char *
+ plural(int n)
+ {
+ 	if (n == 1)
+ 		return "";
+
+ 	return "s";
+ }
+
  void
  main(int argc, char **argv)
  {
***************
*** 270,276 ****
  		n = dir2message(&top, reverse);
  		if(n < 0)
  			sysfatal("can't read %s", s_to_c(top.path));
! 		Bprint(&out, "%d messages\n", n);
  	}

  	notify(catchnote);
--- 279,285 ----
  		n = dir2message(&top, reverse);
  		if(n < 0)
  			sysfatal("can't read %s", s_to_c(top.path));
! 		Bprint(&out, "%d message%s\n", n, plural(n));
  	}

  	notify(catchnote);
***************
*** 1152,1158 ****
  	i = 0;
  	for(; m != nil; m = m->next)
  		i++;
! 	Bprint(&out, "%d messages\n", i);
  }

  Message*
--- 1161,1167 ----
  	i = 0;
  	for(; m != nil; m = m->next)
  		i++;
! 	Bprint(&out, "%d message%s\n", i, plural(i));
  }

  Message*
***************
*** 1488,1494 ****
  		Bprint(&out, "!1 message deleted\n");
  		break;
  	default:
! 		Bprint(&out, "!%d messages deleted\n", deld);
  		break;
  	}

--- 1497,1503 ----
  		Bprint(&out, "!1 message deleted\n");
  		break;
  	default:
! 		Bprint(&out, "!%d message%s deleted\n", deld, plural(deld));
  		break;
  	}

***************
*** 1569,1575 ****

  	n = dir2message(&top, reverse);
  	if(n > 0)
! 		Bprint(&out, "%d new messages\n", n);
  	return m;
  }

--- 1578,1584 ----

  	n = dir2message(&top, reverse);
  	if(n > 0)
! 		Bprint(&out, "%d new message%s\n", n, plural(n));
  	return m;
  }

  reply	other threads:[~2003-08-05  0:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 21:07 boyd
2003-08-05  0:01 ` David Presotto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-29  0:15 boyd

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=f63e8b1126d237ed0c1900d2264f161e@plan9.bell-labs.com \
    --to=presotto@closedmind.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).