コード例 #1
0
void load_songs(void)
{
    FILE *fp;
    int count = 0, lines, i;
    char letter;

    /* reset global */
    for (i = 0; i <= MAX_GLOBAL; i++)
	channel_songs[i] = -1;

    if ((fp = fopen(MUSIC_FILE,"r")) == NULL)
    {
	bug("Couldn't open music file, no songs available.",0);
	fclose(fp);
	return;
    }

    for (count = 0; count < MAX_SONGS; count++)
    {
        letter = fread_letter(fp);
        if (letter == '#')
        {
            if (count < MAX_SONGS)
                song_table[count].name = NULL;
            fclose(fp);
            return;
        }
  	else
	    ungetc(letter,fp);

	song_table[count].group = fread_string(fp);
	song_table[count].name 	= fread_string(fp);

	/* read lyrics */
	lines = 0;

	for ( ; ;)
	{
	    letter = fread_letter(fp);

	    if (letter == '~')
	    {
		song_table[count].lines = lines;
		break;
	    }
	    else
		ungetc(letter,fp);
		
	    if (lines >= MAX_LINES)
   	    {
		bug("Too many lines in a song -- limit is  %d.",MAX_LINES);
		break;
	    }

	    song_table[count].lyrics[lines] = fread_string_eol(fp);
	    lines++;
	}
    }
}
コード例 #2
0
ファイル: dam.c プロジェクト: kalendae/emlenmud-for-centos
void
read_damages (void)
{
  FILE *df;
  char buf[1000];
  int lastmark= 0;
  bzero (&dmsg, sizeof (dmsg));
  if ((df = fopen ("dam.dat", "r")) == NULL)
    {

      damt.kick_dam = str_dup ("o+2d/4m40+k/2");
      write_damages ();
    }
  for (;;)
    {
      strcpy (buf, fread_word (df));
      if (!str_cmp (buf, "END"))
	break;
      if (!str_cmp (buf, "Kickd"))
	damt.kick_dam = str_dup (fread_word (df));
      if (!str_prefix ("#", buf))
	{
	  fread_to_eol (df);
	  continue;
	}
      if (!str_cmp (buf, "GENERIC"))
	{
	  dmsg.generic_range[lastmark][0] = fread_number (df);
	  dmsg.generic_range[lastmark][1] = fread_number (df);
	  dmsg.generic_percent[lastmark][0] = fread_number (df);
	  dmsg.generic_percent[lastmark][1] = fread_number (df);
	  fread_to_eol (df);
	  dmsg.gen_m[lastmark] = fread_string_eol (df);
	  dmsg.gen_m1[lastmark] = fread_string_eol (df);
	  dmsg.gen_m2[lastmark]= fread_string_eol (df);
	  lastmark++;
	}
    }
  fclose (df);
  return;
}
コード例 #3
0
ファイル: ban.c プロジェクト: KillerMud/Source
void load_bans( void )
{
    FILE * fp;
    BAN_DATA *ban_last;
    char * site;

    if ( ( fp = fopen( BAN_FILE, "r" ) ) == NULL )
        return ;

    ban_last = NULL;
    for ( ; ; )
    {
        BAN_DATA *pban;
        if ( feof( fp ) )
        {
            fclose( fp );
            return ;
        }

        pban = new_ban();

        site = fread_word( fp );
        if ( !str_cmp( site, "#" ) )
        {
            fclose( fp );
            return ;
        }

        pban->site = str_dup( site );
        pban->ban_flags = fread_flag( fp );
        pban->person = str_dup( fread_word( fp ) );
        pban->date_stamp = fread_long_number( fp );
        pban->period = fread_number( fp );
        pban->reason = fread_string_eol( fp );

        if ( pban->period > 0 && pban->date_stamp + ( pban->period * 24 * 3600 ) <= current_time )
        {
            free_ban( pban );
            continue;
        }

        if ( ban_list == NULL )
            ban_list = pban;
        else
            ban_last->next = pban;
        ban_last = pban;
    }
}
コード例 #4
0
ファイル: files.c プロジェクト: h3rb/gc
/*
 * Returns a list of lines
 */
STRING_LIST *fread_file( char *filename ) {
     FILE *fp=fopen( filename, "r" );
     STRING_LIST *slist=NULL;
     STRING_LIST *last=NULL;

     if (fp == NULL) { OUTPUT("File not found: %s\n", filename); return NULL; }
     
     while( !feof(fp) && !ferror(fp) )
     {
        STRING_LIST *snode = new_string_list( );
        snode->str=fread_string_eol(fp);
        if ( snode->str == NULL ) { free_string_list(snode); break; }
        if ( last != NULL ) last->next = snode;
        else slist=snode;
        last=snode;
     }
     
     fclose(fp);
     return slist;
}
コード例 #5
0
ファイル: db2.c プロジェクト: MikeMayer/act-of-war
void load_socials(FILE * fp)
{
    for (;;) {
	struct social_type social;
	char *temp;
	/* clear social */
	social.char_no_arg = NULL;
	social.others_no_arg = NULL;
	social.char_found = NULL;
	social.others_found = NULL;
	social.vict_found = NULL;
	social.char_not_found = NULL;
	social.char_auto = NULL;
	social.others_auto = NULL;

	temp = fread_word(fp);
	if (!strcmp(temp, "#0"))
	    return;		/* done */

	strcpy(social.name, temp);
	fread_to_eol(fp);

	temp = fread_string_eol(fp);
	if (!strcmp(temp, "$"))
	    social.char_no_arg = NULL;
	else if (!strcmp(temp, "#")) {
	    social_table[social_count] = social;
	    social_count++;
	    continue;
	} else
	    social.char_no_arg = temp;

	temp = fread_string_eol(fp);
	if (!strcmp(temp, "$"))
	    social.others_no_arg = NULL;
	else if (!strcmp(temp, "#")) {
	    social_table[social_count] = social;
	    social_count++;
	    continue;
	} else
	    social.others_no_arg = temp;

	temp = fread_string_eol(fp);
	if (!strcmp(temp, "$"))
	    social.char_found = NULL;
	else if (!strcmp(temp, "#")) {
	    social_table[social_count] = social;
	    social_count++;
	    continue;
	} else
	    social.char_found = temp;

	temp = fread_string_eol(fp);
	if (!strcmp(temp, "$"))
	    social.others_found = NULL;
	else if (!strcmp(temp, "#")) {
	    social_table[social_count] = social;
	    social_count++;
	    continue;
	} else
	    social.others_found = temp;

	temp = fread_string_eol(fp);
	if (!strcmp(temp, "$"))
	    social.vict_found = NULL;
	else if (!strcmp(temp, "#")) {
	    social_table[social_count] = social;
	    social_count++;
	    continue;
	} else
	    social.vict_found = temp;

	temp = fread_string_eol(fp);
	if (!strcmp(temp, "$"))
	    social.char_not_found = NULL;
	else if (!strcmp(temp, "#")) {
	    social_table[social_count] = social;
	    social_count++;
	    continue;
	} else
	    social.char_not_found = temp;

	temp = fread_string_eol(fp);
	if (!strcmp(temp, "$"))
	    social.char_auto = NULL;
	else if (!strcmp(temp, "#")) {
	    social_table[social_count] = social;
	    social_count++;
	    continue;
	} else
	    social.char_auto = temp;

	temp = fread_string_eol(fp);
	if (!strcmp(temp, "$"))
	    social.others_auto = NULL;
	else if (!strcmp(temp, "#")) {
	    social_table[social_count] = social;
	    social_count++;
	    continue;
	} else
	    social.others_auto = temp;

	social_table[social_count] = social;
	social_count++;
    }
    return;
}
コード例 #6
0
/* snarf a socials file */
void load_socials ( FILE *fp )
{
	for ( ; ; ) {
		struct social_type social;
		char *temp;
		/* clear social */
		social.char_no_arg = NULL;
		social.others_no_arg = NULL;
		social.char_found = NULL;
		social.others_found = NULL;
		social.vict_found = NULL;
		social.char_not_found = NULL;
		social.char_auto = NULL;
		social.others_auto = NULL;

		temp = fread_word ( fp );
		if ( !strcmp ( temp, "#0" ) )
		{ return; }  /* done */
#if defined(social_debug)
		else
		{ fprintf ( stderr, "%s\n\r", temp ); }
#endif

		strcpy ( social.name, temp );
		fread_to_eol ( fp );

		temp = fread_string_eol ( fp );
		if ( !strcmp ( temp, "$" ) )
		{ social.char_no_arg = NULL; }
		else if ( !strcmp ( temp, "#" ) ) {
			social_table[social_count] = social;
			social_count++;
			continue;
		} else
		{ social.char_no_arg = temp; }

		temp = fread_string_eol ( fp );
		if ( !strcmp ( temp, "$" ) )
		{ social.others_no_arg = NULL; }
		else if ( !strcmp ( temp, "#" ) ) {
			social_table[social_count] = social;
			social_count++;
			continue;
		} else
		{ social.others_no_arg = temp; }

		temp = fread_string_eol ( fp );
		if ( !strcmp ( temp, "$" ) )
		{ social.char_found = NULL; }
		else if ( !strcmp ( temp, "#" ) ) {
			social_table[social_count] = social;
			social_count++;
			continue;
		} else
		{ social.char_found = temp; }

		temp = fread_string_eol ( fp );
		if ( !strcmp ( temp, "$" ) )
		{ social.others_found = NULL; }
		else if ( !strcmp ( temp, "#" ) ) {
			social_table[social_count] = social;
			social_count++;
			continue;
		} else
		{ social.others_found = temp; }

		temp = fread_string_eol ( fp );
		if ( !strcmp ( temp, "$" ) )
		{ social.vict_found = NULL; }
		else if ( !strcmp ( temp, "#" ) ) {
			social_table[social_count] = social;
			social_count++;
			continue;
		} else
		{ social.vict_found = temp; }

		temp = fread_string_eol ( fp );
		if ( !strcmp ( temp, "$" ) )
		{ social.char_not_found = NULL; }
		else if ( !strcmp ( temp, "#" ) ) {
			social_table[social_count] = social;
			social_count++;
			continue;
		} else
		{ social.char_not_found = temp; }

		temp = fread_string_eol ( fp );
		if ( !strcmp ( temp, "$" ) )
		{ social.char_auto = NULL; }
		else if ( !strcmp ( temp, "#" ) ) {
			social_table[social_count] = social;
			social_count++;
			continue;
		} else
		{ social.char_auto = temp; }

		temp = fread_string_eol ( fp );
		if ( !strcmp ( temp, "$" ) )
		{ social.others_auto = NULL; }
		else if ( !strcmp ( temp, "#" ) ) {
			social_table[social_count] = social;
			social_count++;
			continue;
		} else
		{ social.others_auto = temp; }

		social_table[social_count] = social;
		social_count++;
	}
	return;
}
コード例 #7
0
ファイル: power.c プロジェクト: kalendae/emlenmud-for-centos
void 
read_power_dat (void)
{
  FILE *fp;
  char buf[80];
  int i, p, y;
  int hg = 0;
  int rhg = 0;
  int mg = 0;
  int rmg = 0;
  int ascremort = 0;
  int remort = 0;
  int guild = 0;
  int augment = 0;
  pow.loot_level=0;
  pow.flee_chance = 0;
  pow.gods=str_dup("<Empty>");
  pow.bash_slip_to_tackle = TRUE;
  pow.penalize_evil_in_sun = TRUE;
  pow.get_from_corpse_while_in_combat = TRUE;
  pow.plague_chance = 0;
  pow.auction_lag=FALSE;
  pow.can_fight_self=TRUE;
  pow.max_level=90;
  pow.good_kill_good=TRUE;
  pow.evil_kill_evil=TRUE;
  pow.all_newbies_good = FALSE;
  pow.level_to_choose = 0;
  pow.choose_in_room = 0;
  

  for (i = 0; i < 20; i++)
    pow.learned[i] = NULL;
  for (p = 0; p < 20; p++)
    pow.armor_lev_word[p] = NULL;
  i = 0;
  p = 0;
  y = 0;
  if ((fp = fopen ("power.dat", "r")) == NULL)
    {
      fprintf (stderr, "Error reading power.dat!\n\r");
      exit (6);
    }
  for (;;)
    {
      strcpy (buf, fread_word (fp));
      if (!str_prefix ("#", buf))
	{
	  fread_to_eol (fp);
	  continue;
	}
      if (!str_cmp ("END", buf))
	break;
     
      if (!str_cmp ("INITIAL_HP", buf))
	{
	  pow.initial_hp[0] = fread_number (fp);
	  pow.initial_hp[1] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REMORT_HP", buf))
	{
	  pow.remort_hp[0] = fread_number (fp);
	  pow.remort_hp[1] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("INITIAL_MV", buf))
	{
	  pow.initial_mv[0] = fread_number (fp);
	  pow.initial_mv[1] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REMORT_MV", buf))
	{
	  pow.remort_mv[0] = fread_number (fp);
	  pow.remort_mv[1] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REG_HITGAIN", buf))
	{
	  pow.hitgain[hg][0] = fread_number (fp);
	  pow.hitgain[hg][1] = fread_number (fp);
	  pow.hitgain[hg][2] = fread_number (fp);
	  pow.hitgain[hg][3] = fread_number (fp);
	  pow.hitgain[hg][4] = fread_number (fp);
	  hg++;
	  continue;
	}
      if (!str_cmp ("REM_HITGAIN", buf))
	{
	  pow.rem_hitgain[rhg][0] = fread_number (fp);
	  pow.rem_hitgain[rhg][1] = fread_number (fp);
	  pow.rem_hitgain[rhg][2] = fread_number (fp);
	  pow.rem_hitgain[rhg][3] = fread_number (fp);
	  pow.rem_hitgain[rhg][4] = fread_number (fp);
	  rhg++;
	  continue;
	}
      if (!str_cmp ("REM_MOVEGAIN", buf))
	{
	  pow.rem_movegain[rmg][0] = fread_number (fp);
	  pow.rem_movegain[rmg][1] = fread_number (fp);
	  pow.rem_movegain[rmg][2] = fread_number (fp);
	  pow.rem_movegain[rmg][3] = fread_number (fp);
	  rmg++;
	  continue;
	}
      if (!str_cmp ("REG_MOVEGAIN", buf))
	{
	  pow.movegain[mg][0] = fread_number (fp);
	  pow.movegain[mg][1] = fread_number (fp);
	  pow.movegain[mg][2] = fread_number (fp);
	  pow.movegain[mg][3] = fread_number (fp);
	  mg++;
	  continue;
	}
      if (!str_cmp ("ASCENSION_REQ", buf))
	{
	  for(y = 0; y < 5; y ++)
	    pow.ascension_req[y] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("FORSAKE_REQ", buf))
	{
	  for(y = 0; y < 4; y ++)
	    pow.forsake_req[y] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REMORT_REQ", buf))
	{
	  int jk = 0;
	  for(jk = 0; jk < 8; jk++)
	    {
	      pow.remort_req[remort][jk] = fread_number (fp);
	    }
	  remort++;
	  continue;
	}
      if (!str_cmp ("ASCENDED_REMORT_REQ", buf))
	{
	  int jk = 0;
	  for (jk = 0; jk < 8; jk ++)
	    {
	      pow.ascended_remort_req[ascremort][jk] = fread_number (fp);
	    }
	  ascremort ++;
	  continue;
	}
      if (!str_cmp ("GUILD_COST", buf))
	{
	  int jjj = 0;
	  for (jjj = 0; jjj < 7; jjj++)
	    {
	      pow.guild_info[guild][jjj] = fread_number (fp);
	    }
	  guild++;
	  continue;
	}
      if (!str_cmp ("AUGMENT_COST", buf))
	{
	  int aug = 0;
	  for (aug = 0; aug < 7; aug++)
	    {
	      pow.augment_cost[augment][aug] = fread_number (fp);
	    }
	  augment++;
	  continue;
	}    
      if (!str_cmp ("TRANSFORM_IN_ROOM", buf))
	{
	  pow.transform_in_room = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("ASCTRANSFORM_IN_ROOM", buf))
	{
	  pow.asctransform_in_room = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("AUGMENT_REMORT_ONLY", buf))
	{
	  READ_YESNO (pow.augmentremortonly);
	  continue;
	}
      if (!str_cmp ("REMORT_IN_ROOM", buf))
        {
	   for (y = 0; y < 11; y ++)
	   pow.remort_in_room[y] = fread_number(fp);
	   continue;
         }
      if (!str_cmp ("ASCEND_REMORT_IN_ROOM", buf))
        {
	   for (y = 0; y < 11; y ++)
	   pow.ascend_remort_in_room[y] = fread_number (fp);
	   continue;
	}
      if (!str_cmp ("PRAC_LEVEL", buf))
	{
	  pow.low_range[i] = fread_number (fp);
	  pow.high_range[i] = fread_number (fp);
	  pow.learned[i] = str_dup (fread_word (fp));
	  i++;
	  continue;
	}
      if (!str_cmp ("ADDS_TO_STATS", buf))
	{
	  READ_YESNO (pow.add_to_stats);
	}
      if (!str_cmp ("MAXIMUM_REMORTS", buf))
	{
	  pow.max_remorts = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REMORT_LEVEL", buf))
	{
	  pow.remort_level = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("VAPORIZE_INVENTORY", buf))
	{
	  READ_YESNO (pow.vaporize_inv);
	}
      if (!str_cmp ("VAPORIZE_ENTIRE_EQU", buf))
	{
	  READ_YESNO (pow.vaporize_all);
	}
      if (!str_cmp ("GET_FROM_CORPSE_WHILE_IN_COMBAT", buf))
	{
	  READ_YESNO (pow.get_from_corpse_while_in_combat);
	}
      if (!str_cmp ("SHOW_RACE_SELECT_INFO", buf))
	{
	  READ_YESNO (pow.show_race_select_info);
	}
      if (!str_cmp ("GOOD_KILL_GOOD", buf))
	{
	  READ_YESNO (pow.good_kill_good);
	}
      if (!str_cmp ("EVIL_KILL_EVIL", buf))
	{
	  READ_YESNO (pow.evil_kill_evil);
	}

      if (!str_cmp ("MORTS_USE_COLOR_CHAT", buf))
	{
	  READ_YESNO (pow.morts_use_color_chat);
	}
      if (!str_cmp ("RESTORE_WHEN_LEVEL", buf))
	{
	  READ_YESNO (pow.restore_when_level);
	}
      if (!str_cmp ("PLAGUE_CHANCE", buf))
	{
	  pow.plague_chance = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("BEAMS_TO_ROOM", buf))
	{
	  pow.beams_to_room = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("ALL_NEWBIES_GOOD", buf))
	{
	  strcpy (buf, fread_word (fp));
	  if (UPPER (buf[0]) == 'Y')
	    pow.all_newbies_good = FALSE;
	  else
	    pow.all_newbies_good = TRUE;
	  continue;
	}
      if (!str_cmp ("LEVEL_TO_CHOOSE", buf))
	{
	  pow.level_to_choose = fread_number(fp);
	  continue;
	}
      if (!str_cmp ("CHOOSE_IN_ROOM", buf))
	{
	  pow.choose_in_room = fread_number(fp);
	  continue;
	}
      if (!str_cmp ("PREREQ_LEVEL", buf))
	{
	  pow.prereq = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("WEATHER_EFFECTS", buf))
	{
	  READ_YESNO (pow.weather);
	}
      if (!str_cmp ("PLAYER_PROMPT", buf))
	{
	  READ_YESNO (pow.player_prompt);
	}
      if (!str_cmp ("SKILL_LOSS_ON_MOB_DEATH", buf))
	{
	  READ_YESNO (pow.skill_loss_on_mob_death);
	}
      if (!str_cmp ("SKILL_LOSS_ON_PK_DEATH", buf))
	{
	  READ_YESNO (pow.skill_loss_on_pk_death);
	}
      if (!str_cmp ("SKILL_LOSS_AMOUNT", buf))
	{
	  pow.amount_lost_on_death = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("ARENA_ON", buf))
	{
	  READ_YESNO (pow.arena_on);
	}
      if (!str_cmp ("ARENA_GOOD_EVIL", buf))
	{
	  READ_YESNO (pow.arena_good_evil);
	}
      if (!str_cmp ("REQUIRED_VALIDATION", buf))
	{
	  READ_YESNO (pow.validation);
	}
      if (!str_cmp ("MUD_EMAIL_ADDRESS", buf))
	{
	  strcpy (pow.email_to, fread_word (fp));
	  continue;
	}
      if (!str_cmp ("EASIER_MOVE_STYLE", buf))
	{
	  READ_YESNO (pow.easier_moves);
	}
      if (!str_cmp ("MAX_PRACTICE_SKILLS", buf))
	{
	  pow.max_prac_skills = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("MOB_EXP", buf))
	{
	  pow.mob_exp = str_dup (fread_word (fp));
	  continue;
	}
      if (!str_cmp ("EXP_TO_LEVEL", buf))
	{
	  pow.exp_to_level = str_dup (fread_word (fp));
	  continue;
	}
      if (!str_cmp ("HIGHLEV_EXP_TO_LEVEL", buf))
	{
	  pow.highlev_exp_to_level = str_dup (fread_word (fp));
	  continue;
	}
      if (!str_cmp ("MAX_PRACTICE_SPELLS", buf))
	{
	  pow.max_prac_spells = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_1", buf))
	{
	  pow.newbie_object[0] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_2", buf))
	{
	  pow.newbie_object[1] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_3", buf))
	{
	  pow.newbie_object[2] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_4", buf))
	{
	  pow.newbie_object[3] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_5", buf))
	{
	  pow.newbie_object[4] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_6", buf))
	{
	  pow.newbie_object[5] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_7", buf))
	{
	  pow.newbie_object[6] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_8", buf))
	{
	  pow.newbie_object[7] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_9", buf))
	{
	  pow.newbie_object[8] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("NEWBIE_OBJECT_10", buf))
	{
	  pow.newbie_object[9] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("ALLOW_WHERE", buf))
	{
	  READ_YESNO (pow.allow_where);
	}
      if (!str_cmp ("CAN_SUMMON_MOBS", buf))
	{
	  READ_YESNO (pow.can_summon_mobs);
	}
      if (!str_cmp ("EVIL_CAN_CAST_SPELLS", buf))
	{
	  READ_YESNO (pow.evil_can_cast);
	}
      if (!str_cmp ("PERCENT_PRACTICES", buf))
	{
	  pow.practice_percent = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REPAIR_WEAPONS", buf))
	{
	  pow.repair_weapons[0] = fread_number (fp);
	  pow.repair_weapons[1] = fread_number (fp);
	  pow.repair_weapons[2] = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REPAIR_ARMORS", buf))
	{
	  pow.repair_armors = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("TINKER_DISCOUNT", buf))
	{
	  pow.tinker_discount = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("RESIZE_DIVISOR", buf))
	{
	  pow.resize_divisor = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("SPACE_NEEDED", buf))
	{
	  pow.space_needed = fread_number (fp);
	  if (fBootDb)
	    {
	      string_space = calloc (1, pow.space_needed);
	      top_string = string_space;
	    }
	  continue;
	}
      if (!str_cmp ("REMORT_BONUS_FIXED", buf))
	{
	  strcpy (buf, fread_word (fp));
	  if (UPPER (buf[0]) == 'Y')
	    pow.remort_bonus_fixed = TRUE;
	  else
	    pow.remort_bonus_fixed = FALSE;
	  continue;
	}
      if (!str_cmp ("EQUIP_IN_COMBAT", buf))
	{
	  READ_YESNO (pow.equip_in_combat);
	}
      if (!str_cmp ("REMOVE_WHILE_FIGHTING", buf))
	{
	  READ_YESNO (pow.remove_while_fighting);
	}
      if (!str_cmp ("SCORE_WHILE_FIGHTING", buf))
	{
	  READ_YESNO (pow.score_while_fighting);
	}
      if (!str_cmp ("AUTO_AUCTION", buf))
	{
	  READ_YESNO (pow.auto_auction);
	}
      if (!str_cmp ("FIGHT_SELF", buf))
	{
	  READ_YESNO (pow.can_fight_self);
	}
      if (!str_cmp ("LOOT_LEVEL", buf))
	{
	pow.loot_level=fread_number(fp);
	continue;
	}
      if (!str_cmp ("MAX_LEVEL", buf))
	{
	pow.max_level=fread_number(fp);
	continue;
	}
      if (!str_cmp ("AUCTION_LAG", buf))
	{
	  READ_YESNO (pow.auction_lag);
	}
      if (!str_cmp ("GIVE_WHILE_FIGHTING", buf))
	{
	  READ_YESNO (pow.give_while_fighting);
	}
      if (!str_cmp ("FLEE_CHANCE", buf))
	{
	  pow.flee_chance = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("PENALIZE_EVIL_IN_SUN", buf))
	{
	  READ_YESNO (pow.penalize_evil_in_sun);
	}
      if (!str_cmp ("BASH_SLIP_TO_TACKLE", buf))
	{
	  READ_YESNO (pow.bash_slip_to_tackle);
	}
      if (!str_cmp ("TACKLE_WITH_WEAPON", buf))
	{
	  READ_YESNO (pow.tackle_with_weapon);
	}
      if (!str_cmp ("TACKLE_PERSON_WITH_WEAPON", buf))
	{
	  READ_YESNO (pow.tackle_person_with_weapon);
	}
      if (!str_cmp ("ALLOW_REROLLS", buf))
	{
	  READ_YESNO (pow.allow_rerolls);
	}
      if (!str_cmp ("REGEN_MANA", buf))
	{
	  pow.base_mana_regen_bonus = fread_number (fp);
	  pow.med_mana_regen_bonus = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REGEN_HP", buf))
	{
	  pow.base_hp_regen = fread_number (fp);
	  pow.hp_bonus_resting = fread_number (fp);
	  pow.hp_bonus_sleeping = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("REGEN_MP", buf))
	{
	  pow.base_mp_regen = fread_number (fp);
	  pow.mp_bonus_resting = fread_number (fp);
	  pow.mp_bonus_sleeping = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("GROUNDFIGHT_STAND", buf))
	{
	  pow.groundfight_stand = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("FLURRY_MPS", buf))
	{
	  pow.flurry_mps = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("LEVEL_TO_SEE_NUMERIC_STATS", buf))
	{
	  pow.level_to_see_numeric_stats = fread_number (fp);
	  continue;
	}
      if (!str_cmp ("HPS_FOR_CON", buf))
	{
	  int k;
	  for (k = 0; k < 36; k++)
	    {
	      con_app[k].hit = fread_number (fp);
	    }
	  continue;
	}
      if (!str_cmp ("PRACS_FOR_WIS", buf))
	{
	  int k;
	  for (k = 0; k < 36; k++)
	    {
	      wis_app[k].practice = fread_number (fp);
	    }
	  continue;
	}
      if (!str_cmp ("PRAC_INCREASE_FOR_INTELLIGENCE", buf))
	{
	  int k;
	  for (k = 0; k < 36; k++)
	    {
	      int_app[k].learn = fread_number (fp);
	    }
	  continue;
	}
      if (!str_cmp ("ARMOR_LEV", buf))
	{
	  pow.armor_lev_min[p] = fread_number (fp);
	  pow.armor_lev_max[p] = fread_number (fp);
	  pow.armor_lev_word[p] = fread_string_eol (fp);
	  p++;
	  continue;
	}
      if (!str_cmp ("GODS", buf)) {
	free_string(pow.gods);
	pow.gods = fread_string_eol(fp);
	continue;
	}
      if (!str_cmp ("SACNAMES", buf))
	{
	  pow.god_names[0] = str_dup (fread_word (fp));
	  pow.god_names[1] = str_dup (fread_word (fp));
	  pow.god_names[2] = str_dup (fread_word (fp));
	  pow.god_names[3] = str_dup (fread_word (fp));
	  pow.god_names[4] = str_dup (fread_word (fp));
	  continue;
	}
      fprintf (stderr, "Unknown read: %s.\n", buf);
      fread_to_eol (fp);
    }
  fclose (fp);
  return;
}