#include #include #include //#include #include #include #include #include #include #include "c:\tcc\safraj\mouse.c" #include void movetoxy(int x,int y) { union REGS regs; regs.h.ah=2; regs.h.dh=y; regs.h.dl=x; regs.h.bh=0; int86(0x10,®s,®s); } int pp; union REGS inregs,outregs; char cudir[30],tdir[30]; void send() { char *p,filename[20],ch,str[5],sfile[20]; FILE *fp; int i,j; char tsfile[30],ttfile[30],pp1[30]; textbackground(0); clrscr(); textbackground(3); for(i=0;i<15;i++) for(j=0;j<=50;j++) { gotoxy(10+j,5+i); cprintf(" "); } textcolor(13); movetoxy(28,5); cprintf("SEND A FILE"); textcolor(RED); movetoxy( 12, 10); cprintf("FILE NAME TO SEND :"); movetoxy( 12, 8); cprintf("ENTER PATH OF THE FILE :"); textcolor(YELLOW); textbackground(BLUE); for(i=0;i<18;i++) { movetoxy(12+27+i,10); cprintf(" "); } for(i=0;i<18;i++) { movetoxy(12+27+i,8); cprintf(" "); } movetoxy(12+27+1,8); tsfile[0]=20; cgets(tsfile); for(i=0;i77 || ch=='\n') { col=1; row++; } if(row>20) { getch(); row=2; clrscr(); pg++; movetoxy(18,0); printf("FILE:: %s",sfile); movetoxy(70,24); printf("PAGE:: %d",pg); } printf("%c",ch); } row++; printf("Press any Key to return......"); getch(); fclose(fp); } void help1() { textbackground(3); clrscr(); textcolor(RED); gotoxy(25,2); cprintf("\n W E L C O M E T O H E L P"); cprintf("\n I N T R O D U C T I O N"); gotoxy(5,7); cprintf("\n\n THIS IS A COMMUNICATION PROJECT DESIGHNED TO SEND MESSAGES FROM"); cprintf("\n\n ONE SYSTEM TO ANOTHER SYSTEM WITH THE HELP OF RS-232 CABLE,MODEM"); cprintf("\n\n TELEPHONE LINE"); getch(); } void help2() { clrscr(); cprintf("\n THE WORLDWIDEWEB CONTINUES TO GROW FASTER THAN ANY OTHER\n SEGMENT OF THE INTERNET"); } void decompressfile(void) { char *p,sfile[20],tfile[20]; FILE *fps, *fpt; int area,count,ch,flag; int i,j; char tsfile[30],ttfile[30],pp1[30]; textbackground(0); clrscr(); textbackground(3); for(i=0;i<15;i++) for(j=0;j<=60;j++) { gotoxy(10+j,5+i); cprintf(" "); } textcolor( 13 ); movetoxy(25, 5); cprintf(" UNZIPPING A FILE "); textcolor(14); for(i=0;i<20;i++) { movetoxy(24+i,6); cprintf("*"); } textcolor(RED); movetoxy( 12, 12); cprintf("ENTER THE FILE NAME TO BE UNZIPPED:"); movetoxy( 12, 10); cprintf("ENTER PATH OF THE FILE :"); textcolor(YELLOW); textbackground(BLUE); for(i=0;i<18;i++) { movetoxy(20+27+i,12); cprintf(" "); } for(i=0;i<18;i++) { movetoxy(20+27+i,10); cprintf(" "); } movetoxy(20+27+1,10); tsfile[0]=20; cgets(tsfile); for(i=0;i127) { ch=ch-127; for(count=1;count<=ch;count++) flag=putc(' ',fpt); } else flag=putc(ch,fpt); if(flag==EOF) break; } textcolor(128); textbackground(3); movetoxy(20,13); if(flag==EOF) cprintf("\nUnable to unzip the File!"); else cprintf("\n File Successfully unzipped!"); getch(); fclose(fps); fclose(fpt); } void compressfile(void) { char *p,sfile[20],tfile[20]; FILE *fps, *fpt; int area,count,ch,flag; int i,j; char tsfile[30],ttfile[30],pp1[19]; textbackground(0); clrscr(); textbackground(3); for(i=0;i<15;i++) for(j=0;j<=60;j++) { gotoxy(10+j,5+i); cprintf(" "); } textcolor( 13 ); movetoxy(28, 6); cprintf(" ZIPPING A FILE "); textcolor(14); for(i=0;i<18;i++) { movetoxy(27+i,7); cprintf("*"); } textcolor(RED); movetoxy( 12, 12); cprintf("ENTER FILE NAME TO BE ZIPPED :"); movetoxy( 12, 10); cprintf("ENTER PATH OF THE FILE :"); textcolor(YELLOW); textbackground(BLUE); for(i=0;i<18;i++) { movetoxy(16+27+i,12); cprintf(" "); } for(i=0;i<18;i++) { movetoxy(16+27+i,10); cprintf(" "); } movetoxy(16+27+1,10); tsfile[0]=20; cgets(tsfile); for(i=0;i=20 && mx<=60 && my>=30 && my<=70) { hideptr(); setfillstyle(1,3); floodfill(40,140,1); floodfill(40,240,1); floodfill(40,340,1); floodfill(40,440,1); setfillstyle(1,LIGHTCYAN); floodfill(40,40,1); showptr(); getposition(); if(mousebutton==0) goto vd; putimage(80,10,fl,XOR_PUT); delay(250); vd2:mousebutton=0; getposition(); if(mousebutton==0) goto vd2; if(mx>=90 && mx<=180 && my>=10 && my<=30) { restorecrtmode(); displayfile(); setgraphmode(getgraphmode()); unsigned maxdrives; _dos_setdrive(pp,&maxdrives); chdir(tdir); goto sonu; } else if(mx>=90 && mx<=180 && my>30 && my<=50) { restorecrtmode(); compressfile(); setgraphmode(getgraphmode()); unsigned maxdrives; _dos_setdrive(pp,&maxdrives); chdir(tdir); goto sonu; } else if(mx>=90 && mx<=180 && my>50 && my<70) { restorecrtmode(); decompressfile(); setgraphmode(getgraphmode()); unsigned maxdrives; _dos_setdrive(pp,&maxdrives); chdir(tdir); goto sonu; } else if(mx>=90 && mx<=180 && my>90 && my<110) { restorecrtmode(); decryptfile(); setgraphmode(getgraphmode()); unsigned maxdrives; _dos_setdrive(pp,&maxdrives); chdir(tdir); goto sonu; } else if(mx>=90 && mx<=180 && my>=70 && my<=90) { restorecrtmode(); encryptfile(); setgraphmode(getgraphmode()); unsigned maxdrives; _dos_setdrive(pp,&maxdrives); chdir(tdir); goto sonu; } else if(mx>=90 && mx<=180 && my>=110 && my<=130) { restorecrtmode(); printfile(); setgraphmode(getgraphmode()); unsigned maxdrives; _dos_setdrive(pp,&maxdrives); chdir(tdir); goto sonu; } else if(mx>=90 && mx<=180 && my>130 && my<150) { hideptr(); putimage(80,10,fl,XOR_PUT); showptr(); goto vd; } else goto vd2; } else if(mx>=20 && mx<=60 && my>=225 && my<=265) { hideptr(); setfillstyle(1,3); floodfill(40,40,1); floodfill(40,140,1); floodfill(40,340,1); floodfill(40,440,1); setfillstyle(1,LIGHTCYAN); floodfill(40,240,1); showptr(); getposition(); if(mousebutton==0) goto vd; restorecrtmode(); send(); setgraphmode(getgraphmode()); unsigned maxdrives; _dos_setdrive(pp,&maxdrives); chdir(tdir); goto sonu; } else if(mx>=20 && mx<=60 && my>=325 && my<=365) { hideptr(); setfillstyle(1,3); floodfill(40,140,1); floodfill(40,240,1); floodfill(40,340,1); floodfill(40,40,1); setfillstyle(1,LIGHTCYAN); floodfill(40,340,1); showptr(); getposition(); if(mousebutton==0) goto vd; restorecrtmode(); help1(); setgraphmode(getgraphmode()); goto sonu; } else if(mx>=20 && mx<=60 && my>=425 && my<=465) { setcolor(1); circle(40,450,20); delay(250); hideptr(); setfillstyle(1,3); floodfill(40,140,1); floodfill(40,240,1); floodfill(40,340,1); floodfill(40,40,1); setfillstyle(1,LIGHTCYAN); floodfill(40,440,1); showptr(); getposition(); if(mousebutton==0) goto vd; exit(0); } else { setfillstyle(1,3); floodfill(40,140,1); floodfill(40,240,1); floodfill(40,340,1); floodfill(40,440,1); floodfill(40,40,1); getposition(); goto vd; } closegraph(); }