Lines Matching refs:attribute

69 static int restore_toplevel_attr(const char *attribute, char *txt);
70 static int restore_player_attr(const char *attribute, char *txt);
71 static int restore_deck_attr(const char *attribute, char *txt);
72 static int restore_square_attr(const char *attribute, char *txt);
461 char *attribute; in restore_parseline() local
491 attribute = s; in restore_parseline()
492 s = strchr(attribute, ' '); in restore_parseline()
495 attribute); in restore_parseline()
507 return restore_toplevel_attr(attribute, txt); in restore_parseline()
511 return restore_player_attr(attribute, txt); in restore_parseline()
515 return restore_deck_attr(attribute, txt); in restore_parseline()
519 return restore_square_attr(attribute, txt); in restore_parseline()
527 restore_toplevel_attr(const char *attribute, char *txt) in restore_toplevel_attr() argument
529 if (!strcmp(attribute, "time")) { in restore_toplevel_attr()
531 } else if (!strcmp(attribute, "numplayers")) { in restore_toplevel_attr()
543 } else if (!strcmp(attribute, "currentplayer")) { in restore_toplevel_attr()
552 } else if (!strcmp(attribute, "doubles")) { in restore_toplevel_attr()
556 } else if (!strcmp(attribute, "player")) { in restore_toplevel_attr()
562 } else if (!strcmp(attribute, "deck")) { in restore_toplevel_attr()
568 } else if (!strcmp(attribute, "square")) { in restore_toplevel_attr()
575 printf("unknown attribute %s\n", attribute); in restore_toplevel_attr()
582 restore_player_attr(const char *attribute, char *txt) in restore_player_attr() argument
593 if (!strcmp(attribute, "name")) { in restore_player_attr()
606 } else if (!strcmp(attribute, "money")) { in restore_player_attr()
607 if (getnum(attribute, txt, 0, INT_MAX, &pp->money) < 0) { in restore_player_attr()
610 } else if (!strcmp(attribute, "loc")) { in restore_player_attr()
612 if (getnum(attribute, txt, 0, N_SQRS, &tmp) < 0) { in restore_player_attr()
616 } else if (!strcmp(attribute, "num_gojf")) { in restore_player_attr()
617 if (getnum(attribute, txt, 0, 2, &tmp) < 0) { in restore_player_attr()
621 } else if (!strcmp(attribute, "in_jail")) { in restore_player_attr()
622 if (getnum(attribute, txt, 0, 3, &tmp) < 0) { in restore_player_attr()
631 printf("unknown attribute %s\n", attribute); in restore_player_attr()
638 restore_deck_attr(const char *attribute, char *txt) in restore_deck_attr() argument
646 if (!strcmp(attribute, "numcards")) { in restore_deck_attr()
647 if (getnum(attribute, txt, dp->num_cards, dp->num_cards, in restore_deck_attr()
651 } else if (!strcmp(attribute, "topcard")) { in restore_deck_attr()
652 if (getnum(attribute, txt, 0, dp->num_cards, in restore_deck_attr()
656 } else if (!strcmp(attribute, "gojf_used")) { in restore_deck_attr()
657 if (getnum(attribute, txt, 0, 1, &tmp) < 0) { in restore_deck_attr()
661 } else if (!strcmp(attribute, "cards")) { in restore_deck_attr()
677 printf("unknown attribute %s\n", attribute); in restore_deck_attr()
684 restore_square_attr(const char *attribute, char *txt) in restore_square_attr() argument
689 if (!strcmp(attribute, "owner")) { in restore_square_attr()
690 if (getnum(attribute, txt, -1, num_play-1, &tmp) < 0) { in restore_square_attr()
696 } else if (!strcmp(attribute, "morg")) { in restore_square_attr()
701 if (getnum(attribute, txt, 0, 1, &tmp) < 0) { in restore_square_attr()
705 } else if (!strcmp(attribute, "houses")) { in restore_square_attr()
710 if (getnum(attribute, txt, 0, 5, &tmp) < 0) { in restore_square_attr()
715 printf("unknown attribute %s\n", attribute); in restore_square_attr()