/* File : screen.c screen manipulation functions */ /* Copyright (C) 1992 Indian Institute of Technology, Bombay Written by V. Srinivas and Vishwas Joglekar, Dept of Computer Science and Engineering. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include "ipxwatch.h" #include "yapcbr.h" /*int hline(int startx,int starty,int endx,char line_char); int vline(int startx,int starty,int endy,char line_char);*/ void scroll_up(int x,int del_pos, int ins_pos); void scroll_down(int x,int ins_pos); void wprintf(BYTE *str, int len,int video_mode, int scroll); int read_key(); void pause(char *mesg); void prnt_hex(BYTE *str,unsigned char *buff,int len); void disp_mesg(char *mesg); void make_win(int x1,int y1,int x2,int y2, int box_type, char *mesg); void format_ether(ETH_IPX *pkt,unsigned char *out); /* Function to draw boxes left_top_col_no, left_top_row_no, right_bot_col_no, right_bot_rwo_no, style : 1 single line , 2 double line */ int box (int tlx,int tly,int brx,int bry,int style) { int w,h; char hline_ch,vline_ch,tlc,trc,brc,blc; if (style==1||style==0) { hline_ch = '\xC4'; vline_ch='\xB3'; tlc='\xDA'; trc='\xBF'; brc='\xD9'; blc='\xC0'; } else if (style==2) { hline_ch='\xCD'; vline_ch='\xBA'; tlc='\xC9'; trc='\xBB'; brc='\xBC'; blc='\xC8'; } else { return (0); } gotoxy (tlx,tly); putch(tlc); w=hline(tlx+1,tly,brx-1,hline_ch); putch(trc); h=vline (brx,tly+1,bry-1,vline_ch); gotoxy(brx,bry); putch(brc); hline(brx-1,bry,tlx+1,hline_ch); gotoxy(tlx,bry); putch(blc); vline(tlx,bry-1,tly+1,vline_ch); return (w*h); } /* Function to draw Horizontal lines */ int hline (int startx, int starty, int endx, char line_char) { int i; gotoxy (startx,starty); if (startx==endx) return (0); if (startxsource,out,ETHER_ADDR_LEN); /* source address */ prnt_hex(pkt->destination,out+strlen(out),ETHER_ADDR_LEN); /* destination address */ }