Index: /trunk/src/Makefile.osx =================================================================== --- /trunk/src/Makefile.osx (revision 89) +++ /trunk/src/Makefile.osx (revision 171) @@ -24,6 +24,4 @@ EXE =angband COPYRIGHT =1995-2006 Contributors -# version number - displayed -VERSION =3.0.7 # Some Developer CD tools we need - the standard installation location Index: /trunk/src/config.h =================================================================== --- /trunk/src/config.h (revision 128) +++ /trunk/src/config.h (revision 171) @@ -340,10 +340,4 @@ #define CAPITALIZE_USER_NAME - - -/* - * OPTION: Person to bother if something goes wrong. - */ -#define MAINTAINER "angbandmaint@gmail.com" Index: /trunk/src/Makefile.std =================================================================== --- /trunk/src/Makefile.std (revision 141) +++ /trunk/src/Makefile.std (revision 171) @@ -65,5 +65,4 @@ # Version info EXE = angband -VERSION = 3.0.8 Index: /trunk/src/cmd4.c =================================================================== --- /trunk/src/cmd4.c (revision 169) +++ /trunk/src/cmd4.c (revision 171) @@ -2612,4 +2612,61 @@ /* + * Save autoinscription data to a pref file. + */ +static void autoinsc_dump(FILE *fff) +{ + int i; + + if (!inscriptions) + return; + + /* Start dumping */ + fprintf(fff, "# Autoinscription settings"); + fprintf(fff, "# B:item kind:inscription\n\n"); + + for (i = 0; i < inscriptions_count; i++) + { + object_kind *k_ptr = &k_info[inscriptions[i].kind_idx]; + + /* Describe and write */ + fprintf(fff, "# Autoinscription for %s\n", k_name + k_ptr->name); + fprintf(fff, "B:%d:%s\n\n", inscriptions[i].kind_idx, + quark_str(inscriptions[i].inscription_idx)); + } + + /* All done */ + fprintf(fff, "\n"); +} + +/* + * Save squelch data to a pref file. + */ +static void squelch_dump(FILE *fff) +{ + int i; + int tval, sval; + bool squelch; + + /* Start dumping */ + fprintf(fff, "\n\n"); + fprintf(fff, "# Squelch bits\n\n"); + + /* Dump squelch bits */ + for (i = 1; i < z_info->k_max; i++) + { + tval = k_info[i].tval; + sval = k_info[i].sval; + squelch = k_info[i].squelch; + + /* Dump the squelch info */ + if (tval || sval) + fprintf(fff, "Q:%d:%d:%d:%d\n", i, tval, sval, squelch); + } + + /* All done */ + fprintf(fff, "\n"); +} + +/* * Write all current options to a user preference file. */ @@ -2671,5 +2728,11 @@ } } -} + + autoinsc_dump(fff); + squelch_dump(fff); +} + + + /* Hack -- Base Delay Factor */ @@ -3617,4 +3680,5 @@ menu_layout(&color_menu, &SCREEN_REGION); + /* Interact until done */ while (1) @@ -4066,13 +4130,20 @@ { int c = inkey(); - switch(c) { - case ESCAPE: - return; - case 't': do_cmd_save_screen_text(); - return; - case 'h': do_cmd_save_screen_html(0); - return; - case 'f': do_cmd_save_screen_html(1); - return; + switch(c) + { + case ESCAPE: + return; + + case 't': + do_cmd_save_screen_text(); + return; + + case 'h': + do_cmd_save_screen_html(0); + return; + + case 'f': + do_cmd_save_screen_html(1); + return; } } Index: /trunk/src/squelch.c =================================================================== --- /trunk/src/squelch.c (revision 156) +++ /trunk/src/squelch.c (revision 171) @@ -531,180 +531,4 @@ -/*** File stuff ***/ - -/* - * Save squelch data to a pref file. - */ -static void dump_squelch_info(void) -{ - int i, tval, sval, squelch; - FILE *fff; - char buf[1024]; - char fname[80]; - - screen_save(); - - /* Prompt */ - prt("Command: Dump Squelch Info", 17, 30); - prt("File: ", 18, 30); - - /* Default filename */ - strnfmt(fname, sizeof(fname), "%s.squ", op_ptr->base_name); - - /* Get a filename */ - if (askfor_aux(fname, sizeof fname, NULL)) - { - /* Build the filename */ - path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname); - - /* Append to the file */ - safe_setuid_drop(); - fff = my_fopen(buf, "a"); - safe_setuid_grab(); - - /* Test for success */ - if (!fff) return; - - /* Start dumping */ - fprintf(fff, "\n\n"); - fprintf(fff, "# Squelch bits\n\n"); - - /* Dump squelch bits */ - for (i = 1; i < z_info->k_max; i++) - { - tval = k_info[i].tval; - sval = k_info[i].sval; - squelch = k_info[i].squelch; - - /* Dump the squelch info */ - if (tval || sval) - fprintf(fff, "Q:%d:%d:%d:%d\n", i, tval, sval, squelch); - } - - fprintf(fff, "\n\n# squelch_level array\n\n"); - - for (i = 0; i < SQUELCH_BYTES; i++) - fprintf(fff, "Q:%d:%d\n", i, squelch_level[i]); - - /* All done */ - fprintf(fff, "\n\n\n\n"); - - /* Close */ - my_fclose(fff); - - /* Ending message */ - prt("Squelch file saved successfully. Hit any key to continue.", 17, 30); - inkey(); - } - - screen_load(); - return; -} - - -/* - * Save autoinscription data to a pref file. - */ -static int dump_autoins_info(void) -{ - int i; - FILE *fff; - char buf[1024]; - char fname[80]; - - screen_save(); - - /* Forget it now if there are no inscriptions. */ - if (!inscriptions) - { - prt("No inscriptions to save. Press any key to continue.", 16, 30); - inkey(); - screen_load(); - return 0; - } - - /* Prompt */ - prt("Command: Dump Autoinscribe Info", 16, 30); - prt("File: ", 17, 30); - - /* Default filename */ - my_strcpy(fname, op_ptr->base_name, sizeof(fname)); - - /* Get a filename */ - if (askfor_aux(fname, sizeof fname, NULL)) - { - /* Build the filename */ - path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname); - - /* Overwrite the file */ - safe_setuid_drop(); - fff = my_fopen(buf, "w"); - safe_setuid_grab(); - - /* Test for success */ - if (!fff) return 0; - - /* Start dumping */ - fprintf(fff, "# Format: B:[Item Kind]:[Inscription]\n\n"); - - for (i = 0; i < inscriptions_count; i++) - { - object_kind *k_ptr = &k_info[inscriptions[i].kind_idx]; - - /* Write a comment for the autoinscription*/ - fprintf(fff, "# Autoinscription for %s\n", k_name + k_ptr->name); - - /* Dump the autoinscribe info */ - fprintf(fff, "B:%d:%s\n\n", inscriptions[i].kind_idx, - quark_str(inscriptions[i].inscription_idx)); - } - - /* Close */ - my_fclose(fff); - - /* Ending message */ - prt("Autoinscribe file saved successfully. (Hit a key.)", 16, 30); - inkey(); - } - - screen_load(); - return 1; -} - - -/* - * Load squelch info from a pref file. - */ -static void load_squelch_info(void) -{ - char fname[80]; - - screen_save(); - - /* Prompt */ - prt("Command: Load squelch info from file", 16, 30); - prt("File: ", 17, 30); - - /* Default filename */ - strnfmt(fname, sizeof(fname), "%s.squ", op_ptr->base_name); - - /* Ask for a file (or cancel) */ - if (askfor_aux(fname, sizeof fname, NULL)) - { - /* Process the given filename, note success or failure */ - if (process_pref_file(fname)) - prt("Failed to load squelch data! (Hit a key.)", 17, 30); - else - prt("Squelch squelch squelch! (Hit a key.)", 17, 30); - - inkey(); - } - - screen_load(); - - return; -} - - /*** UI stuff ***/ @@ -1016,11 +840,6 @@ prt(format("%c) %s", I2A(i), sval_dependent[i].desc), i + 3, 1); - - prt("Commands:", 3, 30); - prt(" a-t) Go to squelching settings for this type", 5, 30); - prt(" Q) Quality squelching options", 6, 30); - prt(" ESC) Back to options menu.", 12, 30); - prt(" S) Save squelch values to pref file", 8, 30); - prt(" B) Save autoinscriptions to pref file", 9, 30); + prt("Q) Quality squelching options", i + 4, 1); + prt("ESC) Back to options menu.", i + 6, 1); while (!done) @@ -1042,8 +861,5 @@ /* Choose! */ - if (ch == 'S') dump_squelch_info(); /* Dump squelch info */ - else if (ch == 'B') dump_autoins_info(); /* Dump autoinscribe info */ - else if (ch == 'L') load_squelch_info(); /* Load squelch info */ - else if (ch == 'Q') quality_menu(); /* Switch to secondary squelching menu */ + if (ch == 'Q') quality_menu(); /* Switch to secondary squelching menu */ else if (ch == ESCAPE) done = TRUE; /* Finished */ Index: /trunk/src/init2.c =================================================================== --- /trunk/src/init2.c (revision 156) +++ /trunk/src/init2.c (revision 171) @@ -1266,5 +1266,5 @@ /* Hack -- Just call the "format()" function */ - (void)format("%s", MAINTAINER); + (void)format("I wish you could swim, like dolphins can swim..."); Index: /trunk/src/Makefile.src =================================================================== --- /trunk/src/Makefile.src (revision 164) +++ /trunk/src/Makefile.src (revision 171) @@ -5,4 +5,6 @@ # across a range of different makefiles, to cut down on maintenance. # + +VERSION = 3.0.8 HDRS = h-basic.h @@ -57,4 +59,2 @@ xtra1.o \ xtra2.o - - Index: /trunk/src/defines.h =================================================================== --- /trunk/src/defines.h (revision 163) +++ /trunk/src/defines.h (revision 171) @@ -34,17 +34,12 @@ /* - * Name of the version/variant - */ -#define VERSION_NAME "Angband" - - -/* - * Current version string - */ -#define VERSION_STRING "3.0.8" - - -/* - * Current version numbers + * Name of the version/variant and its version string + */ +#define VERSION_NAME "Angband" +#define VERSION_STRING "3.0.8" + + +/* + * Current savefile version */ #define VERSION_MAJOR 3 @@ -52,5 +47,4 @@ #define VERSION_PATCH 9 #define VERSION_EXTRA 0 - /* Index: /trunk/configure.ac =================================================================== --- /trunk/configure.ac (revision 167) +++ /trunk/configure.ac (revision 171) @@ -1,4 +1,4 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([angband], [3.0.8], [http://angband.rogueforge.net/trac]) +AC_INIT([angband], [3.0.8], [bugs@rephial.org]) AC_PREREQ([2.50])