home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 19 Printer
/
19-Printer.zip
/
LAPRINT.ZIP
/
ENINI.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-01-10
|
3KB
|
75 lines
/************************************************************************
* *
* (c) Cray Research, Inc., 1991. All rights reserved. *
* *
* This program and/or module and all modifications made by Cray *
* Research, Inc., are the sole property of Cray Research, Inc., and *
* shall not be made available to or used by any person or persons *
* without the prior written permission of Cray Research, Inc. *
* *
* Programs and/or modules which are deemed in the public domain or *
* whose copyright is held by another legal entity other than Cray *
* Research, Inc., shall be deemed excluded from the above named *
* restrictions and protections. *
* *
* All changes made by Cray Research Inc which represent original *
* work, modifications, descriptions or ideas to the above excluded *
* programs and/or modules shall not be made available to or used by *
* any person or persons without the prior written permission of *
* Cray Research, Inc. *
* *
* *
* Program name : enini *
* Program purpose: Convert an human readable file into a LaPrint *
* 0.1 laprint.ini file. *
* *
************************************************************************/
input_file = 'enini.ini'
output_file = 'laprint.ini'
number_printers = 0
number_servers = 0
number_output_lines = 1
if lines(input_file) = 0 then do
say input_file 'does not exist.'
exit 28
end
do i = 1 to 100000 while lines(input_file)
inline.i = linein(input_file)
end
inline.0 = i - 1
do i = 1 to inline.0
parse var inline.i keyword '=' parameters
select
when keyword = 'printer' then do
number_output_lines = number_output_lines + 1
output_lines.number_output_lines = number_printers ||,
' printer = ' ||,
parameters
number_printers = number_printers + 1
end
when keyword = 'server' then do
number_output_lines = number_output_lines + 1
output_lines.number_output_lines = number_servers ||,
' server = ' ||,
parameters
number_servers = number_servers + 1
end
otherwise nop
end
end
output_lines.1 = 'LaPrint' number_printers number_servers
do i = 1 to number_output_lines
output_lines.i = bitxor(output_lines.i,,'80'x)
call lineout output_file, output_lines.i
end
exit