Lines Matching defs:value

67  * to the string and the length of the string. It sets 'value' to the value of
79 unsigned long value;
84 /* Check syntax and work out the encoded value (if correct) */
86 value = *p++ & 0x7f;
91 value = (*p++ & 0x1f) << 6;
92 value |= *p++ & 0x3f;
93 if(value < 0x80) return -4;
99 value = (*p++ & 0xf) << 12;
100 value |= (*p++ & 0x3f) << 6;
101 value |= *p++ & 0x3f;
102 if(value < 0x800) return -4;
109 value = ((unsigned long)(*p++ & 0x7)) << 18;
110 value |= (*p++ & 0x3f) << 12;
111 value |= (*p++ & 0x3f) << 6;
112 value |= *p++ & 0x3f;
113 if(value < 0x10000) return -4;
121 value = ((unsigned long)(*p++ & 0x3)) << 24;
122 value |= ((unsigned long)(*p++ & 0x3f)) << 18;
123 value |= ((unsigned long)(*p++ & 0x3f)) << 12;
124 value |= (*p++ & 0x3f) << 6;
125 value |= *p++ & 0x3f;
126 if(value < 0x200000) return -4;
135 value = ((unsigned long)(*p++ & 0x1)) << 30;
136 value |= ((unsigned long)(*p++ & 0x3f)) << 24;
137 value |= ((unsigned long)(*p++ & 0x3f)) << 18;
138 value |= ((unsigned long)(*p++ & 0x3f)) << 12;
139 value |= (*p++ & 0x3f) << 6;
140 value |= *p++ & 0x3f;
141 if(value < 0x4000000) return -4;
144 *val = value;
148 /* This takes a character 'value' and writes the UTF8 encoded value in
155 int UTF8_putc(unsigned char *str, int len, unsigned long value)
159 if(value < 0x80) {
160 if(str) *str = (unsigned char)value;
163 if(value < 0x800) {
166 *str++ = (unsigned char)(((value >> 6) & 0x1f) | 0xc0);
167 *str = (unsigned char)((value & 0x3f) | 0x80);
171 if(value < 0x10000) {
174 *str++ = (unsigned char)(((value >> 12) & 0xf) | 0xe0);
175 *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
176 *str = (unsigned char)((value & 0x3f) | 0x80);
180 if(value < 0x200000) {
183 *str++ = (unsigned char)(((value >> 18) & 0x7) | 0xf0);
184 *str++ = (unsigned char)(((value >> 12) & 0x3f) | 0x80);
185 *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
186 *str = (unsigned char)((value & 0x3f) | 0x80);
190 if(value < 0x4000000) {
193 *str++ = (unsigned char)(((value >> 24) & 0x3) | 0xf8);
194 *str++ = (unsigned char)(((value >> 18) & 0x3f) | 0x80);
195 *str++ = (unsigned char)(((value >> 12) & 0x3f) | 0x80);
196 *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
197 *str = (unsigned char)((value & 0x3f) | 0x80);
203 *str++ = (unsigned char)(((value >> 30) & 0x1) | 0xfc);
204 *str++ = (unsigned char)(((value >> 24) & 0x3f) | 0x80);
205 *str++ = (unsigned char)(((value >> 18) & 0x3f) | 0x80);
206 *str++ = (unsigned char)(((value >> 12) & 0x3f) | 0x80);
207 *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
208 *str = (unsigned char)((value & 0x3f) | 0x80);