
diff -r before/altfontsel/altfontsel.ptype after/altfontsel/altfontsel.ptype
6c6
<       session GetFontName(out string fontname) => start;
---
>       session GetFontName(inout string fontname) => start;


diff -r before/altfontsel/altfontsel_tt.c after/altfontsel/altfontsel_tt.c
17a18,28
> /* RealFontNames[] was moved outside the function ReplyToMessage so that
>    it would be available from the processToolTalkMessage function. A
>    NULL was also added to be able to detect the end of the list. */
> static const char *RealFontNames[] = {
> 		"-*-courier-medium-r-*-*-12-*-*-*-*-*-*-*",
> 		"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*",
> 		"-*-lucida bright-medium-i-*-*-12-*-*-*-*-*-*-*",
> 		"-*-times-medium-r-*-*-14-*-*-*-*-*-*-*",
> 		"-*-zapfchancery-medium-i-*-*-18-*-*-*-*-*-*-*",
> 	        NULL};
> 
59a71,74
> 	        char *requested_default_name;   /* will point to the requesting default */
> 		const char *name_ptr = NULL;    /* used to scan RealFontNames[] */
> 		int index = 0;                  /* used during scan of RealFontNames[] */
> 
69a85,110
> 
> 		/* get ptr to desired default font name */
> 		requested_default_name = tt_message_arg_val(incoming,0);
> 
> 
> 		if (requested_default_name != NULL) /* we actually got a name */
> 		   {
> 		    /* set the selections - scan the font name list looking for match */
> 		    name_ptr = RealFontNames[0];
> 		    while (name_ptr != NULL)
> 		      if (strcmp(requested_default_name, name_ptr) == 0) /* we found it */
> 		         {xv_set(Altfontsel_baseframe->list1,             /* turn on */
> 			         PANEL_LIST_SELECT, index, TRUE, NULL);
> 		          break;
> 		          }
> 		      else 
> 		         {index++;
> 		          name_ptr = RealFontNames[index];
> 		         }
> 	           }
> 
> 		/* if we didn't get a name, or it was a name we didn't have, 
> 		   just select the 0th item */
> 		if (name_ptr == NULL) 
> 		  xv_set(Altfontsel_baseframe->list1, PANEL_LIST_SELECT, 0, TRUE, NULL);	  
> 
104,112c145
< {
< 	static const char *RealFontNames[] = {
< 		"-*-courier-medium-r-*-*-12-*-*-*-*-*-*-*",
< 		"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*",
< 		"-*-lucida bright-medium-i-*-*-12-*-*-*-*-*-*-*",
< 		"-*-times-medium-r-*-*-14-*-*-*-*-*-*-*",
< 		"-*-zapfchancery-medium-i-*-*-18-*-*-*-*-*-*-*"};
< 		
< 		
---
> {

	

diff -r before/xedit/commands.c after/xedit/commands.c
41a42,46
> static char* Current_Font_Name = (char*)NULL; /* points to name of current font */
> /* Note: the global Current_Font_Name approach was taken because off hand, I didn't 
>    know how to get the font name from the XFontStruct that you could get with a
>    XtGetValue call for the textwindow's XtNfont property */
> 
131a137
> 
132a139,143
> 		char *newfontname;  /* will point to name of the potentially new font */
> 
> 		 /* get ptr to potentially new font name */
> 		newfontname = tt_message_arg_val(m,0);
> 
134c145,146
< 		newfs = XLoadQueryFont(CurDpy,tt_message_arg_val(m,0));
---
> 		newfs = XLoadQueryFont(CurDpy,newfontname);
> 
143a156,161
> 
> 			/* free any storage from the old name we don't need anymore */
> 			if (Current_Font_Name != (char*)NULL) free(Current_Font_Name);
> 
> 			/* save the new font name as the current font */
> 			Current_Font_Name = strdup(newfontname);
158c176,178
< 	tt_message_arg_add(m,TT_OUT,"string",(char *)NULL);
---
> 
> 	/* send the current font name as the initial default selection */
> 	tt_message_arg_add(m,TT_INOUT,"string", Current_Font_Name);

