From 11ab2028277167a5ed9592ff13d4090ce4d60109 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sat, 31 Oct 2009 11:06:33 -0500 Subject: Add whitespace fixes. --- crawl-ref/source/artefact.cc | 2 +- crawl-ref/source/clua.cc | 2 +- crawl-ref/source/cluautil.cc | 2 +- crawl-ref/source/exclude.cc | 4 ++-- crawl-ref/source/l_moninf.cc | 2 +- crawl-ref/source/los.cc | 2 +- crawl-ref/source/luaterp.cc | 4 ++-- crawl-ref/source/ng-input.cc | 54 ++++++++++++++++++++++---------------------- crawl-ref/source/shopping.cc | 4 ++-- 9 files changed, 38 insertions(+), 38 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index 6c8e9b87b2..f01455ab7e 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -196,7 +196,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item, // Anti-necromancy god: nothing involving necromancy or // necromantic spell use. if (brand == SPWPN_DRAINING || brand == SPWPN_PAIN - || brand == SPWPN_VAMPIRICISM || brand == SPWPN_REAPING) + || brand == SPWPN_VAMPIRICISM || brand == SPWPN_REAPING) { return (false); } diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc index 56adc93ff9..d9273b74c9 100644 --- a/crawl-ref/source/clua.cc +++ b/crawl-ref/source/clua.cc @@ -682,7 +682,7 @@ void CLua::print_stack() fprintf(stderr, EOL); } - + //////////////////////////////////////////////////////////////////////// // lua_text_pattern diff --git a/crawl-ref/source/cluautil.cc b/crawl-ref/source/cluautil.cc index 2a9cfe47bb..e55b836f3e 100644 --- a/crawl-ref/source/cluautil.cc +++ b/crawl-ref/source/cluautil.cc @@ -67,7 +67,7 @@ void luaopen_setmeta(lua_State *ls, { luaL_newmetatable(ls, meta); lua_setglobal(ls, global); - + luaL_openlib(ls, global, lua_lib, 0); // Do .__index = diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc index 7c23cf55af..8647822693 100644 --- a/crawl-ref/source/exclude.cc +++ b/crawl-ref/source/exclude.cc @@ -63,7 +63,7 @@ void set_auto_exclude(const monsters *mon) learned_something_new(TUT_AUTO_EXCLUSION, mon->pos()); } } - + // Clear auto exclusion if the monster is killed or wakes up with the // player in sight. If sleepy is true, stationary monsters are ignored. void remove_auto_exclude(const monsters *mon, bool sleepy) @@ -383,7 +383,7 @@ void marshallExcludes(writer& outf, const exclvec& excludes) } void unmarshallExcludes(reader& inf, char minorVersion, exclvec &excludes) -{ +{ excludes.clear(); int nexcludes = unmarshallShort(inf); if (nexcludes) diff --git a/crawl-ref/source/l_moninf.cc b/crawl-ref/source/l_moninf.cc index 6224837e9e..102e71213c 100644 --- a/crawl-ref/source/l_moninf.cc +++ b/crawl-ref/source/l_moninf.cc @@ -15,7 +15,7 @@ void lua_push_moninf(lua_State *ls, monster_info *mi) { - monster_info **miref = + monster_info **miref = clua_new_userdata(ls, MONINF_METATABLE); *miref = mi; } diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index 513e2fb398..282ddba85c 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -957,7 +957,7 @@ void los_def::init(const coord_def &c, const opacity_func &o, los_def::~los_def() { delete opc; - delete bds; + delete bds; } void los_def::update() diff --git a/crawl-ref/source/luaterp.cc b/crawl-ref/source/luaterp.cc index 6e6fcad3d6..8fb68448ec 100644 --- a/crawl-ref/source/luaterp.cc +++ b/crawl-ref/source/luaterp.cc @@ -71,7 +71,7 @@ static int _loadline(lua_State *ls) status = luaL_loadbuffer(ls, lua_tostring(ls, 1), lua_strlen(ls, 1), "=terp"); - if (!_incomplete(ls, status)) + if (!_incomplete(ls, status)) break; if (!_pushline(ls, 0)) return -1; @@ -120,7 +120,7 @@ void run_clua_interpreter(lua_State *ls) lua_insert(ls, 1); if (lua_pcall(ls, lua_gettop(ls) - 1, 0, 0) != 0) { - mprf(MSGCH_ERROR, "error calling __echo (%s)", + mprf(MSGCH_ERROR, "error calling __echo (%s)", lua_tostring(ls, -1)); } } diff --git a/crawl-ref/source/ng-input.cc b/crawl-ref/source/ng-input.cc index c0cff468b6..43e4b46e7f 100644 --- a/crawl-ref/source/ng-input.cc +++ b/crawl-ref/source/ng-input.cc @@ -18,21 +18,21 @@ void opening_screen(void) if (Options.tile_title_screen) tiles.draw_title(); #endif - + std::string msg = "Hello, welcome to " CRAWL " " + Version::Long() + "!" EOL "(c) Copyright 1997-2002 Linley Henzell, " "2002-2009 Crawl DevTeam" EOL "Please consult crawl_manual.txt for instructions and legal details." "" EOL; - + const bool init_found = init_file_error.empty(); - + if (!init_found) msg += "No init file "; else msg += "(Read options from "; - + if (init_found) { #ifdef DGAMELAUNCH @@ -50,9 +50,9 @@ void opening_screen(void) msg += init_file_error; msg += ", using defaults."; } - + msg += EOL; - + formatted_string::parse_string(msg).display(); textcolor( LIGHTGREY ); } @@ -79,9 +79,9 @@ static void _show_name_prompt(int where, bool blankOK, "job are chosen." EOL); } } - + cprintf(EOL "What is your name today? "); - + if (!existing_chars.empty()) { const int name_x = wherex(), name_y = wherey(); @@ -89,7 +89,7 @@ static void _show_name_prompt(int where, bool blankOK, menu.display(); cgotoxy(name_x, name_y); } - + textcolor( LIGHTGREY ); } @@ -100,7 +100,7 @@ static void _preprocess_character_name(std::string &name, bool blankOK) { name = Options.prev_name; } - + // '.', '?' and '*' are blanked. if (name.length() == 1 && (name[0] == '.' || name[0] == '*' || name[0] == '?')) @@ -112,18 +112,18 @@ static void _preprocess_character_name(std::string &name, bool blankOK) static bool _is_good_name(std::string &name, bool blankOK, bool verbose) { _preprocess_character_name(name, blankOK); - + // verification begins here {dlb}: if (name.empty()) { if (blankOK) return (true); - + if (verbose) cprintf(EOL "That's a silly name!" EOL); return (false); } - + // If MULTIUSER is defined, userid will be tacked onto the end // of each character's files, making bones a valid player name. #ifndef MULTIUSER @@ -146,7 +146,7 @@ static int newname_keyfilter(int &ch) { if (ch == CK_DOWN || ch == CK_PGDN || ch == '\t') return -1; - + return 1; } @@ -163,15 +163,15 @@ static bool _read_player_name(std::string &name, // Other places don't do this. --rob buf[0] = '\0'; line_reader reader(buf, sizeof(buf)); - + reader.set_keyproc(keyfilter); - + while (true) { cgotoxy(name_x, name_y); if (name_x <= 80) cprintf("%-*s", 80 - name_x + 1, ""); - + cgotoxy(name_x, name_y); int ret = reader.read_line(false); if (!ret) @@ -179,10 +179,10 @@ static bool _read_player_name(std::string &name, name = buf; return (true); } - + if (ret == CK_ESCAPE) return (false); - + if (ret != CK_ESCAPE && existing.size()) { menu.set_search(name); @@ -196,7 +196,7 @@ static bool _read_player_name(std::string &name, return (true); } } - + // Go back and prompt the user. } } @@ -208,10 +208,10 @@ void enter_player_name(newgame_def &ng, bool blankOK) bool ask_name = true; std::vector existing_chars; slider_menu char_menu(MF_SINGLESELECT | MF_NOWRAP, false); - + if (!ng.name.empty()) ask_name = false; - + if (blankOK && (ask_name || !_is_good_name(ng.name, false, false))) { existing_chars = find_saved_characters(); @@ -234,7 +234,7 @@ void enter_player_name(newgame_def &ng, bool blankOK) std::string desc = " " + existing_chars[i].short_desc(); if (static_cast(desc.length()) >= get_number_of_cols()) desc = desc.substr(0, get_number_of_cols() - 1); - + #ifdef USE_TILE MenuEntry *me = new PlayerMenuEntry(desc); #else @@ -245,14 +245,14 @@ void enter_player_name(newgame_def &ng, bool blankOK) } } } - + do { // Prompt for a new name if current one unsatisfactory {dlb}: if (ask_name) { _show_name_prompt(prompt_start, blankOK, existing_chars, char_menu); - + // If the player wants out, we bail out. if (!_read_player_name(ng.name, existing_chars, char_menu)) end(0); @@ -276,7 +276,7 @@ bool validate_player_name(const std::string &name, bool verbose) return (false); } #endif - + for (unsigned int i = 0; i < name.length(); i++) { char c = name[i]; @@ -297,6 +297,6 @@ bool validate_player_name(const std::string &name, bool verbose) return (false); } } - + return (true); } diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index a73af6b9a8..bc8f843e4b 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -319,7 +319,7 @@ static bool _in_a_shop( int shopidx ) if (Options.autoinscribe_artefacts && is_artefact(item)) item.inscription = artefact_auto_inscription(item); } - + std::vector selected; std::vector in_list; @@ -674,7 +674,7 @@ static bool _in_a_shop( int shopidx ) continue; } } - + selected[key] = !selected[key]; if (selected[key]) total_cost += gp_value; -- cgit v1.2.3-54-g00ecf