home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / TEXT / UTILITY / TSFILT18.ZIP / TSFILT.NWS < prev    next >
Encoding:
Text File  |  1991-10-18  |  6.8 KB  |  130 lines

  1. University of Vaasa, Finland, MIPS R2030 workstation garbo.uwasa.fi
  2. has a large collection of PD and shareware PC programs available by
  3. anonymous ftp and mail server. The file /pc/ts/0news-ts contains
  4. news about the TS-programs in the /pc/ts directory (in reverse
  5. order). This text, which you now have, is an extract from the
  6. 0news-ts file.
  7. ...................................................................
  8. Prof. Timo Salmi        
  9. Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.87.1
  10. School of Business Studies, University of Vaasa, SF-65101, Finland
  11. Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun
  12. ...................................................................
  13.  
  14. Fri 18-Oct-91: I have updated my filters for converting Unix <-->
  15. MsDos text files. As you know, Unix text files use ascii 10 as eolns
  16. (end of lines), while MsDos text files use the ascii 13 10 pair.
  17. PC2UNIX.EXE and UNIX2PC.EXE filters in the updated
  18.      garbo.uwasa.fi:/pc/ts/tsfilt18.arc
  19. can be used to convert the eolns. I have added a /t test switch for
  20. batch programming to both the filters. When the switch is on, the
  21. filters return errorlevel==0 if the file redirected to the filter is
  22. a text file. Else it returns errorlevel==1.
  23.    I have added a U2PC.BAT batch which utilizes this feature. The
  24. purpose of the U2PC.BAT batch is to convert the original Unix
  25. textfile into an MsDos textfile, and preserve the date/time stamp of
  26. the file in converting it. To use it you'll need my TOUCH.EXE
  27. program from garbo.uwaswa.fi:/pc/ts/tsutlb19.arc (note that earlier
  28. versions won't do). You also must have at least MsDos version 3.30.
  29.    In fact I wrote this batch for my own needs, but decided to make
  30. it publicly available, too. The background is this. I have been
  31. transferring also text files from my hosts (chyde and garbo) via a
  32. modem connection to my home PC.  To make the transfer more efficient
  33. I have used .arc compression first. This choice is because .arc can
  34. correctly handle the the Unix <-> PC eoln conversion, while the
  35. current .zip and .zoo do not have this feature. However, because of
  36. its better efficiency I want to use .zip packing to transfer the
  37. textfiles. But I also want to preserve the original date/time stamps
  38. of the files when I do the eoln conversion on my PC after unpacking
  39. the relevant .zip file, so I wrote this batch for this purpose.
  40.    Furthermore, there is a new UNZIPTXT.BAT batch which unzips a zip
  41. file and converts the found Unix text files into MsDos text files
  42. while preserving the date/time stamps intact.
  43.    Incidentally, if you find U2PC.BAT and UNZIPTXT.BAT instructive,
  44. there is plenty more in /pc/ts/tsbat27.arc.
  45.  
  46. Tue 21-May-91: I have programmed three sets of various MsDos
  47. filters, and now updated the first set to be /pc/ts/tsfile17.arc. In
  48. general, the true (Unix-type) filters are written to rely on pipes
  49. and/or redirection. A common practical problem with these filters is
  50. that if you type the filter name all by itself, you appear to be
  51. stuck. In actual fact the filter is just expecting input from the
  52. console. The remedy to this problem is to program the filter in a
  53. way that it senses whether it is getting piped (or redirected)
  54. input. If it is not, then instead of filtering, the call to the
  55. filter should give the instructions. As an example consider the
  56. filter UNIX2PC which converts Unix eolns (end of lines) to PC eolns
  57. (useful if you transfer Unix text files to your PC). The common
  58. syntax using pipe and redirection is
  59.           TYPE UNIX.TXT | UNIX2PC > PC.TXT
  60. What I have done is to reprogram UNIX2PC in such a way that if you
  61. write alone
  62.           UNIX2PC
  63. this call will give you the instructions, instead of waiting for
  64. input from the console to the filter. Technically speaking this is
  65. achieved by a program code which detects where the input comes from,
  66. and acts accordingly. The idea for using this redirection detection
  67. code comes from an article in the PC Magazine, April 16, 1991, p.
  68. 374. (This does not work for MsDos versions earlier than 2.00).
  69.    I have included this feature in the following of the filters in
  70. the updated tsfilt17.arc package:
  71.           PC2UNIX.EXE     PC text eolns to Unix eolns
  72.           UNIX2PC.EXE     Unix text eolns to PC eolns
  73.           ASC2IBM.EXE     7 ascii to Scandinavian 8bit ibm
  74.           IBM2ASC.EXE     8bit ibm to Scandinavian 7 ascii
  75. The input and output of also ASC2IBM.EXE and IBM2ASC.EXE has not
  76. been buffered for faster disk access (in other words these filters
  77. kind of have a cache of their own).
  78.    The following edited extract from my Frequently Asked Questions
  79. is also of interest here:
  80. 23. *****
  81.  Q: Where can I find compress for MsDos to handle .Z files?
  82.  A: Unix has compress, uncompress and zcat programs to pack or
  83. unpack files which are given the .Z extension. These files can also
  84. be handled under MsDos using for example /pc/unix/comp430d.zip,
  85. which is available from anonymous FTP sites like garbo.uwasa.fi,
  86. SIMTEL20, etc.
  87.    There is one useful trick if you uncompress on MsDos such text
  88. files that have been made on Unix with compress. Unix and MsDos have
  89. different eolns (end of lines). You can extract a Unix compressed
  90. text file as follows
  91.       comp430d -d -c YourZFile | unix2pc > YourOutputFile
  92. where unix2pc.exe is taken from /pc/ts/tsfilt17.arc (or whatever is
  93. the current version number).
  94.  
  95.  
  96. 28-Aug-89: TSFILT16.ARC has the following enhancements:
  97.  
  98. - ASC2IBM.EXE and IBM2ASC.EXE have been added. These are filters for
  99.   Scandinavian conversions of 8-bit <--> 7-bit characters. They
  100.   perform a similar function as TOIBM.EXE and TOASC.EXE. The
  101.   difference is that the latter are programs taking the files as
  102.   parameters, while the new programs are filters, which can be used
  103.   in pipes. The background of these two new filter is the following.
  104.   I discovered that I needed the conversion utilities for Unix as
  105.   well, and wrote these two filters in a Unix system using Pascal
  106.   making the programs as portable as possible. I then imported the
  107.   source code to my PC and recompiled them with Turbo Pascal.
  108.   Because of their origin ASC2IBM.EXE and IBM2ASC.EXE have not been
  109.   optimized for Turbo Pascal speed.
  110.  
  111. - QUOTE.EXE switches have been redesigned. It now works in the same
  112.   way as my Unix quote filter. Those of you who might be interested
  113.   in my Unix programs, and have and ftp capability, can obtain them
  114.   by anonymous ftp from the University of Vaasa, Finland, Sun 4,
  115.   site 128.214.12.3, directory /unix/ts.
  116.  
  117.  
  118. TSFILT15.ARC has the following enhancements and fixes:
  119.  
  120. - PC2UNIX.EXE, UNIX2PC.EXE, and QUOTE.EXE have been introduced to
  121.   the package.
  122.  
  123. - All the programs have been recompiled with a lower heap limit.
  124.  
  125. - LOGFILT.EXE no longer uses direct video output, which means
  126.   enhanced compatibility.
  127.  
  128. - FLSUBS.EXE, TOASC.EXE, TOASCI.EXE, and TOIBM.EXE have been made
  129.   more tolerant to the order of parameters and switches.
  130.