Cut & Paste version 1.0 Copyright 1991, Michael Dorman INTRODUCTION Well, I've finally finished it--my first GEM program in C. My first real program in C, for that matter. It's been quite a learning experience--I now know more about GNU C and Sozobon C than I ever thought I would, some of it good, some bad, some downright painful. In fact, GNU C is responsible for this program even existing. If I hadn't wanted the sources to GCC version 1.40, I wouldn't have had to write this program. I needed to get the archive from work to home, and the only reasonable way was to use floppies, which required cutting the file into several *large* pieces, and then reassembling them back at home. I had just started programming, and as a result of acquiring some programming tools, I had been able to get rid of my CLI--I get enough CLIing to last me a lifetime at work, so getting rid of it was quite nice. However, it also meant I had gotten rid of the only way I could concatenate files together. Instead of doing the obvious, simple, fast thing and reinstalling my CLI for the nonce, I instead decided to write a GEM-based program to do this for me. It then occured to me that the program may as well be able to cut files apart, so after several weeks of work--I was learning GEM at the same time, the code to do the actual operations wasn't that hard--I had what you see before you. Hope you like it. USAGE Well, Cut & Paste does two things, chop files into little bits and put them back together. The entries in the menubar, as a result, are quite simple. Desk ---- The only entry here other than your DAs is "About Cut & Paste". It's pretty self-explanitory. Select it and you get a dialog box telling you about the program. Oh, but the wonders of a (supposedly) consistent user interface! Try this a few times if you like watching the dialog box draw itself. File ---- There are three entries under the "File" menu entry. I'll take the last first--"Quit". It does just what it says. Select this, and you're out of the program. "Cut a file" will also do what you expect. Select the source file first (it'll present you with a file-selector). This is the file you want to hack to bits. You will then be assaulted with another file selector. In this, type the name of the filename you want the pieces to be named--be warned, any extension you enter will be ignored, as the file's pieces are distinguished by a number in the extension--as a result, you should be able to hack a file into 1000 pieces (0-999) just fine. If a file of this name already exists, you will be warned--select "Cancel" to back out, or "Overwrite" to proceed (although the file will only be overwritten if the name is the same, and the extender has a sufficiently low number that you'll be cutting the file into at least that many pieces--this is just a safety feature). Next, you will see a dialog box, asking you to enter the size in K of the pieces to cut the file into. The default is 713, because that is the number of K on an IBM formatted disk. Change it to whatever you want, but it must have a value of at least 1 or nothing will happen. A box with "Please wait while your files are processed" will pop up--this is just so you'll know the program hasn't gone off the deep end. When this file disappears, your file has been chopped. "Paste a file" also does what you expect--it concatenates two files into one. First, the program will ask for the name of the first half of the file. Then it will ask for the second half. Then it will ask for the name of the concatenated file. Like the "Cut a file" function, this will warn you if you're about to overwrite a file--this is more serious, since it doesn't change the extender at all, it just concatenates. The same "Please wait while your files are processed" message will pop up. When it disappears, your file is done! NOTES & STUFF First off, this is a freeware program. If you want to send money, I certainly won't stop you--I'm a college student, and can use all the money I can get--but don't feel obligated. I would appreciate bug reports at any of the electronic addresses I have- -I'll tell you those later. Second, although this is freeware, I'm not giving up any copyrights--the code is still mine, it is not public domain. Which brings us to... Third, I will not be held responsible for any problems arising from the use of this program, nor will I be held responsible for the merchantability of the program or its fitness for a particular use. USE AT YOUR OWN RISK! Please report bugs, but don't expect me to replace a $1000 600MB HD that came to a stuttering end when you used this program. If I had a lawyer at this moment, he would no doubt have wanted me to say the above. Fourth, things I still want to do: I want to clean up the code some (I told you this was my first C program!). I want to set it up so you can paste more than two files together with one operation (the GCC archive is a minimum of four files, when cut to fit on an IBM-formatted 3.5" disk--it takes three times through paste to get it all pasted together). I want to have a slider in the dialog for the size to cut files into. I want to make if faster (it only uses a 1K buffer at this point, even for file pasting). Eventually, I'd like to turn this into a file-maintenance program, with stuff like an intelligent undelete and stuff like that--however, that's a ways in the future, and it'd probably be commercial anyhow. I think that's it for my wish list. HOW TO CONTACT ME I can be contacted in a number of ways. In addition to soliciting bug reports through these channels, I generally like to correspond with other ST users, so feel free to contact me just to talk--be warned, though, I'm ususally lazy about replying: MDORMAN1@UA1VM.UA.EDU from the Internet mike.dorman on BIX M.DORMAN2 on GEnie That's all, folks!