Changeset 138

Show
Ignore:
Timestamp:
05/14/07 05:01:42 (2 years ago)
Author:
takkaria
Message:

Clean up some code, and switch to new file header in squelch.c.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/cmd1.c

    r137 r138  
    759759 
    760760                        /* Add a comma if necessary */ 
    761                         if ((total > 2) && (count < total)) strcat(buf, ","); 
     761                        if ((total > 2) && (count < total)) my_strcat(buf, ",", sizeof(buf)); 
    762762 
    763763                        /* Add an "and" if necessary */ 
    764                         if ((total >= 2) && (count == total-1)) strcat(buf, " and"); 
     764                        if ((total >= 2) && (count == total-1)) my_strcat(buf, " and", sizeof(buf)); 
    765765 
    766766                        /* Add a space or period if necessary */ 
    767                         if (count < total) strcat(buf, " "); 
    768                         else               strcat(buf, "."); 
     767                        if (count < total) my_strcat(buf, " ", sizeof(buf)); 
     768                        else               my_strcat(buf, ".", sizeof(buf)); 
    769769                } 
    770770 
     
    775775 
    776776                /* Display the message */ 
    777                 message_format(sound_msg, 0, "%s", buf); 
     777                message(sound_msg, 0, buf); 
    778778 
    779779                /* Add gold to purse */ 
  • trunk/src/squelch.c

    r136 r138  
    11/* 
    22 * File: squelch.c 
    3  * Purpose: Automatic item destruction ("squelching") 
    4  * Authors: David T. Blackston, Iain McFall, DarkGod, Jeff Greene, David Vestal, 
    5  *          Pete Mack, Andrew Sidwell. 
    6  * Licence: Angband licence, GPL in parts 
     3 * Purpose: Automatic item destruction 
    74 * 
    8  * Please read the "COPYING" file in the Angband distribution for licence 
    9  * terms.  If you do not, you have no right to use this file. 
     5 * Copyright (c) 2007 David T. Blackston, Iain McFall, DarkGod, Jeff Greene, 
     6 * David Vestal, Pete Mack, Andrew Sidwell. 
     7 * 
     8 * This work is free software; you can redistribute it and/or modify it 
     9 * under the terms of either: 
     10 * 
     11 * a) the GNU General Public License as published by the Free Software 
     12 *    Foundation, version 2, or 
     13 * 
     14 * b) the "Angband licence": 
     15 *    This software may be copied and distributed for educational, research, 
     16 *    and not for profit purposes provided that this copyright and statement 
     17 *    are included in all such copies.  Other copyrights may also apply. 
    1018 */ 
    1119#include "angband.h" 
     
    326334 * 
    327335 * The following should be considered: 
    328  *  - use the same menu implementation for all the different menus, rather 
    329  *    then reimplmenting it three(?) times -- perhaps steal Zangband code 
    330  *  - making sure we only use "safe" string functions, from z-form.c 
     336 *  - use the new menu interface 
    331337 *  - Make dump_autoins_info() and dump_squelch_info() more similar for 
    332338 *    consistency.