home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 5.ddi / MWHC.005 / H3 < prev    next >
Encoding:
Text File  |  1992-12-09  |  1.3 KB  |  31 lines

  1. { (C) Copyright  1986-1992 MetaWare Incorporated;  Santa Cruz, CA 95060. }
  2.  
  3. #if 0
  4. This defines line termination conventions on a particular system.
  5. Both the input line terminator and the output line terminator are
  6. specified.  This allows one to write a program to convert text from one
  7. format to another by simply reading and writing lines.
  8. The values are exported from an assembly language routine so that
  9. they can easily be changed without recompiling any Pascal source.
  10. Re-linking with the modified assembly version means that a new Pascal
  11. compiler can be produced with a different line termination convention.
  12. These values can also be changed dynamically by the programmer at
  13. execution time.
  14.  
  15. There may be at most 2 chars in the input line terminator.
  16. The output line terminator may be of any length.
  17. For systems terminating a line with a single character (e.g UNIX), merely
  18. set both strings to a string of length 1 containing just that character.
  19. #endif
  20.  
  21. pragma c_include('implement.pf');
  22. package Lineterm;
  23.    pragma data(common,Implement.RTE || 'ltconv');
  24.    var LTConv_in, LTConv_out: string(2);
  25.    pragma data;
  26.    const LF = chr(10); CR = chr(13);
  27.    { For UNIX: LTConv = LF }
  28.    { For MS-DOS: LTConv = CR || LF }
  29.    { For Daisy Logician: LTConv = CR }
  30.    end;
  31.