Lines Matching refs:pos

114 static char *			nonspace(char *pos, char *end);
115 static char * getspace(char *pos, char *end);
116 static char * cvtnum(char *pos, char *end, uint64_t *num);
490 char *nonspace(char *pos, char *end) { /* Find next non-space in string */
492 if(pos >= end) return end; /* Don't go past end */
493 if(pos[0] == 0) return end; /* If at null, make end */
496 if(pos[0] != ' ') return pos; /* Leave if we found one */
497 pos++; /* Stop */
498 if(pos >= end) return end; /* Quit if we run off end */
502 char *getspace(char *pos, char *end) { /* Find next non-space in string */
505 if(pos >= end) return end; /* Don't go past end */
506 if(pos[0] == 0) return end; /* Leave if we hit null */
507 if(pos[0] == ' ') return pos; /* Leave if we found one */
508 pos++; /* Stop */
512 char *cvtnum(char *pos, char *end, uint64_t *num) { /* Convert to a number */
519 if(pos >= end) return end; /* Don't go past end */
520 if(pos[0] == 0) return end; /* If at null, make end */
522 if(pos[0] == '0' && ((pos[1] == 'x') || (pos[1] == 'x'))) { /* A hex constant? */
524 pos += 2; /* Point to the number */
529 if(pos >= end) return end; /* Don't go past end */
530 if(pos[0] == 0) return end; /* If at null, make end */
531 if(pos[0] < '0') return pos; /* Leave if non-digit */
532 dig = pos[0] & 0xF; /* Extract digit */
533 if(pos[0] > '9') { /* Is it bigger than 9? */
534 if(rad == 10) return pos; /* Leave if not base 10 */
535 if(!(((pos[0] >= 'A') && (pos[0] <= 'F'))
536 || ((pos[0] >= 'a') && (pos[0] <= 'f')))) return pos; /* Leave if bogus char */
540 pos++; /* Step on */