Lines Matching refs:attribute
62 static int restore_toplevel_attr(const char *attribute, char *txt);
63 static int restore_player_attr(const char *attribute, char *txt);
64 static int restore_deck_attr(const char *attribute, char *txt);
65 static int restore_square_attr(const char *attribute, char *txt);
454 char *attribute; in restore_parseline() local
484 attribute = s; in restore_parseline()
485 s = strchr(attribute, ' '); in restore_parseline()
488 attribute); in restore_parseline()
500 return restore_toplevel_attr(attribute, txt); in restore_parseline()
504 return restore_player_attr(attribute, txt); in restore_parseline()
508 return restore_deck_attr(attribute, txt); in restore_parseline()
512 return restore_square_attr(attribute, txt); in restore_parseline()
520 restore_toplevel_attr(const char *attribute, char *txt) in restore_toplevel_attr() argument
522 if (!strcmp(attribute, "time")) { in restore_toplevel_attr()
524 } else if (!strcmp(attribute, "numplayers")) { in restore_toplevel_attr()
536 } else if (!strcmp(attribute, "currentplayer")) { in restore_toplevel_attr()
545 } else if (!strcmp(attribute, "doubles")) { in restore_toplevel_attr()
549 } else if (!strcmp(attribute, "player")) { in restore_toplevel_attr()
555 } else if (!strcmp(attribute, "deck")) { in restore_toplevel_attr()
561 } else if (!strcmp(attribute, "square")) { in restore_toplevel_attr()
568 printf("unknown attribute %s\n", attribute); in restore_toplevel_attr()
575 restore_player_attr(const char *attribute, char *txt) in restore_player_attr() argument
586 if (!strcmp(attribute, "name")) { in restore_player_attr()
599 } else if (!strcmp(attribute, "money")) { in restore_player_attr()
600 if (getnum(attribute, txt, 0, INT_MAX, &pp->money) < 0) { in restore_player_attr()
603 } else if (!strcmp(attribute, "loc")) { in restore_player_attr()
605 if (getnum(attribute, txt, 0, N_SQRS, &tmp) < 0) { in restore_player_attr()
609 } else if (!strcmp(attribute, "num_gojf")) { in restore_player_attr()
610 if (getnum(attribute, txt, 0, 2, &tmp) < 0) { in restore_player_attr()
614 } else if (!strcmp(attribute, "in_jail")) { in restore_player_attr()
615 if (getnum(attribute, txt, 0, 3, &tmp) < 0) { in restore_player_attr()
624 printf("unknown attribute %s\n", attribute); in restore_player_attr()
631 restore_deck_attr(const char *attribute, char *txt) in restore_deck_attr() argument
639 if (!strcmp(attribute, "numcards")) { in restore_deck_attr()
640 if (getnum(attribute, txt, dp->num_cards, dp->num_cards, in restore_deck_attr()
644 } else if (!strcmp(attribute, "topcard")) { in restore_deck_attr()
645 if (getnum(attribute, txt, 0, dp->num_cards, in restore_deck_attr()
649 } else if (!strcmp(attribute, "gojf_used")) { in restore_deck_attr()
650 if (getnum(attribute, txt, 0, 1, &tmp) < 0) { in restore_deck_attr()
654 } else if (!strcmp(attribute, "cards")) { in restore_deck_attr()
670 printf("unknown attribute %s\n", attribute); in restore_deck_attr()
677 restore_square_attr(const char *attribute, char *txt) in restore_square_attr() argument
682 if (!strcmp(attribute, "owner")) { in restore_square_attr()
683 if (getnum(attribute, txt, -1, num_play-1, &tmp) < 0) { in restore_square_attr()
689 } else if (!strcmp(attribute, "morg")) { in restore_square_attr()
694 if (getnum(attribute, txt, 0, 1, &tmp) < 0) { in restore_square_attr()
698 } else if (!strcmp(attribute, "houses")) { in restore_square_attr()
703 if (getnum(attribute, txt, 0, 5, &tmp) < 0) { in restore_square_attr()
708 printf("unknown attribute %s\n", attribute); in restore_square_attr()