home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.editors
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!haven.umd.edu!darwin.sura.net!jvnc.net!princeton!phoenix.Princeton.EDU!mgflax
- From: mgflax@phoenix.Princeton.EDU (Marshall G. Flax)
- Subject: Re: Counter in VI?
- Message-ID: <1992Aug13.170213.13487@Princeton.EDU>
- Sender: news@Princeton.EDU (USENET News System)
- Nntp-Posting-Host: phoenix.princeton.edu
- Organization: Princeton University
- References: <1623@applix.com>
- Date: Thu, 13 Aug 1992 17:02:13 GMT
- Lines: 20
-
- In article <1623@applix.com> jimr@applix.com (Jim Rouleau [ext 256]) writes:
- >What I'd like to do is take something like this:
- >
- > #define z 26
- > to become
- > #define z 25
-
- Pipe the relevant lines through awk! (Although, if you're really only
- concerned with changing #defines, compilers will generate exactly the
- same code given
- #define z (26-1)
- as if they received
- #define z 25
- and the addition of the parenthesis et.al. can clearly be done within vi.)
-
- marshall
- --
- ------- (c) 1992, Marshall Gene Flax <mgflax@phoenix.Princeton.EDU> -------
- ----------- 5 Joyce Lane, Woodbury, NY 11797, 516-364-9331,9379 ----------
- - c/o Jack Gelfand,Psychology Dept,Princeton U.,NJ 08544,609-258-6739 (w) -
-