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.9 by pajs, Wed Apr 2 15:23:26 2003 UTC vs.
Revision 1.13 by pajs, Wed Apr 9 20:13:53 2003 UTC

# Line 29 | Line 29
29   #include <unistd.h>
30   #include <stdlib.h>
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 789 | 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 905 | Line 909 | int main(int argc, char **argv){
909          control=create_tcp_connection(servername, server_control_port);
910          if(control==NULL){
911                  errf("Failed to connect (%m)");
912 +                exit(1);
913          }
914  
915          if(argc==4){
# Line 948 | 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 971 | 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