--- list.c.orig Tue Jun 21 00:35:19 2005 +++ list.c Tue Jul 19 20:35:57 2005 @@ -111,31 +111,57 @@ void AddToList(name_list **list_head, char *name, char *ptr) { name_list *nptr; + char *name_bit, *buf, *buf2; + size_t nlen; if (!list_head) return; /* ignore empty inserts */ - nptr = (name_list *)malloc(sizeof(name_list)); - if (nptr == NULL) + /* + * Parse out *name as a ,-seperated list, and add + * individually. + * -- Matthew Fuller + */ + buf=name; + do { - twmrc_error_prefix(); - fprintf (stderr, "unable to allocate %d bytes for name_list\n", - sizeof(name_list)); - Done(0); - } + if(*buf==',') + buf++; - nptr->next = *list_head; + if(buf2=strchr(buf, (int)',')) + nlen = buf2-buf; + else + nlen = strlen(buf); + + name_bit = malloc(nlen+1); + strncpy(name_bit, buf, nlen); + name_bit[nlen]='\0'; + + + nptr = (name_list *)malloc(sizeof(name_list)); + if (nptr == NULL) + { + twmrc_error_prefix(); + fprintf (stderr, "unable to allocate %d bytes for name_list\n", + sizeof(name_list)); + Done(0); + } + + nptr->next = *list_head; #ifdef VMS - { - char *ftemp; - ftemp = (char *) malloc((strlen(name)+1)*sizeof(char)); - nptr->name = strcpy (ftemp,name); - } + { + char *ftemp; + ftemp = (char *) malloc((strlen(name_bit)+1)*sizeof(char)); + nptr->name = strcpy (ftemp,name_bit); + } #else - nptr->name = (char*) strdup (name); + nptr->name = (char*) strdup (name_bit); #endif - nptr->ptr = (ptr == NULL) ? (char *)TRUE : ptr; - *list_head = nptr; -} + nptr->ptr = (ptr == NULL) ? (char *)TRUE : ptr; + *list_head = nptr; + + free(name_bit); + } while(buf=strchr(buf, (int)',')); +} /*********************************************************************** * --- ctwm.man.orig Tue Jun 21 00:35:18 2005 +++ ctwm.man Tue Jul 19 20:35:57 2005 @@ -815,11 +815,14 @@ { "XTerm" "=300x5+800+5" 5 "myhost" "=400x5+100+5" 2 + "foo,bar" "=500x5-50-10" 2 } .EE Clients whose name or class is \(oqXTerm\(cq will have an entry created in the \(oqXTerm\(cq icon manager. Clients whose name was \(oqmyhost\(cq would -be put into the \(oqmyhost\(cq icon manager. +be put into the \(oqmyhost\(cq icon manager. Clients whose name was +\fBeither\fP \(oqfoo\(cq or \(oqbar\(cq would be put into the third icon +manager. .IP "\fBIconManagerShadowDepth\fP \fIpixels\fP" 8 This variable specifies the depth of the shadow \fIctwm\fP uses for