Y no or up e2next up e2next e1p or up e2next e2x

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: amp; pointer */ rptr->rl_bufptr = rptr->rl_buf; } /**************************************************** * Error-handling wrappers for Stevens’s I/O helpers ****************************************************/ ssize_t Readn(int fd, void *ptr, size_t nbytes) { ssize_t n; if ((n = readn(fd, ptr, nbytes)) < 0) unix_error("Readn error"); return n; } void Writen(int fd, void *ptr, size_t nbytes) { if (writen(fd, ptr, nbytes) != nbytes) unix_error("Writen error"); } ssize_t Readline(int fd, void *ptr, size_t maxlen) { ssize_t n; if ((n = readline(fd, ptr, maxlen)) < 0) unix_error("Readline error"); return n; } ssize_t Readline_r(Rline *rptr) { ssize_t n; if ( (n = readline_r(rptr)) == -1) unix_error("readline_r error"); return(n); } 690 747 748 749 750 APPENDIX A. ERROR HANDLING void Readline_rinit(int fd, void *ptr, size_t maxlen, Rline *rptr) { readline_rinit(fd, ptr, maxlen, rptr); } code/src/csapp.c Appendix B Solutions to Practice Problems B.1 Intro B.2 Representing and Manipulating...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online