⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mm.c

📁 一个功能全面的电子邮件客户端
💻 C
字号:
/* TradeClient <http://tradeclient.sourceforge.net> * $Id: mm.c,v 1.12 2001/03/20 22:19:33 ttabner Exp $ * * Copyright (C) 1999-2000 Bynari Inc. * Copyright (C) 2001 Project TradeClient * * LGPL * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library * General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#include <stdio.h>#include <stdlib.h>#include "puma.h"#ifdef DEBUG#define noshow_error 0#else#define noshow_error 1#endifvoid mm_exists(stream, number)    MAILSTREAM *stream;    unsigned long number;{#if DEBUG > 6  printf( "mm_exists() has been called.\n" ) ;#endif}void mm_expunged(stream, number)    MAILSTREAM *stream;    unsigned long number;{#if DEBUG > 6  printf( "mm_expunged() has been called.\n" ) ;#endif}void mm_flags(stream, number)    MAILSTREAM *stream;    unsigned long number;{#if DEBUG > 6  printf( "mm_flags() has been called.\n" ) ;#endif}void mm_list(stream, delim, name, attrib)    MAILSTREAM *stream;    char delim;    char *name;    long attrib;{        char *box = cut_string (name, '}', 2, 1);        nf_imap_handle_list (GTK_CTREE_NODE (tm_globs->imap_list_node), box);        free(box);#if DEBUG > 6  printf( "mm_list() has been called.\n" ) ;#endif}void mm_lsub(stream, delimiter, name, attributes)    MAILSTREAM *stream;    int delimiter;    char *name;    long attributes;{	char *box = cut_string (name, '}', 2, 1);	nf_imap_handle_folders (GTK_CTREE_NODE (tm_globs->imap_node), box);	free(box);#if DEBUG > 6  printf( "mm_lsub() has been called.\n" ) ;#endif}void mm_notify(stream, string, errflg)    MAILSTREAM *stream;    char *string;    long errflg;{#if DEBUG > 6  printf( "mm_notify() has been called.\n" ) ;#endif    mm_log(string, errflg);}void mm_log(string, errflg)    char *string;    long errflg;{    if(noshow_error)      return;#if DEBUG > 6  printf( "mm_log('%s') has been called.\n", string ) ;#endif    switch(errflg){        case BYE:      case NIL:	break;      case PARSE:	fprintf(stderr, "PARSE: %s\n", string);	break;      case WARN:	fprintf(stderr, "WARN: %s\n", string);	break;      case ERROR:	fprintf(stderr, "ERROR: %s\n", string);	break;      default:	fprintf(stderr, "%s\n", string);	break;    }}void mm_login(mb, username, password, trial)    NETMBX *mb;    char *username;    char *password;    long trial;{	 PopAccount *seek=seek_popaccount(mmpopid);	 strcpy(username,seek->puser);	 strcpy(password,seek->ppasswd);#if DEBUG > 6  printf( "mm_login() has been called.\n" ) ;#endif}void mm_critical(stream)    MAILSTREAM *stream;{#if DEBUG > 6  printf( "mm_critical() has been called.\n" ) ;#endif}void mm_nocritical(stream)    MAILSTREAM *stream;{#if DEBUG > 6  printf( "mm_nocritical() has been called.\n" ) ;#endif}long mm_diskerror(stream, errcode, serious)    MAILSTREAM *stream;    long errcode;    long serious;{#if DEBUG > 6  printf( "mm_diskerror() has been called.\n" ) ;#endif    return T;}void mm_fatal(string)    char *string;{#if DEBUG > 6  printf( "mm_fatal() has been called.\n" ) ;#endif    fprintf(stderr, "%s\n", string);}void mm_searched(stream, msgno)    MAILSTREAM *stream;    unsigned long msgno;{	extern GList *nf_imap_unseen;	nf_imap_unseen = g_list_append (nf_imap_unseen, (gpointer)abs (msgno));#if DEBUG > 6  printf( "mm_searched() has been called.\n" ) ;#endif}void mm_status(stream, mailbox, status)    MAILSTREAM *stream;    char *mailbox;    MAILSTATUS *status;{  nf_imap_handle_counts (GTK_CTREE_NODE (tm_globs->imap_node), abs (status->unseen), abs (status->messages));#if DEBUG > 6  printf( "mm_status() has been called.\n" ) ;  printf (" Mailbox %s",mailbox);  if (status->flags & SA_MESSAGES) printf (", %lu messages",status->messages);  if (status->flags & SA_RECENT) printf (", %lu recent",status->recent);  if (status->flags & SA_UNSEEN) printf (", %lu unseen",status->unseen);  if (status->flags & SA_UIDVALIDITY) printf (", %lu UID validity",                                              status->uidvalidity);  if (status->flags & SA_UIDNEXT) printf (", %lu next UID",status->uidnext);  printf ("\n");#endif  return ;}void mm_dlog(string)    char *string;{#if DEBUG > 6  printf( "mm_dlog() has been called.\n" ) ;#endif    fprintf(stderr, "%s\n", string);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -