This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

tcsh 6.15.00: errors running scripts with DOS line endings



For some scripts having DOS line endings, particularly long ones or ones with while loops, tcsh jumps to the wrong place occasionally. I reported this problem 4 years ago and it was fixed for the test script that I provided then, but the problem has persisted with more complex scripts. I have finally run into a reportable example which is attached.


On a machine with binmode mounts, the script functions properly:

 ./alignlog -e aligna.log
                                               Final   F :       0.1740000E-02
 Number of cycles :    85
 121 views,  266 geometric variables,   27 3-D points,  3267 projection points
  Ratio of total measured values to all unknowns =  6534/ 584 =  11.19
 Residual error mean and sd:   0.597   0.346

On a machine with textmode mounts (cygcheck attached) it gives an error:
 ./alignlog -e a
                                               Final   F :       0.1740000E-02
 Number of cycles :    85
 121 views,  266 geometric variables,   27 3-D points,  3267 projection points
  Ratio of total measured values to all unknowns =  6534/ 584 =  11.19
 Residual error mean and sd:   0.597   0.346
Unmatched ".

Running with -v, it is clear that it gets lost after coming to the end of the
while loop, jumping back too far to the middle of a line before the loop:

....
grep "Ratio .*formerly" $file > /dev/null
set oneratio = $status
grep "olved beam tilt" $file > /dev/null
set nobeamtilt = $status

while ( $#argv > $numarg )
switch ( $argv[1] )
if ( $output == 1 ) then
if ( ! $newratios ) then
if ( $oneratio ) then
awk '/^.*Final   F/, /^  Ratio of/' $file
                                               Final   F :       0.1740000E-02
 Number of cycles :    85
 121 views,  266 geometric variables,   27 3-D points,  3267 projection points
  Ratio of total measured values to all unknowns =  6534/ 584 =  11.19
else
grep 'Residual error' $file
 Residual error mean and sd:   0.597   0.346
set output = 1
shift
breaksw
end
eam tilt" $file > /dev/null
Unmatched ".

Regards,

David

Attachment: cygcheck.out
Description: Text document

Attachment: alignlog.tar.gz
Description: GNU Zip compressed data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]