home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / mailpro / pr.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-08-23  |  1.6 KB  |  79 lines

  1. unit PR;
  2.  
  3. interface
  4. uses Def;
  5. procedure GetPrinters;
  6. procedure PutPrinters;
  7. procedure GetPrinterCodes;
  8. procedure PutPrinterCodes;
  9.  
  10. implementation
  11.  
  12. procedure GetPrinters;
  13. var TempFile:              text;
  14.     I:                     integer;
  15. begin
  16. {$I-}
  17. assign(TempFile,'printers.drv');
  18. reset(TempFile);
  19. for I := 1 to MostPrinters do
  20.     begin
  21.     Printers[I] := ' ';
  22.     readln(TempFile,Printers[I]);
  23.     end;
  24. {$I+}
  25. if ioresult = 0 then begin end;
  26. close(TempFile);
  27. end;
  28.  
  29. procedure PutPrinters;
  30. var TempFile:              text;
  31.     I:                     integer;
  32. begin
  33. assign(TempFile,'printers.drv');
  34. rewrite(TempFile);
  35. for I := 1 to MostPrinters do writeln(TempFile,Printers[I]);
  36. close(TempFile);
  37. end;
  38.  
  39. procedure GetPrinterCodes;
  40. var I:           integer;
  41.     Continue:    boolean;
  42. begin
  43. TempFileLine := DataDrive + 'printcod';
  44. assign(IntFile,TempFileLine);
  45. reset(IntFile);
  46. I := 1;
  47. Continue := true;
  48. while (I <= MostPrinters) and Continue do
  49.    begin
  50.    {$I-}
  51.    read(IntFile,Compress1[I]);
  52.    read(IntFile,Compress2[I]);
  53.    read(IntFile,DeCompress1[I]);
  54.    read(IntFile,DeCompress2[I]);
  55.    {$I+}
  56.    if ioresult <> 0 then Continue := false;
  57.    inc(I);
  58.    end;
  59. close(IntFile);
  60. end;
  61.  
  62. procedure PutPrinterCodes;
  63. var I:           integer;
  64. begin
  65. TempFileLine := DataDrive + 'printcod';
  66. assign(IntFile,TempFileLine);
  67. rewrite(IntFile);
  68. for I := 1 to MostPrinters do
  69.    begin
  70.    write(IntFile,Compress1[I]);
  71.    write(IntFile,Compress2[I]);
  72.    write(IntFile,DeCompress1[I]);
  73.    write(IntFile,DeCompress2[I]);
  74.    end;
  75. close(IntFile);
  76. end;
  77.  
  78. end.
  79.