home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / norskdata / ndkhli.pas < prev    next >
Pascal/Delphi Source File  |  2020-01-01  |  1KB  |  62 lines

  1. (* tab p; *)
  2. function printable(ch : char) : boolean;
  3.  
  4. begin
  5.     if ch in (.' '..'~'.) then
  6.         printable := true
  7.     else
  8.         printable := false
  9. end;
  10. function nextch(line_image : line;var count : integer) : char;
  11.  
  12. begin
  13.     nextch := line_image(.count.);
  14.     count := count + 1;
  15. end;
  16.  
  17. procedure get_line(var line_image : line;var count : integer);
  18.  
  19. var ch : char;
  20.     index : integer;
  21.  
  22. begin
  23.     index := 1;
  24.     repeat
  25.         ch := inbt(log_unit);
  26.         line_image(.index.) := ch;
  27.         index := index +1;
  28.     until ch = chr(lf);
  29.     count := 1;
  30. end;
  31.  
  32. procedure skip_until_number(var line_image: line;var count : integer);
  33.  
  34. begin
  35.     repeat
  36.         get_line(line_image,count);
  37.     until line_image(.1.) in (.'0'..'9'.);
  38. end;
  39.  
  40. procedure print_line(line_image : line);
  41.  
  42. var index : integer;
  43.     ch    : char;
  44.  
  45. begin
  46.     index := 1;
  47.     repeat
  48.         ch := line_image(.index.);
  49.         outbt(1,ch);
  50.         index := index +1;
  51.     until ch = chr(lf);
  52. end;
  53.  
  54. procedure back_wind(line_image : line;var count : integer);
  55.  
  56. begin
  57.     count := count - 1;
  58.     if count = 0 then
  59.         halt('ERROR : not possible to backwind 1');
  60. end;
  61. 
  62.