using TWM_VERSION

From: Rudolph Todd Maceyko (rm55+@pitt.edu)
Date: Fri Jun 14 1996 - 22:58:45 CEST


How do other people do it?

I have the same home directory on many machines, some of which have
differing versions of ctwm installed. Sometimes, there isn't even any
ctwm.

So I have conditionalized my .ctwmrc first by TWM_TYPE (useful like
this: m4 .ctwmrc > .twmrc), and now my TWM_VERSION. *But*, m4
apparently doesn't do floating-point operations, so I have to munge
TWM_VERSION to usefully compare it.

This is what I'm doing. What are *you* doing?

Thanks,
-Rudy

-- 
Rudy Maceyko <rm55+@pitt.edu>
Computing & Information Services
University of Pittsburgh

divert(-1)dnl # protect shell commands against m4 # changequote(,) changequote(%[,]%) ifdef(%[TWM_TYPE]%, %[]%, %[define(%[TWM_TYPE]%, %[twm]%)]%) ifdef(%[TWM_VERSION]%, %[define(%[dotpos]%, index(TWM_VERSION,%[.]%)) ifelse(dotpos, -1, %[define(%[MY_TWM_VERSION]%, TWM_VERSION)]%, %[define(%[majorver]%, substr(TWM_VERSION, 0, dotpos)) define(%[minorver]%, substr(TWM_VERSION, eval(dotpos + 1), eval(len(TWM_VERSION) - dotpos))) ifelse(eval(minorver < 10), 1, define(%[minorver]%, 0%[]%minorver)) define(%[MY_TWM_VERSION]%, majorver%[]%minorver)]%)]%, %[define(%[MY_TWM_VERSION]%, 0)]%) define(%[SU]%, syscmd(test -f /usr/pitt/bin/asu)ifelse(sysval, 0, /usr/pitt/bin/asu, su)) divert(0)dnl define(%[CONCAT]%, %[$1$2$3$4$5$6$7]%)dnl



This archive was generated by hypermail 2.1.2 : Sat Jun 22 2002 - 06:45:02 CEST