FVWM: To delete module configuration *Fvwm....(B

From: Toshi Isogai(B <toshi_isogai_at_maxtor.com>
Date: Wed, 17 Apr 1996 11:05:10 -0600 (MDT)

I made a patch for 2.0.42 to add commands to delete/destory module
configurations. From FvwmTalk, FvwmConsole or equivallent,

       DestroyModuleConfig <config>

will search lines starting with '*<config>' as a first word, delete
them. You can use Fvwm style wildcards. For example,

       DestroyModuleConfig FvwmWinListFont

will delete lines start with 'FvwmWinListFont' as a whole word.

       DestroyModuleConfig FvwmButtons*

will delete all lines starting '*FvwmButtons'.

To add new config lines, just like .fvwm2rc file,

       *FvwmButtonsRows 12

with no leading spaces.

You can easily re-customize modules with these commands without restarting
fvwm (Even easier with FvwmConsole).


Here is the patch.
==================================
Only in fvwm: Makefile
Only in fvwm: add_window.o
Only in fvwm: bindings.o
Only in fvwm: borders.o
diff fvwm-dist/builtins.c fvwm/builtins.c
26a27,28
> char *sys_errlist[];
> #define strerror(e) sys_errlist[e]
Only in fvwm: builtins.c~
Only in fvwm: builtins.o
Only in fvwm: colormaps.o
Only in fvwm: colors.o
Only in fvwm: complex.o
Only in fvwm: decorations.o
Only in fvwm: events.o
Only in fvwm: focus.o
diff fvwm-dist/functions.c fvwm/functions.c
51a52
> {"DestroyModuleConfig", DestroyModConfig, F_NOP, FUNC_NO_WINDOW},
153,160c154,169
<
< while((!matched)&&(strlen(func_config[j].keyword)>0))
< {
< if(mystrcasecmp(function,func_config[j].keyword)==0)
< {
< matched=TRUE;
< /* found key word */
< func_config[j].action(eventp,w,tmp_win,context,action, &Module);
---
>   
>   if( function[0] == '#' ) {
> 	/* skip comments */
> 	matched=TRUE; 
>   } else if ( function[0] == '*' ) {
> 	matched=TRUE;
> 	AddModConfig( eventp, w, tmp_win, context, taction, &Module);
>   } else {
> 	while((!matched)&&(strlen(func_config[j].keyword)>0))  {
> 	  if(mystrcasecmp(function,func_config[j].keyword)==0)		{
> 		matched=TRUE;
> 		/* found key word */
> 		func_config[j].action(eventp,w,tmp_win,context,action, &Module);
> 	  }
> 	  else
> 		j++;
162,164c171
<       else
< 	j++;
<     }
---
>   }
Only in fvwm: functions.c~
Only in fvwm: functions.o
Only in fvwm: fvwm.o
Only in fvwm: fvwm2
Only in fvwm: icons.o
Only in fvwm: menus.o
diff fvwm-dist/misc.h fvwm/misc.h
469a470,473
> void DestroyModConfig(XEvent *eventp,Window junk,FvwmWindow *tmp_win,
> 		unsigned long context, char *action,int* Module);
> void AddModConfig(XEvent *eventp,Window junk,FvwmWindow *tmp_win,
>  		unsigned long context, char *action,int* Module);
Only in fvwm: misc.h~
Only in fvwm: misc.o
Only in fvwm: module.o
Only in fvwm: move.o
Only in fvwm: placement.o
diff fvwm-dist/read.c fvwm/read.c
174a175,217
> 
> void AddModConfig(XEvent *eventp,Window junk,FvwmWindow *tmp_win,
> 		unsigned long context, char *action,int* Module)
> /* interface function for AddToModList */
> {
> AddToModList( action );
> }
> 
> /**************************************************************/
> /* delete from module configuration                           */
> /**************************************************************/
> void DestroyModConfig(XEvent *eventp,Window junk,FvwmWindow *tmp_win,
> 		unsigned long context, char *action,int* Module)
> {
>   struct moduleInfoList *this, *that, *prev;
>   char *info;   /* info to be deleted - may contain wildcards */
>   char *mi;
> 
>   action = GetNextToken(action,&info); 
>   if( info == NULL ) {
> 	return;
>   }
> 
>   this = modlistroot;
>   prev = NULL;
> 
>   while(this != NULL)    {
> 	GetNextToken( this->data, &mi);
> 	that = this->next;
> 	if( matchWildcards(info, mi+1) ) {
> 	  free(this->data);
> 	  free(this);
> 	  if( prev ) {
> 		prev->next = that;
> 	  } else {
> 		modlistroot = that;
> 	  }
> 	} else {
> 	  prev = this;
> 	}
> 	this = that;
>   }
> }        
Only in fvwm: read.c~
Only in fvwm: read.o
Only in fvwm: resize.o
Only in fvwm: style.o
Only in fvwm: virtual.o
Only in fvwm: windows.o
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Toshi Isogai   $_at_0k3-MxL@(J
-- I am an ASIC engineer, not a sick engineer --
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Apr 17 1996 - 12:11:04 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:58 BST