home *** CD-ROM | disk | FTP | other *** search
- /*
- * patname - do grep-type matching on the filename, using the pattern
- * in tw.patname.
- *
- * Copyright (C) 1989 Mike Meyer
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- address command
- 'echo >ram:twpat1' arg(2)
- 'grep.lattice >ram:twpat2 -c -q' getclip('tw.patname') 'ram:twpat1'
- num = 0
- if open(in, 'ram:twpat2') then do
- parse value readln(in) with num .
- call close in
- end
- 'delete ram:twpat1 ram:twpat2'
- return num > 0
-