[cs631apue] HW#2

Rob Hoffmann rhoffman at stevens.edu
Sat Oct 1 14:00:24 EDT 2011


Professor,

When I presented my code in class you mentioned that I should change my 
char buffer to a void buffer. If this is the case, is copying binary 
files a required part of the assignment, and if so should I be changing 
read/write to fread/fwrite in order to accommodate this?

-Rob

On 9/30/2011 10:06 PM, Jan Schaumann wrote:
> Hello,
>
> I've just finished grading HW#2.  Most of you did well, but all of you
> had some issues.  I'd like to give you an opportunity to submit another
> version of your program after you have reviewed this email and your code
> once more.
>
> General advise:
> - remember to check the return value of any function that can fail
> - remember to have explicit 'else' blocks for your 'if's
> - implement error reporting using strerror(3)/perror(3)
> - make sure to write error messages to stderr, not stdout
> - consider all possible edge-cases of the program invocation:
> 	- empty files
> 	- gigantic files
> 	- file permissions on source or destination
> 	- copying over existing files
> 	- copying a file onto itself
> - use strncat/strlcat, strncpy/strlcpy etc. instead of the non-n/non-l
>    versions
>
> I have a simple test script that I use to verify some basic
> functionality at:
>
>   http://www.cs.stevens.edu/~jschauma/631/testcp.sh
>
> You can run it to check if your program passes the basic requirements
> (though that is not all that I'm testing) by running:
>
> sh testcp.sh -p path/to/your/executable
>
> (Pass it one or more "-v" flags to have it report what it's doing.)
>
> If you would like to review your code and resubmit it, please do so by
> 2011-10-03 18:15:00.
>
> -Jan
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/cgi-bin/mailman/listinfo/cs631apue



More information about the cs631apue mailing list