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
/
ibar.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
908b
|
36 lines
############################################################################
#
# File: ibar.icn
#
# Subject: Program to equalize comment bars in Icon programs
#
# Author: Ralph E. Griswold
#
# Date: June 8, 1994
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program replaces comment bars in Icon programs by bars 76 characters
# long -- the program library standard.
#
############################################################################
procedure main()
local bar, short_bar, line, notcom
bar := repl("#", 76)
short_bar := repl("#", 60)
notcom := ~'#'
while line := read() do
line ? {
if =short_bar & not(upto(notcom)) & *line ~= 76 then write(bar)
else write(line)
}
end