[comp.sys.atari.st] AUTOCOPY

braner@batcomputer.tn.cornell.edu (braner) (12/14/86)

[]

It's nice to have a bunch of programs load into the RAMDISK upon boot.
I used to do it via the login file of microcsh, but looked for another way.
Recently tried out a program named "fld2rdsk", which copies all files in
the folder "cpy2rdsk" to drive D:\.  Works, but somehow needs a LOT of disk-
drive head movements back and forth: SOUNDS unhealthy for the hardware.

A program was posted here a long time ago, named "AUTOCOPY".  Here is an
improved version of it, both source and executable.  Put it in the AUTO
folder, and also put in that folder a file named "AUTOCOPY.DAT", a text
file each line of which holds a source filename and a destination filename.
The improvements I made transformed it into a "style 2" program (only
GEMDOS calls, no C lib stuff --> it's compact), and increased the speed
of operation by reading the whole .DAT file at once, then processing the
copied files via a large buffer.

Recommended order of writing things into \AUTO:

	RAMDISK (rd576 or eternal - they're equivalent)
	KILLER.PRG
	AUTOCOPY.PRG
	AUTOCOPY.DAT

"Share and enjoy"

- Moshe Braner

PS: I noticed that in the following uuencoded garble there are no space
characters, but there are a lot of ````s (ASCII code 60 hex).  Is that
due to it being an ARC file, or is there something special about the
uuencoding program I used?  Is that a hindrance to uudecoding, or an
advantage for passing through machines made by you-know-who?  (I added
'a' at the end of each line anyway.)

----- cut here, uudecode and feed to ARC to get autocopy.prg, autocopy.c -----
begin 644 AUTOCOPY.ARC
M&@A!551/0T]062Y#````W`<``(T--;@5^1,/```,+U0T4`!%RI,C4H(T&0@"a
MTH`@5:@\&?($2A80+4`$J4/G#0@X<MZ<D1.F#8B.(,:\@9,'A)DT;,K,`1&&a
M#H@Y>>;0*6-2S)LW=!@Z%-*2RALW(.R$0?K$3ADY8LJ460,"!`\J4(;@L"&Ca
M1)$I5(H,<2$D"14G1:CX&"AT0),W9-*\+$,&A)B6;^>@*0-""$DW3UF`V!I#a
M1HP9;!48J>)D")4D3YRTI8(FS4R0(DF:M'S28]2/;,*,H0LB#5(Z>T%P@2C1a
MY1LV9)Z".'HRM4^@(.+.6>.B;1*;8Y;:Y5MG#FF4*EF"R/.FCA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72]G'?K:QG4UL?@1``,R.=K49a
M0NUD3QO9Q;YVMKM=;(9(@Q\%P$,.^,`001B",SH`@1/>``(RE&$.=$B#&\*0a
M[S>X`01F2`,;R@"".<"A#&-(0\#+0(8&*```5Q`X&WC[!CJ`X`UV*(,<[B"'a
M--"!X'Q[^)8H7O`ZC`$-`!=X&1P^D#&$P0UNJ/C%#_[O@0#\#7(``<<]OG*1a
M#^$-<,B#OL\``IO3@=X#83D`BB`'.>!<YQW/MQN(GG21,]WI.9=#&<)`AJ$7a
M/>0#V4`10``)"`2A"E1XPA">`(4L./SA7#A[VN..=K6S/0LN($(0J#`0NL]=a
M[G9O>][W3G&+F^$-=7!#PZW>]*=KG>M>]_L3)+]VP>N="DI7`.`KGX64NR$-a
><T`#PY6^=B>DC+55P,+IW4J%T[,<$@40@`$``!H`a
`
end

pes@bath63.ux63.bath.ac.uk (Paul Smee) (12/17/86)

Regarding the ````s in uuencoded files:  They're probably a hindrance to
uudecoding, but a definite aid in transmitting.  My uudecode doesn't handle
them, but some will I believe.  Note that space is 40 octal and ` is 140 octal.
As such, ` is'nt in the uuencode charset.  It will be being used to replace
spaces.  At some stage in the process of porting to your ST, you'll need
(probably) to use an editor to globally replace the `s by spaces.

The advantage of using ` is that (not being a space) it won't get stripped
from the ends of lines; and, since ``s are not multiple spaces, you don't
have to worry about some too-clever-by-half machine deciding it can turn
multiple spaces into tabs according to its own local rules (sometimes an
issue).

So, in summary, if you get a uuencoded file containing `s, turn them all
into space chars.

ljdickey@water.UUCP (Lee Dickey) (12/24/86)

In article <674@bath63.ux63.bath.ac.uk>, pes@bath63.ux63.bath.ac.uk (Paul Smee) writes:

> The advantage of using ` is that (not being a space) it won't get stripped
> from the ends of lines....

> So, in summary, if you get a uuencoded file containing `s, turn them all
> into space chars.

I think that this is a dangerous suggestion, because some ASCII to EBCDIC
conversions get the caret (^), the grave accent (`) and the tilde (~) mixed
up.  I saw some files pass this way with lots of grave accents that had
started life as carets.

There are other solutions to the problem of blanks at the end of lines.

  (1)	If the lines are truncated, put some blanks in yourself. 
	It seems to matter not if you put in too many blanks.
	For example, this worked for me:
		"g/^M/s/$/       /"
	My uudecode program was not upset by the extra blanks
	that I put in at the end of the lines, and it got
	everything right.

  (2)	Put in some terminator at the end of every line before you
	transmit it.  Someone recently sent a file with an "a" at
	the end of every full line.  (A full line is one that 
	starts with an "M" and has at least 61 chars in it.) 
	I made two copies of this file, one with the "a" and
	one without, by doing something like this:
		"g/^M/s/a$//"
	The uudecode program produced the same result from both
	encoded files.


Neither of these solves the problem of multiple blanks being turned
to tab characters.  Are there any mailers that do this?
Perhaps a text editor might do that, maybe, but no file handlers, please.

Please do not deliberately introduce files with these non-UUencode
characters in them.  If you do, then the errors of conversion that I
mentioned above can not be corrected.

The solutions that you found may be fine for you to get around whatever
problems your text editor may have.  If they are, use them.  Locally.

But please keep them local and do not introduce them onto the net.

-- 
  Prof. L. J. Dickey, Faculty of Mathematics, University of Waterloo. 
	ljdickey@water.UUCP    ljdickey%water@waterloo.CSNET
 	ljdickey%water%waterloo.csnet@csnet-relay.ARPA
	ljdickey@watdcs.BITNET