home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
historic
/
v941.tgz
/
icon.v941src.tar
/
icon.v941src
/
ipl
/
progs
/
adlfiltr.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
1KB
|
59 lines
############################################################################
#
# File: adlfiltr.icn
#
# Subject: Program to filter address list entries
#
# Author: Ralph E. Griswold
#
# Date: September 2, 1991
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program filters address lists, allowing through only those entries
# with specified selectors.
#
# The options are:
#
# -s arg selects entries with characters in args (default is all)
# -x inverts the logic, selecting characters not in args
#
############################################################################
#
# See also: address.doc, adlcheck.icn, adlcount.icn, adllist.icn,
# adlsort,icn, labels.icn
#
# Links: adlutils, options
#
############################################################################
link adlutils, options
procedure main(args)
local selectors, add, opts
opts := options(args,"xs:")
selectors := cset(\opts["s"]) | &cset
if /opts["x"] then {
while add := nextadd() do
add.header ? {
move(1)
if upto(selectors) then writeadd(add)
}
}
else {
while add := nextadd() do
add.header ? {
move(1)
if not upto(selectors) then writeadd(add)
}
}
end