| 1436 | /* hexdd[] is defined in decl.c */ |
| 1437 | |
| 1438 | int |
| 1439 | decode_glyph(const char *str, int *glyph_ptr) |
| 1440 | { |
| 1441 | int rndchk = 0, dcount = 0, retval = 0; |
| 1442 | const char *dp; |
| 1443 | |
| 1444 | for (; *str && ++dcount <= 4; ++str) { |
| 1445 | if ((dp = strchr(hexdd, *str)) != 0) { |
| 1446 | retval++; |
| 1447 | rndchk = (rndchk * 16) + ((int) (dp - hexdd) / 2); |
| 1448 | } else |
| 1449 | break; |
| 1450 | } |
| 1451 | if (rndchk == svc.context.rndencode) { |
| 1452 | *glyph_ptr = dcount = 0; |
| 1453 | for (; *str && ++dcount <= 4; ++str) { |
| 1454 | if ((dp = strchr(hexdd, *str)) != 0) { |
| 1455 | retval++; |
| 1456 | *glyph_ptr = (*glyph_ptr * 16) + ((int) (dp - hexdd) / 2); |
| 1457 | } else |
| 1458 | break; |
| 1459 | } |
| 1460 | return retval; |
| 1461 | } |
| 1462 | return 0; |
| 1463 | } |
| 1464 | |
| 1465 | char * |
| 1466 | decode_mixed(char *buf, const char *str) |
no outgoing calls
no test coverage detected