FACT++  1.0
int main ( int  argc,
char *  argv[] 
)

Definition at line 791 of file didMarkus.c.

References app_context, app_initialize(), Curr_view_opt, Curr_view_opt_par, dic_disable_padding(), dim_no_threads(), dim_usleep(), dis_disable_padding(), do_got_service_list(), do_show_clients(), gui_initialize(), i, sprintf(), and toplevel_widget.

792 {
793  int i;
794  char opt_str[20], *ptr;
795  XtInputMask mask;
796  void do_got_service_list();
797  void do_show_clients();
798  void app_initialize();
799 
800  dim_no_threads();
803 
804  if(argc > 1)
805  {
806  if(argv[1][0] == '-')
807  {
808  sprintf(opt_str,"%s",&argv[1][1]);
809  if((!strncmp(opt_str,"node",4)) ||
810  (!strncmp(opt_str,"NODE",4)))
811  Curr_view_opt = 0;
812  else if((!strncmp(opt_str,"all",3)) ||
813  (!strncmp(opt_str,"ALL",3)))
814  Curr_view_opt = 1;
815  else if((!strncmp(opt_str,"service",7)) ||
816  (!strncmp(opt_str,"SERVICE",7)))
817  Curr_view_opt = 2;
818  else if((!strncmp(opt_str,"error",5)) ||
819  (!strncmp(opt_str,"ERROR",5)))
820  Curr_view_opt = 3;
821  else if((!strncmp(opt_str,"help",4)) ||
822  (!strncmp(opt_str,"HELP",4)))
823  {
824  printf("Did - DIM Information Display\n");
825  printf("\t-all Show ALL Servers\n");
826  printf("\t-service=<str> Show Servers providing Service <str>\n");
827  printf("\t-node=<nodename> Show Servers on Node <nodename>\n");
828  printf("\t-error Show Servers in Error\n");
829  printf("\t-help Show this message\n\n");
830  exit(0);
831  }
832  else
833  Curr_view_opt = -1;
834  if((Curr_view_opt == 0) || (Curr_view_opt == 2))
835  {
836  if(!(ptr = strchr(argv[1],'=')))
837  {
838  if( (ptr = strchr(argv[2],'=')) )
839  {
840  ptr++;
841  if(!(*ptr))
842  ptr = argv[3];
843  }
844  else
845  ptr++;
846  }
847  else
848  {
849  ptr++;
850  if(!(*ptr))
851  ptr = argv[2];
852  }
853  for(i = 0;*ptr; ptr++, i++)
854  Curr_view_opt_par[i] = toupper(*ptr);
855  Curr_view_opt_par[i] = '\0';
856  }
857  }
858  }
859 
860  toplevel_widget = (Widget)gui_initialize(argc, argv);
861  app_initialize();
862  /*
863  * Sit around forever waiting to process X-events. We never leave
864  * XtAppMainLoop. From here on, we only execute our callback routines.
865  */
866 
867  while(1)
868  {
869  {
870  DISABLE_AST
871  mask = XtAppPending(app_context);
872  ENABLE_AST
873  }
874  if(mask)
875  {
876  DISABLE_AST
877  XtAppProcessEvent(app_context, mask);
878  if(Got_Service_List)
879  {
881  Got_Service_List = 0;
882  }
883  if(Got_Client_List)
884  {
886  Got_Client_List = 0;
887  }
888  ENABLE_AST
889  }
890  else
891  {
892  dim_usleep(100000);
893  /*
894  usleep(100000);
895  */
896  }
897  }
898 
899 }
void dis_disable_padding()
Definition: copy_swap.c:30
char Curr_view_opt_par[80]
Definition: didMarkus.c:11
int i
Definition: db_dim_client.c:21
void dim_usleep(int usecs)
Definition: dtq.c:293
XtAppContext app_context
Definition: did.h:38
void do_show_clients(SERVER *servp)
Definition: didMarkus.c:2895
SERVER * Got_Client_List
Definition: didMarkus.c:29
int Curr_view_opt
Definition: didMarkus.c:10
void dim_no_threads()
Definition: dtq.c:80
SERVER * Got_Service_List
Definition: didMarkus.c:28
void dic_disable_padding()
Definition: copy_swap.c:25
Widget toplevel_widget
Definition: did.h:39
void do_got_service_list(SERVER *servp)
Definition: didMarkus.c:2805
void app_initialize(int tag)
Definition: didMarkus.c:903
Widget gui_initialize(int argc, char **argv)
Definition: didMarkus.c:764
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function: