Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 83217 | Differences between
and this patch

Collapse All | Expand All

(-)dc400b26-src/init.txt (-1 / +6 lines)
Lines 24-33 Link Here
24
# name=kernel
24
# name=kernel
25
25
26
26
27
# Directory for reading macro.txt and init.txt, and dumping characters.
27
# Directory for reading macro.txt and init.txt.
28
# It should end with the path delimiter.
28
# It should end with the path delimiter.
29
# crawl_dir=/home/bwross/crawl/
29
# crawl_dir=/home/bwross/crawl/
30
30
31
# Directory for dumping character files (morgue.txt)
32
# Setting this different from crawl_dir allows configuration
33
# to be in a separate directory.
34
# It should end with the path delimiter.
35
morgue_dir=/var/games/crawl/
31
36
32
# Here's a list of autopickup types:
37
# Here's a list of autopickup types:
33
#
38
#
(-)dc400b26-src/source/chardump.cc (-1 / +3 lines)
Lines 847-853 Link Here
847
847
848
    char file_name[kPathLen] = "\0";
848
    char file_name[kPathLen] = "\0";
849
849
850
    if (SysEnv.crawl_dir)
850
    if (SysEnv.morgue_dir)
851
        strncpy(file_name, SysEnv.morgue_dir, kPathLen);
852
    else if (SysEnv.crawl_dir)
851
        strncpy(file_name, SysEnv.crawl_dir, kPathLen);
853
        strncpy(file_name, SysEnv.crawl_dir, kPathLen);
852
854
853
    strncat(file_name, fname, kPathLen);
855
    strncat(file_name, fname, kPathLen);
(-)dc400b26-src/source/initfile.cc (+14 lines)
Lines 422-427 Link Here
422
        // some fields want capitals... none care about external spaces
422
        // some fields want capitals... none care about external spaces
423
        trim_string( field );
423
        trim_string( field );
424
        if (key != "name" && key != "crawl_dir" 
424
        if (key != "name" && key != "crawl_dir" 
425
            && key != "morgue_dir"
425
            && key != "race" && key != "class")
426
            && key != "race" && key != "class")
426
        {
427
        {
427
            tolower_string( field );
428
            tolower_string( field );
Lines 684-689 Link Here
684
                SysEnv.crawl_dir[ kNameLen - 1 ] = '\0';
685
                SysEnv.crawl_dir[ kNameLen - 1 ] = '\0';
685
            }
686
            }
686
        }
687
        }
688
        else if (key == "morgue_dir")
689
        {
690
            // We shouldn't bother to allocate this a second time
691
            // if the user puts two morgue_dir lines in the init file.
692
            if (!SysEnv.morgue_dir)
693
                SysEnv.morgue_dir = (char *) calloc(kPathLen, sizeof(char));
694
695
            if (SysEnv.morgue_dir)
696
            {
697
                strncpy(SysEnv.morgue_dir, field.c_str(), kNameLen - 1);
698
                SysEnv.morgue_dir[ kNameLen - 1 ] = '\0';
699
            }
700
        }
687
        else if (key == "race")
701
        else if (key == "race")
688
        {
702
        {
689
            Options.race = str_to_race( field );
703
            Options.race = str_to_race( field );
(-)dc400b26-src/source/externs.h (+1 lines)
Lines 445-450 Link Here
445
    char *crawl_pizza;
445
    char *crawl_pizza;
446
    char *crawl_rc;
446
    char *crawl_rc;
447
    char *crawl_dir;
447
    char *crawl_dir;
448
    char *morgue_dir;
448
    char *home;                 // only used by MULTIUSER systems
449
    char *home;                 // only used by MULTIUSER systems
449
    bool  board_with_nail;      // Easter Egg silliness
450
    bool  board_with_nail;      // Easter Egg silliness
450
};
451
};

Return to bug 83217