--- list.c.orig Sat May 25 23:15:49 2002 +++ list.c Sun May 26 00:04:09 2002 @@ -107,31 +107,57 @@ 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(); - } + 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(); + } + + 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 Mon May 15 07:47:10 2000 +++ ctwm.man Sun May 26 00:42:12 2002 @@ -764,11 +764,13 @@ { "XTerm" "=300x5+800+5" 5 "myhost" "=400x5+100+5" 2 + "foo,bar" "=500x5-50-10" 2 } .EE Clients whose name or class is ``XTerm'' will have an entry created in the ``XTerm'' icon manager. Clients whose name was ``myhost'' would -be put into the ``myhost'' icon manager. +be put into the ``myhost'' icon manager. Clients whose name was +\fBeither\fP ``foo'' or ``bar'' will 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