floyd@starsend.UUCP (Floyd Miller) (06/02/90)
The following is a description of a small piece of source code I am posting in alt.sources in a separate article under the same subject heading. It is a patch for UUIO program in the UUPC package. Patching involves simply replacing the code for the importpath() function in local/host.c with the new version I have posted, and recompiling. What the patch fixes: The first problem is that the sequencing for mail and news control/data files utilizes numerals 0-9 and both upper and lower case letters A-Z and a-z. When UUIO translates the resulting files names to fit DOS conventions it ignores the case of the letters. For example, given the following pairs of control and data files sent from a Unix host; D.foobarBrMK2, D.foobarXrMK0 and D.foobarBrMk2, D.foobarXrMk0 would be "imported" and named as; D_FOOBAR.MK2, X_FOOBAR.MK3 and D_FOOBAR.MK2, X_FOOBAR.MK3 You can see how the 2nd pair would overwrite the previous pair. This situation may only rarely occur but I had lost a number of mail and news files and decided not to to take my chances any more. Using my observation that the last character in the uucp file names is always a digit (usually 0, 2 or 3) my version of the file name translator modifies this last character according to the case of the 2 next to last characters. The rules I used are detailed in the comments with my source code. With the modification to the importpath() function the four files in the above example would be saved on disk as; D_FOOBAR.MK2, X_FOOBAR.MK3 and D_FOOBAR.MKL, X_FOOBAR.MKM The references to the data files in the control files are translated using the same function so there is no ambiguity. The 2nd problem was relatively minor annoyance. When using uucp on a Unix system to transfer files to my PC at home I would attempt to come up with DOS compatible file names only to find that UUIO renamed them. So I further modified the importpath() function to leave file names alone if they already fit the DOS convention (up to 8 chars before a dot, up to 3 after the dot and no more dots. The patch also fixes a problem converting incompatible files that were less than 11 characters long. No more duplicated characters. ******* ***************************************** ***** ************************* Floyd Miller *** *************** floyd@starsend.UUCP * ********* floyd%starsend@PRC.Unisys.com *** starsend!floyd@burdvax.PRC.Unisys.com *