Lines Matching refs:ch
87 static int fromhex(char ch)
89 if ((ch >= 'a') && (ch <= 'f')) {
90 return ch - 'a' + 10;
91 } else if ((ch >= '0') && (ch <= '9')) {
92 return ch - '0';
93 } else if ((ch >= 'A') && (ch <= 'F')) {
94 return ch - 'A' + 10;
141 uint8_t ch;
149 r = gdb_arch_read_byte((uint8_t * SAFE NONNULL)TC(mem + mempos), &ch);
154 buf[bufpos++] = tohex(ch >> 4); // top bits of char
155 buf[bufpos++] = tohex(ch & 0xf); // bottom bits of char
172 uint8_t ch;
175 ch = fromhex(*buf++) << 4;
177 ch += fromhex(*buf++);
180 ch);
200 char ch = 0; /* shut up a useless deputy warning */
212 ch = mygetchar();
213 if (ch == '$') {
215 } else if (ch == '#') {
218 checksum += ch;
219 buffer[bufpos++] = ch;
227 if (ch == '#') {
255 char ch = buffer[pos];
256 myputchar(ch);
257 checksum += ch;