Rules for Compiling, Running and Sending your programs.


When typing in your programs it is best to keep only header information in the .h files. For instance, have only statements from the following list in the .h files: typedef, #include, #define, prototypes, variable type definitions. The .c files should have the C programming statments in them. It is also a good idea to modularize your files. Type all the functions in one .c file that are related (ie: type all the list functions in one file called list.c).

Your programs must run on a Unix machine. The reason for this requirement is so that you can become accustumed to making your programs portable and so you may learn a little about the Unix operating system. The Unix operating system is powerful but it takes concentration to learn it well. To send your programs to our Unix machine (henson) you may use Fetch (on Macs) or ftp (on NT machines). Once your .c and .h files are on henson (I recommend a separate directory for each program) you may compile them by typing in

cc file1.c file2.c ...
or
cc file1.c file2.c ... -o output.out
The first command will make a file called a.out, the second will make a file called output.out. If there are any typing errors, then you may make changes to your program using vi or joe (both editors). If there aren't any typing errors then you may execute your program by typing in the appropriate .out file (ie: a.out or output.out). Test your program to make sure that it works as it did on the other system.

To bundle the files to send you need to use the tar command.

tar -cf name.tar *.c *.h
This command will bundle all the .c and .h files in that directory into the file name.tar (name can be any name you wish to call it).

To encode the files before you send them so they don't get corrupted use the uuencode command.

uuencode name.tar name.tar > name.tar.uu
This command will encode the name.tar file and call it name.tar.uu.

Then get into a mail program and send kschultz mail. When asked for an attachment type name.tar.uu. You might also want to CC: yourself so you can make sure it gets to me correctly by having a copy of what I received. Check out the attached portion and make sure it has more than 0 bytes attached.

I will not accept programs except in this manner after the first program. You must have a usable henson account for the second program!