Ticket #129: ang_report_20070523.diff

File ang_report_20070523.diff, 13.1 kB (added by christer.nyfalt@welho.com, 2 years ago)

Diff with fixes for Angband 3.0.7s3

  • src/files.c

    old new  
    49334933        Term_get_size(&wid, &hgt); 
    49344934 
    49354935        fprintf(htm, "<!DOCTYPE html>"); 
    4936         fprintf(htm, "<html\n"); 
     4936        fprintf(htm, "<html>\n"); 
    49374937        fprintf(htm, "<head>\n"); 
    49384938        fprintf(htm, "  <meta=\"generator\" content=\"%s %d.%d.%d\">\n", 
    49394939                     VERSION_NAME, VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); 
  • src/z-util.c

    old new  
    226226 
    227227 
    228228 
    229 /* 
    230  * Redefinable "core" action 
    231  */ 
    232 void (*core_aux)(cptr) = NULL; 
    233229 
    234 /* 
    235  * Dump a core file, after printing a warning message 
    236  * As with "quit()", try to use the "core_aux()" hook first. 
    237  */ 
    238 void core(cptr str) 
    239 { 
    240         char *crash = NULL; 
    241  
    242         /* Use the aux function */ 
    243         if (core_aux) (*core_aux)(str); 
    244  
    245         /* Dump the warning string */ 
    246         if (str) plog(str); 
    247  
    248         /* Attempt to Crash */ 
    249         (*crash) = (*crash); 
    250  
    251         /* Be sure we exited */ 
    252         quit("core() failed"); 
    253 } 
    254  
    255  
    256  
    257  
  • src/x-spell.c

    old new  
    1515 
    1616/* 
    1717 * The defines below must match the spell numbers in spell.txt 
    18  * if they don't, "interessting" things will probably happen. 
     18 * if they don't, "interesting" things will probably happen. 
    1919 * 
    20  * It would be nice if we could get rid of this dependancy 
     20 * It would be nice if we could get rid of this dependency 
    2121 */ 
    2222 
    2323#define SPELL_MAGIC_MISSILE             0 
  • src/init2.c

    old new  
    11091109                } 
    11101110        } 
    11111111 
    1112         /* Place each spell in it's own book */ 
     1112        /* Place each spell in its own book */ 
    11131113        for (spell = 0; spell < z_info->s_max; spell++) 
    11141114        { 
    11151115                /* Get the spell */ 
  • src/main-crb.c

    old new  
    36713671} 
    36723672 
    36733673 
    3674 /* 
    3675  * Hook to tell the user something, and then crash 
    3676  */ 
    3677 static void hook_core(cptr str) 
    3678 { 
    3679         /* XXX Use the debugger */ 
    3680         /* DebugStr(str); */ 
    3681  
    3682         /* Warning */ 
    3683         if (str) mac_warning(str); 
    3684         if(!save_player()) 
    3685                 mac_warning("Fatal error -- save failed!"); 
    3686         else  
    3687                 mac_warning("Fatal error -- game saved successfully"); 
    3688  
    3689         /* Quit */ 
    3690         quit(NULL); 
    3691 } 
    3692  
    36933674/*** Main program ***/ 
    36943675 
    36953676 
     
    37523733        /* Hooks in some "z-util.c" hooks */ 
    37533734        plog_aux = hook_plog; 
    37543735        quit_aux = hook_quit; 
    3755         core_aux = hook_core; 
    37563736 
    37573737        /* Initialize colors */ 
    37583738        update_color_info(); 
  • src/z-util.h

    old new  
    3030/* Aux functions */ 
    3131extern void (*plog_aux)(cptr); 
    3232extern void (*quit_aux)(cptr); 
    33 extern void (*core_aux)(cptr); 
    3433 
    3534 
    3635/**** Available Functions ****/ 
     
    5756/* Exit, with optional message */ 
    5857extern void quit(cptr str); 
    5958 
    60 /* Dump core, with optional message */ 
    61 extern void core(cptr str); 
    6259 
     60#endif /* INCLUDED_Z_UTIL_H */ 
    6361 
    6462 
    65 #endif 
    66  
    67  
  • src/z-virt.c

    old new  
    3131        /* Hopefully, we have a real "panic" function */ 
    3232        if (rpanic_aux) return ((*rpanic_aux)(len)); 
    3333 
    34         /* Attempt to crash before icky things happen */ 
     34        /* Attempt to quit before icky things happen */ 
    3535        quit("Out of Memory!"); 
    3636 
    3737        /* Paranoia */ 
  • src/store.c

    old new  
    22162216 
    22172217                        /* Analyze the prices (and comment verbally) */ 
    22182218                        purchase_analyze(price, value, dummy); 
     2219 
    22192220                        /* 
    22202221                         * Check to see if anything left in the pack should be squelched. 
    22212222                         * We must make sure to do this before the item is sold 
     
    22232224                        if (squelch == SQUELCH_YES) 
    22242225                        { 
    22252226                                msg_format("In your pack: %s (%c).  %s", 
    2226                                                        o_name, index_to_label(item), 
    2227                                                        squelch_to_label(squelch)); 
     2227                                           o_name, index_to_label(item), 
     2228                                           squelch_to_label(squelch)); 
    22282229 
    22292230                                squelch_item(squelch, item, o_ptr); 
    22302231                        } 
     
    22352236                                inven_item_describe(item); 
    22362237                                inven_item_optimize(item); 
    22372238                        } 
     2239 
    22382240                        /* Handle stuff */ 
    22392241                        handle_stuff(); 
    22402242 
  • src/main-gtk.c

    old new  
    768768 
    769769        /* Activate hooks */ 
    770770        quit_aux = hook_quit; 
    771         core_aux = hook_quit; 
    772771 
    773772        /* Set the system suffix */ 
    774773        ANGBAND_SYS = "gtk"; 
  • src/load.c

    old new  
    965965        /* Write the autoinscriptions array*/ 
    966966        for (i = 0; i < inscriptions_count; i++) 
    967967        { 
    968                 char tmp[80]; 
     968                char tmp[80]; 
    969969 
    970                 rd_s16b(&inscriptions[i].kind_idx); 
    971                 rd_string(tmp, 80); 
     970                rd_s16b(&inscriptions[i].kind_idx); 
     971                rd_string(tmp, 80); 
    972972 
    973                 inscriptions[i].inscription_idx = quark_add(tmp); 
     973                inscriptions[i].inscription_idx = quark_add(tmp); 
    974974        } 
    975975 
    976976        return 0; 
  • src/cmd1.c

    old new  
    503503        if ((k_info[o_ptr->k_idx].squelch == NO_SQUELCH_NEVER_PICKUP) && 
    504504                object_aware_p(o_ptr)) return (FALSE); 
    505505 
    506         /* Object is marked to not pickup */ 
     506        /* Object is marked to pickup */ 
    507507        if ((k_info[o_ptr->k_idx].squelch == NO_SQUELCH_ALWAYS_PICKUP) && 
    508508                object_aware_p(o_ptr)) return (TRUE); 
    509509 
  • src/cmd3.c

    old new  
    190190                s = strchr(quark_str(equip_o_ptr->note), '!'); 
    191191 
    192192                /* Process preventions */ 
    193                 /* XXX Perhaps this should be factored out to a seperate function? */ 
     193                /* XXX Perhaps this should be factored out to a separate function? */ 
    194194                while (s) 
    195195                { 
    196196                        /* Check the "restriction" */ 
     
    548548                                msg_format("All %^s will always be squelched.", o_name2); 
    549549 
    550550                                /*Mark the view to be updated*/ 
    551                                 p_ptr->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW);; 
     551                                p_ptr->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW); 
    552552                        } 
    553553                } 
    554554 
  • src/object2.c

    old new  
    371371 
    372372                        /* Nearby objects start out "immune" */ 
    373373                        if ((cur_dis > 0) && (distance(py, px, y, x) < cur_dis) && 
    374                                                                                (k_ptr->squelch != SQUELCH_ALWAYS)) 
     374                            (k_ptr->squelch != SQUELCH_ALWAYS)) 
    375375                                continue; 
    376376 
    377377                        /* Saving throw */ 
     
    790790{ 
    791791        /* Fully aware of the effects */ 
    792792        k_info[o_ptr->k_idx].aware = TRUE; 
    793          
     793 
    794794        /* Scrolls can change the graphics when becoming aware */ 
    795795        if (o_ptr->tval == TV_SCROLL) 
    796796        { 
  • src/cmd5.c

    old new  
    574574                /* Ask for a spell */ 
    575575                spell = get_spell(o_ptr, "browse", TRUE, TRUE); 
    576576                if (spell < 0) break; 
    577          
     577 
    578578                /* Browse the spell */ 
    579579                browse_spell(spell); 
    580580        } 
  • src/save.c

    old new  
    10071007/* 
    10081008 * Write autoinscribe & squelch item-quality submenu to the savefile 
    10091009 */ 
    1010 static void wr_squelch(
     1010static void wr_squelch(void
    10111011{ 
    10121012        int i; 
    10131013 
  • src/xtra1.c

    old new  
    225225        } 
    226226        else 
    227227        { 
    228                 put_str("Exp ", row, col); 
     228                if (next_xp) 
     229                { 
     230                        put_str("Nxt ", row, col); 
     231                } 
     232                else 
     233                { 
     234                        put_str("Exp ", row, col); 
     235                } 
    229236                c_put_str(TERM_YELLOW, out_val, row, col + 4); 
    230237        } 
    231238} 
  • src/main-gcu.c

    old new  
    718718        wmove(td->win, y, x); 
    719719 
    720720        /* Format to appropriate size */ 
    721         strnfmt(buf, sizeof buf, "%.*s", n, s); 
     721        strnfmt(buf, sizeof(buf), "%.*s", n, s); 
    722722 
    723723        /* Write to screen */ 
    724724        waddstr(td->win, buf); 
     
    831831 
    832832        /* Activate hooks */ 
    833833        quit_aux = hook_quit; 
    834         core_aux = hook_quit; 
    835834 
    836835        /* Require standard size screen */ 
    837836        if ((LINES < 24) || (COLS < 80)) 
  • src/z-form.c

    old new  
    735735        /* Call quit() */ 
    736736        quit(res); 
    737737} 
    738  
    739  
    740  
    741 /* 
    742  * Vararg interface to core() 
    743  */ 
    744 void core_fmt(cptr fmt, ...) 
    745 { 
    746         char *res; 
    747         va_list vp; 
    748  
    749         /* Begin the Varargs Stuff */ 
    750         va_start(vp, fmt); 
    751  
    752         /* If requested, Do a virtual fprintf to stderr */ 
    753         res = vformat(fmt, vp); 
    754  
    755         /* End the Varargs Stuff */ 
    756         va_end(vp); 
    757  
    758         /* Call core() */ 
    759         core(res); 
    760 } 
  • src/z-form.h

    old new  
    5151/* Vararg interface to "quit()", using "format()" */ 
    5252extern void quit_fmt(cptr fmt, ...); 
    5353 
    54 /* Vararg interface to "core()", using "format()" */ 
    55 extern void core_fmt(cptr fmt, ...); 
    5654 
     55#endif /* INCLUDED_Z_FORM_H */ 
    5756 
    58 #endif 
    5957 
    60  
  • src/main-win.c

    old new  
    50195019        /* Temporary hooks */ 
    50205020        plog_aux = hack_plog; 
    50215021        quit_aux = hack_quit; 
    5022         core_aux = hack_quit; 
    50235022 
    50245023        /* Prepare the filepaths */ 
    50255024        init_stuff(); 
     
    50595058        /* Activate hooks */ 
    50605059        plog_aux = hook_plog; 
    50615060        quit_aux = hook_quit; 
    5062         core_aux = hook_quit; 
    50635061 
    50645062        /* Set the system suffix */ 
    50655063        ANGBAND_SYS = "win"; 
  • src/init1.c

    old new  
    871871                /* Save the value */ 
    872872                z_info->s_max = max; 
    873873        } 
    874          
     874 
    875875        /* Process 'O' for "Maximum o_list[] index" */ 
    876876        else if (buf[2] == 'O') 
    877877        { 
  • src/spells2.c

    old new  
    246246                squelch = do_ident_item(i, o_ptr); 
    247247 
    248248                /* 
    249                 * If the object was squelched, keep analyzing 
    250                 * the same slot (the inventory was displaced). -DG- 
    251                 */ 
     249                * If the object was squelched, keep analyzing 
     250                * the same slot (the inventory was displaced). -DG- 
     251                */ 
    252252                if (squelch != SQUELCH_YES || i < INVEN_WIELD) continue; 
    253253 
    254254                /* Now squelch the object */ 
     
    39383938        } 
    39393939        else 
    39403940        { 
    3941                 msg_format("On the ground: %s.  %s", o_name, 
     3941                msg_format("On the ground: %s.  %s", o_name, 
    39423942                          squelch_to_label(squelch)); 
    39433943        } 
    39443944 
    39453945        return (squelch); 
    39463946} 
    3947  
  • src/main-ros.c

    old new  
    163163 *   to clean up the code but just making work for people with no 
    164164 *   ultimate benefit. 
    165165 */ 
    166 /* #define HASNOCORE */ 
     166#define HASNOCORE 
    167167 
    168168/* 
    169169 * USE_DA 
  • src/Makefile.gtk

    old new  
    1111  xtra1.c xtra2.c spells1.c spells2.c \ 
    1212  melee1.c melee2.c save.c files.c \ 
    1313  cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c \ 
    14   squelch.o store.c birth.c load.c \ 
     14  squelch.c store.c birth.c load.c \ 
    1515  wizard1.c wizard2.c \ 
    1616  generate.c dungeon.c init1.c init2.c randart.c \ 
    1717  main-gtk.c maid-x11.c main.c \