106 if ( (mf = XLoadQueryFont(XtDisplay(top),fontname))==NULL) {
107 printf(
"Couldn't open the following fonts:\n\t%s\n",
109 XtVaGetValues ( top, XmNdefaultFontList, &font, NULL );
112 font = XmFontListCreate (mf, XmSTRING_DEFAULT_CHARSET);
119 Widget row_col_id, top_id;
125 XtSetArg(arglist[n], XmNborderWidth, 0); n++;
126 XtSetArg(arglist[n], XmNorientation, XmVERTICAL); n++;
127 XtSetArg(arglist[n], XmNnumColumns, 4); n++;
128 XtSetArg(arglist[n], XmNpacking, XmPACK_COLUMN); n++;
129 XtSetArg(arglist[n], XmNadjustLast, False); n++;
131 row_col_id = XmCreateRowColumn(top_id,w_name,arglist,(Cardinal)n);
132 XtManageChild(row_col_id);
154 mw = XmCreateMainWindow ( parent,
"DidMainWindow", NULL, 0 );
156 XmNresizePolicy, XmRESIZE_ANY,
162 mb = XmCreateMenuBar ( mw,
"DidMenuBar", NULL, 0 );
170 XtManageChild ( mb );
173 mf = XmCreateForm ( mw,
"DidMainForm", NULL, 0 );
175 XmNresizePolicy, XmRESIZE_NONE,
178 XtManageChild ( mf );
183 tl = XmCreateLabel ( mf,
"DidTitle", NULL, 0 );
185 XmNtopAttachment, XmATTACH_FORM,
186 XmNbottomAttachment, XmATTACH_NONE,
187 XmNleftAttachment, XmATTACH_FORM,
188 XmNrightAttachment, XmATTACH_FORM,
195 XmNshadowThickness, 0,
196 XmNhighlightThickness, 0,
198 XmNalignment, XmALIGNMENT_CENTER,
213 XmStringFree ( xms );
241 f = XmCreateForm( mf,
"ScrollForm", NULL, 0 );
245 XmNtopAttachment, XmATTACH_WIDGET,
246 XmNbottomAttachment, XmATTACH_FORM,
247 XmNleftAttachment, XmATTACH_FORM,
248 XmNrightAttachment, XmATTACH_FORM,
254 XmNshadowThickness, 2,
289 XtSetArg ( ar[n], XmNtopAttachment, XmATTACH_FORM); n++;
290 XtSetArg ( ar[n], XmNbottomAttachment, XmATTACH_FORM); n++;
291 XtSetArg ( ar[n], XmNleftAttachment, XmATTACH_FORM); n++;
292 XtSetArg ( ar[n], XmNrightAttachment, XmATTACH_FORM); n++;
293 XtSetArg ( ar[n], XmNrightOffset, 0); n++;
294 XtSetArg ( ar[n], XmNleftOffset, 0); n++;
295 XtSetArg ( ar[n], XmNbottomOffset, 0); n++;
296 XtSetArg ( ar[n], XmNtopOffset, 0); n++;
300 XtSetArg ( ar[n], XmNscrollBarDisplayPolicy, XmAS_NEEDED); n++;
302 XtSetArg ( ar[n], XmNscrollingPolicy, XmAUTOMATIC); n++;
304 sl = XmCreateScrolledWindow ( f,
"ScrollWin", ar, (Cardinal)n );
324 XtManageChild ( sl );
364 w = XmCreateSeparator(parent_id,
"separator",
365 arglist,(Cardinal)n);
377 mn = XmCreatePulldownMenu ( mb,
"FileMB", NULL, 0 );
378 cb = XmCreateCascadeButton(mb,
"File", NULL, 0);
382 XtManageChild ( cb );
391 XmNradioAlwaysOne, True,
392 XmNradioBehavior, True,
407 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
413 XmStringFree ( xms );
414 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)
did_exit, 0 );
419 mn = XmCreatePulldownMenu ( mb,
"ViewMB", NULL, 0 );
420 cb = XmCreateCascadeButton(mb,
"View", NULL, 0);
427 XtManageChild ( cb );
436 XmNradioAlwaysOne, True,
437 XmNradioBehavior, True,
450 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
456 XmStringFree ( xms );
457 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)
view_opts,
470 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
476 XmStringFree ( xms );
477 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)view_opts,
491 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
497 XmStringFree ( xms );
498 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)view_opts,
518 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
524 XmStringFree ( xms );
525 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)view_opts,
531 mn = XmCreatePulldownMenu ( mb,
"CommandMB", NULL, 0 );
532 cb = XmCreateCascadeButton(mb,
"Commands", NULL, 0);
539 XtManageChild ( cb );
583 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
589 XmStringFree ( xms );
590 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)
dns_control,
611 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
617 XmStringFree ( xms );
618 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control,
633 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
639 XmStringFree ( xms );
640 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control,
661 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
667 XmStringFree ( xms );
668 XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control,
707 mn = XmCreatePulldownMenu ( mb,
"HelpMB", NULL, 0 );
715 cb = XmCreateCascadeButton ( mb,
"Help", NULL, 0 );
731 bt = XmCreatePushButton ( mn,
"button", NULL, 0 );
737 XmStringFree ( xms );
742 XtVaSetValues ( mb, XmNmenuHelpWidget, cb, NULL );
755 XtSetArg ( arglist[n], XmNallowShellResize, True); n++;
756 XtSetArg ( arglist[n], XmNiconName,
"DID"); n++;
757 XtSetArg ( arglist[n], XmNtitle,
"xDid"); n++;
758 XtSetArg ( arglist[n], XmNtraversalOn,True); n++;
759 return XtAppCreateShell(argv[0], NULL, applicationShellWidgetClass,
760 display, arglist, (Cardinal)n);
769 XtToolkitInitialize();
772 NULL, 0, &argc, argv);
775 printf(
"%s: Can't open display\n", argv[0]);
787 XtRealizeWidget ( toplevel );
791 int main(
int argc,
char *argv[])
794 char opt_str[20], *ptr;
806 if(argv[1][0] ==
'-')
808 sprintf(opt_str,
"%s",&argv[1][1]);
809 if((!strncmp(opt_str,
"node",4)) ||
810 (!strncmp(opt_str,
"NODE",4)))
812 else if((!strncmp(opt_str,
"all",3)) ||
813 (!strncmp(opt_str,
"ALL",3)))
815 else if((!strncmp(opt_str,
"dns",3)) ||
816 (!strncmp(opt_str,
"DNS",3))) {
818 sprintf(text,
"DIM_DNS_NODE=%s",opt_str+4);
822 else if((!strncmp(opt_str,
"service",7)) ||
823 (!strncmp(opt_str,
"SERVICE",7)))
825 else if((!strncmp(opt_str,
"error",5)) ||
826 (!strncmp(opt_str,
"ERROR",5)))
828 else if((!strncmp(opt_str,
"help",4)) ||
829 (!strncmp(opt_str,
"HELP",4)))
831 printf(
"Did - DIM Information Display\n");
832 printf(
"\t-all Show ALL Servers\n");
833 printf(
"\t-dns=<str> Show Servers with DIM_DNS_NODE provided by <str>\n");
834 printf(
"\t-service=<str> Show Servers providing Service <str>\n");
835 printf(
"\t-node=<nodename> Show Servers on Node <nodename>\n");
836 printf(
"\t-error Show Servers in Error\n");
837 printf(
"\t-help Show this message\n\n");
844 if(!(ptr = strchr(argv[1],
'=')))
846 if( (ptr = strchr(argv[2],
'=')) )
861 for(i = 0;*ptr; ptr++, i++)
889 Got_Service_List = 0;
923 char title[128],icon_title[128];
930 sprintf(title,
"DID - DIM Information Display DNS=%s:%d",dns_node,dns_port);
934 sprintf(title,
"DID - DIM Information Display DNS=%s",dns_node);
936 sprintf(icon_title,
"DID %s",dns_node);
950 XtAppAddTimeOut(
app_context, 1000, update_show_servers, 0);
958 printf(
"%s\n", problem_string);
962 void did_exit(Widget w,
int *tag,
unsigned long *reason)
982 void view_opts(Widget w,
int tag,
unsigned long *reason)
1034 int i, j, n_nodes, curr_index = 0;
1036 char *ptr, *nodeptrs[
MAX_CONNS*2], *curr_str, *sptr;
1040 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_HELP_BUTTON);
1041 XtUnmanageChild(
id);
1042 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_APPLY_BUTTON);
1043 XtUnmanageChild(
id);
1044 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
1045 XmListDeleteAllItems(
id);
1049 for(i=0;i<n_nodes;i++)
1053 ptr = strchr(ptr,
'\n');
1055 for(j = 0; j < (int)strlen(sptr); j++)
1056 sptr[j] = (
char)tolower((
int)sptr[j]);
1058 strcpy(max_str,
"zzzzzzzzzzzzzzzzzzzzzzzzzzzz");
1059 for(i=0;i<n_nodes; i++)
1062 for(j=0;j<n_nodes; j++)
1068 if(strcmp(sptr,curr_str) < 0)
1074 nodeptrs[curr_index] = 0;
1095 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_HELP_BUTTON);
1096 XtUnmanageChild(
id);
1097 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_APPLY_BUTTON);
1098 XtUnmanageChild(
id);
1100 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
1123 if(strstr(node_ptr,ptr->
node) <= (
char *)0)
1125 strcat(node_ptr,ptr->
node);
1126 strcat(node_ptr,
"\n");
1136 char str[256], *ptr, *ptr1;
1141 if( (ptr = strstr(str,
"/RpcIn")) )
1146 if( (ptr = strstr(str,
"/RpcOut")) )
1157 ptr1 = strchr(ptr,
'|');
1159 else if(rpc_flag == 1)
1162 ptr1 = strchr(ptr,
',');
1167 ptr = strchr(ptr,
',');
1169 ptr1 = strchr(ptr,
'|');
1190 if((*size == 4 ) && (*buffer == -1))
1226 char timestr[128], aux[10];
1227 int quality = 0, secs = 0, mili = 0;
1249 ptr = strrchr(timestr,
' ');
1252 strcat(timestr, aux);
1253 timestr[strlen(timestr)-1] =
'\0';
1255 sprintf(str,
" Timestamp: %s Quality: %d\n\n",
1270 sscanf(ptr,
"%d", &num);
1273 if( (ptr = strchr(ptr,
';')) )
1305 size = ssize/(int)
sizeof(
int);
1308 psize = size * (int)
sizeof(
int);
1315 size = ssize/(int)
sizeof(
int);
1318 psize = size * (int)
sizeof(
int);
1325 size = ssize/(int)
sizeof(
short);
1328 psize = size * (int)
sizeof(
short);
1335 size = ssize/(int)
sizeof(
float);
1338 psize = size * (int)
sizeof(
float);
1345 size = ssize/(int)
sizeof(
double);
1348 psize = size * (int)
sizeof(
double);
1355 size = ssize/(int)
sizeof(
longlong);
1358 psize = size * (int)
sizeof(
longlong);
1372 ptr = (
char *)ptr + psize;
1459 char *ptr,
str[80], tmp[256];
1467 for( i = 0; i <
size; i++)
1483 last[i%4] = buff[
i];
1484 if((i%4 == 3) || (i == (size-1)))
1508 for(j = 0; j <= (i%4); j++)
1530 char *ptr,
str[80], tmp[256];
1538 for( i = 0; i <
size; i++)
1552 sprintf(str,
" %08X",(
unsigned)buff[i]);
1554 last[i%4] = buff[
i];
1555 if((i%4 == 3) || (i == (size-1)))
1558 for(j = 0; j <= (i%4); j++)
1562 sprintf(str,
"%12d",(
int)last[j]);
1580 char *ptr,
str[80], tmp[256];
1588 for( i = 0; i <
size; i++)
1604 last[i%8] = buff[
i];
1605 if((i%8 == 7) || (i == (size-1)))
1629 for(j = 0; j <= (i%8); j++)
1651 char *asc, *ptr,
str[80], tmp[256];
1658 for( i = 0; i <
size; i++)
1676 strcat(tmp,&str[strlen(str)-2]);
1682 if((i%16 == 15) || (i == (size-1)))
1686 for(j = 1; j < 16 - (i%16); j++)
1690 for(j = 0; j <= (i%16) ; j++)
1704 asc = (
char *)&buff[i+1];
1716 char *ptr,
str[80], tmp[256];
1720 for( i = 0; i <
size; i++)
1732 sprintf(str,
"%12.3G",*(buff++));
1734 if((i%4 == 3) || (i == size-1))
1749 char *ptr,
str[80], tmp[256];
1753 for( i = 0; i <
size; i++)
1765 sprintf(str,
"%12.3G",*(buff++));
1767 if((i%4 == 3) || (i == size-1))
1852 id = XmSelectionBoxGetChild(w,XmDIALOG_TEXT);
1853 str = XmTextGetString(
id);
1867 pstr = strchr(str,
' ');
1900 recv_service_info,0,
1911 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_HELP_BUTTON);
1912 XtUnmanageChild(
id);
1913 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_APPLY_BUTTON);
1914 XtUnmanageChild(
id);
1915 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
1938 size =
sizeof(long);
1946 size =
sizeof(short);
1950 size =
sizeof(float);
1954 size =
sizeof(double);
1968 int size, full_size = 0;
1970 static int last_size = 0;
1971 static void *last_buffer = 0;
1985 sscanf(ptr,
"%d", &num);
1986 full_size += size * num;
1987 if( (ptr = strchr(ptr,
';')) )
1995 if(full_size > last_size)
1999 last_buffer =
malloc((
size_t)full_size);
2000 last_size = full_size;
2002 buffer_ptr = last_buffer;
2010 sscanf(ptr,
"%d", &num);
2014 if( (ptr = strchr(ptr,
';')) )
2025 full_size = (int) ((
char *)buffer_ptr - (
char *)last_buffer);
2032 if((str[0] ==
'0') && (str[1] ==
'x'))
2033 sscanf(str+2,
"%x",&i);
2035 sscanf(str,
"%d",&i);
2044 else if(str[0] ==
'\"')
2046 else if((str[0] ==
'0') && (str[1] ==
'x'))
2047 sscanf(str+2,
"%x",(
int *)cc);
2048 else if(isalpha(str[0]))
2051 sscanf(str,
"%d",(
int *)cc);
2075 for(i = 0; i<num; i++)
2078 ptr = (
int *)ptr +1;
2079 if( (strp = strchr(strp,
' ')) )
2087 for(i = 0; i<num; i++)
2090 *((
short *)ptr) = s;
2091 ptr = (
short *)ptr +1;
2092 if( (strp = strchr(strp,
' ')) )
2100 for(i = 0; i<num; i++)
2102 sscanf(strp,
"%f",&ff);
2104 ptr = (
float *)ptr +1;
2105 if( (strp = strchr(strp,
' ')) )
2113 for(i = 0; i<num; i++)
2115 sscanf(strp,
"%f",&ff);
2117 *(
double *)ptr = dd;
2118 ptr = (
double *)ptr +1;
2119 if( (strp = strchr(strp,
' ')) )
2128 for(i = 0; i<num; i++)
2133 ptr = (
char *)ptr +1;
2134 if( (strp = strchr(strp,
' ')) )
2145 num = (int)strlen(strp)+1;
2146 strncpy((
char *)ptr,strp,(
size_t)num);
2147 if( (ptr1 = (
char *)strchr((
char *)ptr,
'\"')) )
2152 ptr = (
char *)ptr + num;
2153 if( (strp = strchr(strp,
' ')) )
2205 XtSetSensitive(w, False);
2225 XtSetSensitive(w, False);
2288 printf(
"Server_list:\n%s\n",buffer);
2300 if((ptr->
pid == pid) && (!strcmp(ptr->
node,node)))
2315 int n_services, service_size;
2334 if(*(
char *)buffer == -1)
2354 for(j = 0; j < n_services; j++)
2365 if( (ptr = strstr(str,
"/CLIENT_LIST")) )
2382 strcpy(servp->
name,sname);
2409 if(n_services != -1)
2417 if(strcmp(servp->
name, sname))
2419 strcpy(servp->
name,sname);
2468 int i, j, found, n_done = 0;
2471 static int old_n_services = 0;
2538 server_ptr = &servp->
server;
2539 if(servp->
busy == 3)
2544 if(servp->
busy == 1)
2555 strcpy(node, server_ptr->
node);
2557 if(!isdigit(node[0]))
2559 ptr = strchr(node,
'.');
2562 ptr = strchr(par,
'.');
2567 for(i = 0; i < (int)strlen(ptr); i++)
2568 ptr[i] = (
char)tolower((
int)ptr[i]);
2570 for(i = 0; i < (int)strlen(ptr); i++)
2571 ptr[i] = (
char)tolower((
int)ptr[i]);
2572 if(!strcmp(node, par))
2632 else if (servp->
busy == -1)
2674 strcpy(w_name,name);
2678 XtSetArg(arglist[n], XmNorientation, XmVERTICAL); n++;
2679 XtSetArg(arglist[n], XmNentryAlignment, XmALIGNMENT_CENTER); n++;
2681 (String)XmStringCreateLtoR ( w_name,XmSTRING_DEFAULT_CHARSET),
2682 arglist,(Cardinal)n);
2692 XtSetArg(arglist[n], XmNalignment, XmALIGNMENT_CENTER); n++;
2694 w = XmCreateCascadeButton(w,
2695 (String)XmStringCreateLtoR ( w_name,XmSTRING_DEFAULT_CHARSET),
2696 arglist,(Cardinal)n);
2708 ww = XmCreatePulldownMenu(w_id,
2709 (String)XmStringCreateLtoR ( w_name,XmSTRING_DEFAULT_CHARSET),
2710 arglist,(Cardinal)n);
2716 w = XmCreatePushButton(ww,
2717 (String)XmStringCreateLtoR ( w_name,XmSTRING_DEFAULT_CHARSET),
2718 arglist,(Cardinal)n);
2728 w = XmCreatePushButton(ww,
2729 (String)XmStringCreateLtoR ( w_name,XmSTRING_DEFAULT_CHARSET),
2730 arglist,(Cardinal)n);
2733 XtAddCallback(w,XmNactivateCallback, activate_clients, servp);
2791 sel_id =
put_popup(servp, 0,
"Service Info");
2793 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_OK_BUTTON);
2794 XtUnmanageChild(
id);
2796 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST_LABEL);
2797 if (ptr->
pid > 0x1000000)
2798 sprintf(str,
"Server %s (pid = %X) on node %s\n\nprovides %d services :\n",
2801 sprintf(str,
"Server %s (pid = %d) on node %s\n\nprovides %d services :\n",
2805 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
2809 "Ordering services alphabeticaly, please be patient..."),1);
2816 got_service_list,(
long)servp,
"None",5);
2830 printf(
"kick_it\n");
2849 Got_Service_List = servp;
2859 char cmd_str[256], svc_str[256];
2863 char *curr_str, max_str[
MAX_NAME], *sptr;
2865 int i, j, curr_index = 0, n_services;
2872 XmListDeleteAllItems(
id);
2874 strcpy(cmd_str,
"CMD: ");
2875 strcpy(svc_str,
"SVC: ");
2881 for(i=0;i<n_services; i++)
2883 strcpy(service_list[i],service_ptr->
name);
2886 strcpy(max_str,
"zzzzzzzzzzzzzzzzzzzzzzzzzzzz");
2887 for(i=0;i<n_services; i++)
2890 for(j=0;j<n_services; j++)
2892 sptr = service_list[j];
2896 if(strcmp(sptr,curr_str) < 0)
2902 service_list[curr_index][0] =
'\0';
2904 if(service_ptr->
type)
2906 strcpy(&cmd_str[5],service_ptr->
name);
2908 XmListAddItem(
id,xstr,i+1);
2913 strcpy(&svc_str[5],service_ptr->
name);
2915 XmListAddItem(
id,xstr,i+1);
2922 set_something(
id,XmNlistVisibleItemCount,(i < 20) ? i : 20);
2939 Got_Client_List = servp;
2950 char str[2048], *strp, *strp1;
2963 sprintf(str,
"Information not available\n");
2985 strp1 = strchr(strp,
'@');
2989 strcat(str,
" on node ");
2991 if( (strp1 = strchr(strp,
'|')) )
3039 sel_id =
put_popup(servp,1,
"Client Info");
3041 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_HELP_BUTTON);
3042 XtUnmanageChild(
id);
3044 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_APPLY_BUTTON);
3045 XtUnmanageChild(
id);
3047 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_CANCEL_BUTTON);
3048 XtUnmanageChild(
id);
3050 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_TEXT);
3051 XtUnmanageChild(
id);
3053 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_SELECTION_LABEL);
3054 XtUnmanageChild(
id);
3058 id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
3059 XmListDeleteAllItems(
id);
3062 sprintf(str,
"Clients of %s are : \n",
3068 show_clients,(
long)servp,&
no_link,1);
3082 printf(
"kick_it_again\n");
3151 static int old_n_services = 0;
3188 sprintf(str,
"%d Servers known - %d Services Available\n",
3193 strcat(str,
"Displaying ALL Servers");
3200 sprintf(str1,
"Displaying Servers providing Service *%s*",
3205 strcat(str,
"Displaying Servers in ERROR");
3208 strcat(str,
"Please Select Viewing Option");
3228 "Service / Command :",
3255 char str[256], str1[256];
3257 sprintf(str,
"Command to %s (%s)\n\n",
3262 strcpy(str1,
"Please enter items separated by spaces:\n(for example: 2 0x123 'A' 23.4 \"a text\")");
3280 long tag,
int items)
3283 XmString xmOk, xmApply, xmCancel, xmList, xmSelection;
3298 XtSetArg(ar[n],XmNtitle,
"Selection"); n++;
3302 XtSetArg(ar[n],XmNborderWidth, 1); n++;
3303 XtSetArg(ar[n],XmNlistLabelString, xmList); n++;
3304 XtSetArg(ar[n],XmNlistVisibleItemCount,items); n++;
3307 XtSetArg(ar[n],XmNokLabelString, xmOk); n++;
3311 XtSetArg(ar[n],XmNapplyLabelString, xmApply); n++;
3315 XtSetArg(ar[n],XmNcancelLabelString, xmCancel); n++;
3319 XtSetArg(ar[n],XmNselectionLabelString, xmSelection); n++;
3321 sd = XmCreateSelectionDialog (
toplevel_widget,
"Selection", ar, (Cardinal)n );
3322 XmStringFree(xmList);
3324 XmStringFree(xmApply);
3325 XmStringFree(xmCancel);
3326 XmStringFree(xmSelection);
3329 XtAddCallback ( sd, XmNcancelCallback,
3331 XtAddCallback ( sd, XmNapplyCallback,
3332 (XtCallbackProc)
ok_pop_up, (XtPointer)tag );
3333 XtAddCallback ( sd, XmNokCallback,
3334 (XtCallbackProc)ok_pop_up, (XtPointer)tag );
3352 XtSetArg(ar[n],XmNtitle,
"FileSelection"); n++;
3356 XtSetArg(ar[n],XmNborderWidth, 1); n++;
3357 XtSetArg(ar[n],XmNwidth, 500); n++;
3358 XtSetArg(ar[n],XmNdirMask, xm1); n++;
3359 sd = XmCreateFileSelectionDialog (
toplevel_widget,
"FileSelection", ar, (Cardinal)n );
3363 XtAddCallback ( sd, XmNcancelCallback,
3365 XtAddCallback ( sd, XmNokCallback,
3366 (XtCallbackProc)
ok_pop_up, (XtPointer)type );
3382 XtSetArg(ar[n],XmNborderWidth, 1); n++;
3387 XtSetArg(ar[n],XmNselectionLabelString, xm1); n++;
3388 sd = XmCreatePromptDialog (
toplevel_widget,
"Prompt", ar, (Cardinal)n );
3392 XtAddCallback ( sd, XmNcancelCallback,
3394 XtAddCallback ( sd, XmNokCallback,
3395 (XtCallbackProc)
ok_pop_up, (XtPointer)tag );
3411 XtSetArg(ar[n],XmNborderWidth, 1); n++;
3416 XtSetArg(ar[n],XmNmessageString, xm1); n++;
3417 sd = XmCreateQuestionDialog (
toplevel_widget,
"Question", ar, (Cardinal)n );
3421 XtAddCallback ( sd, XmNcancelCallback,
3423 XtAddCallback ( sd, XmNokCallback,
3424 (XtCallbackProc)
ok_pop_up, (XtPointer)tag );
3431 Widget fd, rc, sw, lb, rc1;
3435 unsigned long reason;
3438 XtSetArg(ar[n],XmNborderWidth, 1); n++;
3439 XtSetArg(ar[n],XmNresizePolicy, XmRESIZE_ANY); n++;
3445 XtSetArg(ar[n],XmNborderWidth, 1); n++;
3446 XtSetArg(ar[n],XmNentryAlignment, XmALIGNMENT_CENTER); n++;
3447 XtSetArg(ar[n],XmNbottomAttachment, XmATTACH_FORM); n++;
3448 XtSetArg(ar[n],XmNbottomOffset, 0); n++;
3449 XtSetArg(ar[n],XmNrightAttachment, XmATTACH_FORM); n++;
3450 XtSetArg(ar[n],XmNrightOffset, 0); n++;
3451 XtSetArg(ar[n],XmNtopAttachment, XmATTACH_FORM); n++;
3452 XtSetArg(ar[n],XmNtopOffset, 0); n++;
3453 XtSetArg(ar[n],XmNleftAttachment, XmATTACH_FORM); n++;
3454 XtSetArg(ar[n],XmNleftOffset, 0); n++;
3455 rc = XmCreateRowColumn ( fd,
"rowcol", ar, (Cardinal)n );
3460 XtSetArg ( ar[n], XmNwidth, 770); n++;
3461 XtSetArg ( ar[n], XmNheight, 350); n++;
3462 XtSetArg ( ar[n], XmNscrollBarDisplayPolicy, XmAS_NEEDED); n++;
3463 XtSetArg ( ar[n], XmNscrollingPolicy, XmAUTOMATIC); n++;
3465 sw = XmCreateScrolledWindow ( rc,
"ScrollWin", ar, (Cardinal)n );
3466 XtManageChild ( sw );
3472 XtSetArg(ar[n],XmNlabelString, xm1); n++;
3473 XtSetArg(ar[n],XmNalignment, XmALIGNMENT_BEGINNING); n++;
3474 lb = XmCreateLabel ( sw,
"label", ar, (Cardinal)n );
3483 XtSetArg(ar[n],XmNborderWidth, 0); n++;
3484 XtSetArg(ar[n],XmNentryAlignment, XmALIGNMENT_CENTER); n++;
3485 XtSetArg(ar[n],XmNorientation, XmVERTICAL); n++;
3486 XtSetArg(ar[n],XmNnumColumns, 3); n++;
3487 XtSetArg(ar[n],XmNpacking, XmPACK_COLUMN); n++;
3488 rc1 = XmCreateRowColumn ( rc,
"buttons", ar, (Cardinal)n );
3514 XtSetArg(ar[n],XmNalignment, XmALIGNMENT_CENTER); n++;
3516 XtSetArg(ar[n],XmNlabelString, xm1); n++;
3517 b = XmCreatePushButton ( parent,
"button", ar, (Cardinal)n );
3522 XtAddCallback ( b, XmNactivateCallback,
#define my_ctime(t, str, size)
static XmFontList did_label_font
char Curr_service_name[132]
Widget pop_widget_id[MAX_POP_UPS]
Widget create_prompt_dialog(char *label, long tag)
void print_service_float(float *buff, int size)
unsigned dic_info_service_stamped(char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
void dis_disable_padding()
unsigned dic_info_service(char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
Widget put_selection(int tag, char *title)
void print_service_double(double *buff, int size)
static XmFontList did_default_font
Widget gui_toplevel(char **argv)
int dim_set_dns_node(char *node)
void get_server_service()
void remove_button(SERVER *servp)
void print_service_short(short *buff, int size)
void print_service_longlong(longlong *buff, int size)
void get_service_format()
Widget create_service_dialog()
void dim_usleep(int usecs)
void recv_service_info(int *tag, int *buffer, int *size)
void remove_all_buttons()
Widget create_question_dialog(char *label, long tag)
static XmFontList did_small_font
void get_all_colors(Display *display, Widget w)
Widget Curr_service_list_id
void set_icon_title(Widget w, char *title)
void got_service_list(SERVER **servp_ptr, char *buffer, int *size)
Widget create_node_selection()
Widget put_popup(SERVER *servp, int type, char *title)
Widget create_send_command()
Widget gui_initialize(int argc, char **argv)
int read_str_char(char *str, char *cc)
int dic_get_quality(unsigned serv_id)
void set_title(Widget w, char *title)
void print_service_standard(int *buff, int size)
Widget create_kill_confirmation()
Pixel rgb_colors[MAX_COLORS]
int main(int argc, char *argv[])
char * Service_content_str
void activate_clients(Widget w, SERVER *servp, unsigned long *reason)
void do_got_service_list(SERVER *servp)
SLL * sll_get_next(SLL *item)
int read_str_int(char *str)
void create_matrix_widget()
Widget create_service_selection()
void app_initialize(int tag)
SLL * sll_remove_head(SLL *head)
int Curr_service_print_type
int dic_cmnd_service(char *serv_name, void *serv_address, int serv_size)
int dic_get_dns_node(char *node)
void update_servers(int *tag, DNS_DID *buffer, int *size)
int sll_insert_queue(SLL *head, SLL *item)
char Curr_view_opt_par[80]
void did_read_string(char type, int num, void **buffer_ptr, char **str_ptr)
SERVER * find_server(char *node, int pid)
DNS_SERVICE_INFO * service_ptr
Widget create_push_button(Widget parent, char *str, long tag)
void did_prepare_command(char *str)
static XmFontList did_server_font
int get_nodes(char *node_ptr)
void activate_services(Widget w, SERVER *servp, unsigned long *reason)
void check_put_label(int tag)
int sll_remove(SLL *head, SLL *item)
void gui_create_main_menu(Widget mb)
Widget create_selection_dialog(char *ok, char *apply, char *cancel, char *list, char *sel, long tag, int items)
void dic_disable_padding()
void delete_str(XmString str)
int did_write_string(char type, int num, void **buffer_ptr, int ssize)
char Curr_service_format[256]
void do_show_clients(SERVER *servp)
int get_type_size(char type)
void s_error(char *problem_string)
Widget create_file_selection_dialog(long type)
void gui_create_main_window(Widget parent)
SERVER * Got_Service_List
void print_service_char(char *buff, int size)
void update_servers_new(int *tag, char *buffer, int *size)
void update_show_servers(void *tag, unsigned long *reason)
void print_service_formatted(void *buff, int size)
Widget create_server_dialog()
void dic_release_service(unsigned service_id)
DNS_SERVICE_INFO services[1]
void show_clients(SERVER **servp_ptr, char *buffer, int *size)
Widget create_separator(Widget parent_id)
sprintf(name1,"NewService%d", i)
XmFontList util_get_font(char *fontname, Widget top)
Widget create_client_dialog()
Widget create_button(char *name, SERVER *servp)
int dic_get_timestamp(unsigned serv_id, int *secs, int *milisecs)