comparison lzo.c @ 4447:ed710b7b5f72 libavcodec

Documentation fix: Copy functions should "work" fine for cnt == 0
author reimar
date Wed, 31 Jan 2007 20:26:32 +0000
parents b8b844ae5937
children 2dd1ace1919c
comparison
equal deleted inserted replaced
4446:b8b844ae5937 4447:ed710b7b5f72
79 #define COPY4(d, s) (d)[0] = (s)[0]; (d)[1] = (s)[1]; (d)[2] = (s)[2]; (d)[3] = (s)[3]; 79 #define COPY4(d, s) (d)[0] = (s)[0]; (d)[1] = (s)[1]; (d)[2] = (s)[2]; (d)[3] = (s)[3];
80 #endif 80 #endif
81 81
82 /** 82 /**
83 * \brief copy bytes from input to output buffer with checking 83 * \brief copy bytes from input to output buffer with checking
84 * \param cnt number of bytes to copy, must be > 0 84 * \param cnt number of bytes to copy, must be >= 0
85 */ 85 */
86 static inline void copy(LZOContext *c, int cnt) { 86 static inline void copy(LZOContext *c, int cnt) {
87 register uint8_t *src = c->in; 87 register uint8_t *src = c->in;
88 register uint8_t *dst = c->out; 88 register uint8_t *dst = c->out;
89 if (src + cnt > c->in_end || src + cnt < src) { 89 if (src + cnt > c->in_end || src + cnt < src) {
107 } 107 }
108 108
109 /** 109 /**
110 * \brief copy previously decoded bytes to current position 110 * \brief copy previously decoded bytes to current position
111 * \param back how many bytes back we start 111 * \param back how many bytes back we start
112 * \param cnt number of bytes to copy, must be > 0 112 * \param cnt number of bytes to copy, must be >= 0
113 * 113 *
114 * cnt > back is valid, this will copy the bytes we just copied, 114 * cnt > back is valid, this will copy the bytes we just copied,
115 * thus creating a repeating pattern with a period length of back. 115 * thus creating a repeating pattern with a period length of back.
116 */ 116 */
117 static inline void copy_backptr(LZOContext *c, int back, int cnt) { 117 static inline void copy_backptr(LZOContext *c, int back, int cnt) {