43
686
APPENDIX F. SOURCE CODE LISTINGS
&index);
/*******************************************
*
*
Loop through the characters in the
*
depth_line. Call one of the three
*
processing routines based on the
*
relationship between the last character
*
and this character.
*
*******************************************/
last_character = depth_line[0];
pp_index = 0;
for(j=0; j<width; j++){
this_character = depth_line[j];
if(this_character == ’\n’)
this_character = last_character;
if(this_character > last_character)
shorten_pattern(
(this_character-last_character),
pattern, &index, ¤t_width,
width);
if(this_character < last_character)
lengthen_pattern(
(last_character-this_character),
pattern, &index, ¤t_width,
&width, &max_width);
/****************************************
*
*
Perform the no_change in every
*
pass. Do it after you have done
*
the shorten and lenghten pattern.
*
****************************************/