ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/idar/idar.c
(Generate patch)

Comparing projects/cms/source/idar/idar.c (file contents):
Revision 1.12 by pajs, Thu Apr 3 10:59:28 2003 UTC vs.
Revision 1.13 by pajs, Wed Apr 9 20:13:53 2003 UTC

# Line 31 | Line 31
31   #include <ukcprog.h>
32   #include <netinet/in.h>
33   #include <netdb.h>
34 + #include <sys/termios.h>
35  
36   #include <libxml/xmlmemory.h>
37   #include <libxml/parser.h>
# Line 791 | Line 792 | int main(int argc, char **argv){
792          WINDOW *window;
793          fd_set infds;
794          int maxx, maxy;
795 +        struct winsize size;
796  
797          FILE *control;
798          FILE *data;
# Line 951 | Line 953 | int main(int argc, char **argv){
953          data=create_tcp_connection(servername, server_data_port);
954          if(data==NULL){
955                  errf("Failed to connect to host %s on port %d (%m)",servername, server_data_port);
956 +                exit(1);
957          }
958  
959          /*      
# Line 974 | Line 977 | int main(int argc, char **argv){
977                  FD_ZERO(&infds);
978                  FD_SET(stdin_fileno, &infds);
979                  FD_SET(data_fileno, &infds);
980 <                select(biggest_fileno, &infds, NULL, NULL, NULL);
980 >                if((select(biggest_fileno, &infds, NULL, NULL, NULL))==-1){
981 >                        if (ioctl(fileno(stdout), TIOCGWINSZ, &size) == 0) {
982 >                                resizeterm(size.ws_row, size.ws_col);
983 >                                wrefresh(curscr);
984 >                        }
985 >                        getmaxyx(window, maxy, maxx);
986 >                        title=1;
987 >                        display(machine_data_list, &display_config, maxy, &title);
988 >                        refresh();
989 >                        continue;
990 >                }
991                  
992                  if(FD_ISSET(stdin_fileno, &infds)){
993                  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines