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
/
gprogs
/
clrs2pdb.icn
< prev
next >
Wrap
Text File
|
2002-01-24
|
1KB
|
57 lines
############################################################################
#
# File: clrs2pdb.icn
#
# Subject: Program to create custom palettes from color lists
#
# Author: Ralph E. Griswold
#
# Date: October 29, 2001
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program builds a palette database from color lists.
#
############################################################################
#
# Requires: Version 9 graphics
#
############################################################################
#
# Links: basename, palettes, xcode
#
############################################################################
link basename
link palettes
link xcode
global PDB_
procedure main(args)
local file, input, clist, line, name
every file := !args do {
input := open(file) | {
write(&errout, "*** cannot open ", image(file))
next
}
name := basename(file, ".clr")
clist := []
while line := read(input) do {
line ?:= tab(upto('\t'))
put(clist, line)
}
close(input)
makepalette(name, clist) |
write(&errout, "*** could not make palette from ", image(file))
}
xencode(PDB_, &output)
end