[BACK]Return to abuf.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / aucat

Diff for /src/usr.bin/aucat/abuf.c between version 1.23 and 1.24

version 1.23, 2011/10/12 07:20:03 version 1.24, 2012/04/11 06:05:43
Line 77 
Line 77 
 #endif  #endif
   
 struct abuf *  struct abuf *
 abuf_new(unsigned nfr, struct aparams *par)  abuf_new(unsigned int nfr, struct aparams *par)
 {  {
         struct abuf *buf;          struct abuf *buf;
         unsigned len, bpf;          unsigned int len, bpf;
   
         bpf = aparams_bpf(par);          bpf = aparams_bpf(par);
         len = nfr * bpf;          len = nfr * bpf;
Line 164 
Line 164 
  * Get a pointer to the readable block at the given offset.   * Get a pointer to the readable block at the given offset.
  */   */
 unsigned char *  unsigned char *
 abuf_rgetblk(struct abuf *buf, unsigned *rsize, unsigned ofs)  abuf_rgetblk(struct abuf *buf, unsigned int *rsize, unsigned int ofs)
 {  {
         unsigned count, start, used;          unsigned int count, start, used;
   
         start = buf->start + ofs;          start = buf->start + ofs;
         used = buf->used - ofs;          used = buf->used - ofs;
Line 192 
Line 192 
  * Discard the block at the start postion.   * Discard the block at the start postion.
  */   */
 void  void
 abuf_rdiscard(struct abuf *buf, unsigned count)  abuf_rdiscard(struct abuf *buf, unsigned int count)
 {  {
 #ifdef DEBUG  #ifdef DEBUG
         if (count > buf->used) {          if (count > buf->used) {
Line 219 
Line 219 
  * Commit the data written at the end postion.   * Commit the data written at the end postion.
  */   */
 void  void
 abuf_wcommit(struct abuf *buf, unsigned count)  abuf_wcommit(struct abuf *buf, unsigned int count)
 {  {
 #ifdef DEBUG  #ifdef DEBUG
         if (count > (buf->len - buf->used)) {          if (count > (buf->len - buf->used)) {
Line 243 
Line 243 
  * Get a pointer to the writable block at offset ofs.   * Get a pointer to the writable block at offset ofs.
  */   */
 unsigned char *  unsigned char *
 abuf_wgetblk(struct abuf *buf, unsigned *rsize, unsigned ofs)  abuf_wgetblk(struct abuf *buf, unsigned int *rsize, unsigned int ofs)
 {  {
         unsigned end, avail, count;          unsigned int end, avail, count;
   
   
         end = buf->start + buf->used + ofs;          end = buf->start + buf->used + ofs;

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24