Lines Matching refs:token

71  * token, which must have enough space for the tokens.  Return the
76 gv_tokenize(char *cptr, char *token[], int maxtoken)
78 int tokennr; /* Index of this token. */
92 token[tokennr] = cptr; /* Point to it. */
439 gv_new_drive(int max, char *token[])
445 if (token[1] == NULL || *token[1] == '\0')
452 if (!strcmp(token[j], "state")) {
458 d->state = gv_drivestatei(token[j]);
459 } else if (!strcmp(token[j], "device")) {
465 ptr = token[j];
472 strlcpy(d->name, token[j], sizeof(d->name));
489 gv_new_volume(int max, char *token[])
494 if (token[1] == NULL || *token[1] == '\0')
503 if (!strcmp(token[j], "state")) {
509 v->state = gv_volstatei(token[j]);
512 strlcpy(v->name, token[j], sizeof(v->name));
529 gv_new_plex(int max, char *token[])
534 if (token[1] == NULL || *token[1] == '\0')
543 if (!strcmp(token[j], "name")) {
549 strlcpy(p->name, token[j], sizeof(p->name));
550 } else if (!strcmp(token[j], "org")) {
556 p->org = gv_plexorgi(token[j]);
564 p->stripesize = gv_sizespec(token[j]);
570 } else if (!strcmp(token[j], "state")) {
576 p->state = gv_plexstatei(token[j]);
577 } else if (!strcmp(token[j], "vol") ||
578 !strcmp(token[j], "volume")) {
584 strlcpy(p->volume, token[j], sizeof(p->volume));
603 gv_new_sd(int max, char *token[])
608 if (token[1] == NULL || *token[1] == '\0')
617 if (!strcmp(token[j], "name")) {
623 strlcpy(s->name, token[j], sizeof(s->name));
624 } else if (!strcmp(token[j], "drive")) {
630 strlcpy(s->drive, token[j], sizeof(s->drive));
631 } else if (!strcmp(token[j], "plex")) {
637 strlcpy(s->plex, token[j], sizeof(s->plex));
638 } else if (!strcmp(token[j], "state")) {
644 s->state = gv_sdstatei(token[j]);
645 } else if (!strcmp(token[j], "len") ||
646 !strcmp(token[j], "length")) {
652 s->size = gv_sizespec(token[j]);
655 } else if (!strcmp(token[j], "driveoffset")) {
661 s->drive_offset = gv_sizespec(token[j]);
667 } else if (!strcmp(token[j], "plexoffset")) {
673 s->plex_offset = gv_sizespec(token[j]);