?? teste.cc
字號:
/* Name : teste** File : teste.cc** Author : KDE** Description : Permet de tester kkmail sans connexion**** Version : ** Note : ** Mail : ** Copyright : */#include <stdio.h>#include <cstring>#include <iostream>#include <fstream>#include <pwd.h>#include <unistd.h>#include "inout.h"#include "lib.h"#include "mail.h"#include "mime.h"#include "pop.h"#include "smtp.h"using namespace std;bool Debug = false;int nbmsg=35;int main (int argc, char const* argv[]){ int Number; char n[4]; char Com[50]; char Log[50]; char* Pass; system("clear"); TITLE(); printf("\tLogin :\t\t "); SCAN (Log); Pass = getpass("\tPassword :\t"); PRINTSTATEMENT("Connection en cours ..."); sleep(2); system("clear"); int Exit= 0; while(Exit!=1){ LISTMSG(nbmsg,Debug); SCAN(Com); if (strstr(Com,"REFRESH")!=NULL || (strstr(Com,"REFRESH")!=NULL) ){ PRINT("Telechargement des Emails en cours"); //REFRESH(descBr,nbmsg,Debug); PRINT("Press enter to continue..."); cin.get(); } if (strstr(Com,"HELP")!=NULL || (strstr(Com,"help")!=NULL) ){ system("clear"); HELP(); PRINT("Press enter to continue..."); cin.get(); } if (strstr(Com,"QUIT")!=NULL || (strstr(Com,"quit")!=NULL) ){ system("rm maildir/*"); PRINT("THANKS AND GOODBYE!"); sleep(2); Exit = 1; } if (strstr(Com,"READ")!=NULL || (strstr(Com,"read")!=NULL) ){ strncpy(n,Com+5,4); n[4]='\0';Number = atoi(n); if (Number < (nbmsg+1)) { mail mtmp = get_mail(Number); READMSG(mtmp,Debug); } else PRINTERROR("Nombre de message incorrecte"); cin.get(); } if (strstr(Com,"DELETE")!=NULL || (strstr(Com,"delete")!=NULL) ){ strncpy(n,Com+5,4); n[4]='\0';Number = atoi(n); if (Number < (nbmsg+1)) { //DELETE(descBR,Number,Debug); } else PRINTERROR("Nombre de message incorrecte"); cin.get(); } if (strstr(Com,"WRITE")!=NULL || (strstr(Com,"write")!=NULL) ){ system("clear"); /*PRINT("Adresse du destinataire :"); SCAN (Rcptto); PRINT("Sujet :"); SCAN (Sujet); PRINT("Corps du message : /n 2x(CTRL+D) to finish..."); SCANF (Message); SENDING(Addrsmtp,Log,Rcptto,Sujet,Message);*/ cin.get(); } if (strstr(Com,"SAVE")!=NULL || (strstr(Com,"save")!=NULL) ){ char Tmp [50]; strncpy(n,Com+5,3); n[4]='\0';Number = atoi(n); sprintf(Tmp,"MAIL%i",Number); system("clear"); if (Number<(nbmsg+1)) { //######################################## //SAVEMSG(descBR,Number,Tmp,Debug); PRINTSTATEMENT("Sauvegarde du message termine..."); } else PRINTERROR("Nombre de message incorrecte"); cin.get();} system("clear"); } return 0;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -