2 * This program reads the en.mts file and inserts the entries into error.c
7 Do While Lines( fn
) > 0
9 If Strip( line ) = '' | Left( line, 1 ) = '#' Then Iterate
10 Parse Var line err
',' suberr
',' text
11 If Datatype( err
) \
= 'NUM' | DataType( suberr
) \
= 'NUM' Then Call Abort fn
, lineno
, 'Invalid line format'
13 en
.idx
= ' {' Right(err
,3)','Right(suberr
,3)',"'Changestr('"', text
, '\"' )'" },'
18 Call Stream 'error.c', 'C', 'OPEN READ'
20 Do While Lines( fn
) > 0
22 error.idx
= Linein( fn
)
25 Call Stream 'error.c', 'C', 'CLOSE'
27 Call Stream fn
, 'C', 'OPEN WRITE REPLACE'
29 If error.i
= '/* PLACEMARKER */' Then
33 Else Call Lineout fn
,error.i
35 Call Stream 'error.c', 'C', 'CLOSE'
39 Parse Arg fn
, lineno
, msg
40 Say 'Error processing' fn
'at line:' lineno
':' msg