Advertisement
Guest User

buffer.h

a guest
Apr 20th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. /*
  2. * buffer.h
  3. *
  4. * Created on: 20.04.2014
  5. * Author: LemanRuss777
  6. */
  7.  
  8. #ifndef BUFFER_H_
  9. #define BUFFER_H_
  10.  
  11. #endif /* BUFFER_H_ */
  12. typedef struct buffer {
  13. int ind, max_ind, size;
  14. void* data;
  15. };
  16. int bufferwrite(buffer* buf, void* elem){
  17. If (buf -> ind = = buf -> max_ind)
  18. buf -> idn = 0;
  19. memepy(buf->data+buf->ind* buf->size,elem,buf->size);
  20. ++buf->ind;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement