FVWM: [Question] about Style/UseStyle: manual/code mismatch

From: まつしたまこと <matusita_at_ics.es.osaka-u.ac.jp>
Date: Sun, 25 Feb 1996 21:56:50 +0900

The manual of fvwm says:

          UseStyle takes one arg, which is the name of another
          style. That way you can have unrelated window names
          easily inherit similiar traits without retyping. For
          example: 'Style "rxvt" UseStyle "XTerm"'.

And, fvwm/style.c says:

          while(isspace(*restofline))restofline++;
          tmp = restofline;
          while( tmp && *tmp &&(*tmp != ',')&&
                 (*tmp != '\n')&&(!isspace(*tmp)))
            tmp++;
          if((len = tmp - restofline) > 0)
          {
            nptr = Scr.TheList;
            while(nptr && mystrncasecmp(restofline,nptr->name,len) )
              nptr = nptr->next;
            if (nptr&& !mystrncasecmp(restofline,nptr->name,len))
            {
                /* ... processing ... */
            }

Assume that following line is written in the configulation file.

        Style "XTerm" NoTitle
        Style "rxvt" UseStyle "XTerm"

If we trust the manual, style of rxvt is the same of XTerm. But fvwm
complains about this description, i.e.,

        fvwm: UseStyle: "XTerm" style not found!

It is natual when you see the code (see the condition of the while
loop). Second line should be:

        Style "rxvt" UseStyle XTerm

My question is simple: Which is the true, manual or code ?

***

And, here is a short patch to add newline to error message of 'UseStyle'
(I think).

--- style.c.dist Sun Feb 25 21:41:46 1996
+++ style.c Sun Feb 25 21:42:00 1996
_at_@ -571,7 +571,7 @@
               tmp=safemalloc(500);
               strcat(tmp,"UseStyle: ");
               strncat(tmp,restofline-len,len);
- strcat(tmp," style not found!");
+ strcat(tmp," style not found!\n");
               fvwm_err(tmp,NULL,NULL,NULL);
               free(tmp);
             }


- -
Makoto `MAR_kun' MATSUSHITA
--
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 Sun Feb 25 1996 - 06:57:00 GMT

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