示例#1
0
文件: dummynt.c 项目: Distrotech/imap
void dummy_lsub (MAILSTREAM *stream,char *ref,char *pat)
{
  void *sdb = NIL;
  char *s,*t,test[MAILTMPLEN];
  int showuppers = pat[strlen (pat) - 1] == '%';
				/* get canonical form of name */
  if (dummy_canonicalize (test,ref,pat) && (s = sm_read (&sdb))) do
    if (*s != '{') {
      if (pmatch_full (s,test,'\\')) {
	if (pmatch (s,"INBOX")) mm_lsub (stream,NIL,s,LATT_NOINFERIORS);
	else mm_lsub (stream,'\\',s,NIL);
      }
      else while (showuppers && (t = strrchr (s,'\\'))) {
	*t = '\0';		/* tie off the name */
	if (pmatch_full (s,test,'\\')) mm_lsub (stream,'\\',s,LATT_NOSELECT);
      }
    }
  while (s = sm_read (&sdb));	/* until no more subscriptions */
}
示例#2
0
文件: dev.c 项目: exasperation/zinix
int d_read(dev_t d, char *b, long blk)
{
    char m = major(d);

    switch (m)
    {
    case 0 :
        sm_read(d, b, blk);
        break;

    default:
        panic("unknown major device in d_read");
    }
}