2002-01-22 habu <habu@akiru>
+ * src/cave.c, src/dungeon.c, src/externs.h, src/melee2.c:
+ ¥â¥ó¥¹¥¿¡¼¤ÎÄÉÀץ롼¥Á¥ó´Ø·¸¤òO¤ò»²¹Í¤ËÂçÉý¤ËÊѹ¹¡£¤«¤Ê¤ê¤Î½èÍý®ÅÙ¥¢¥Ã¥×¤Ë·Ò¤¬¤ë¤Ï¤º¡£
+
+2002-01-22 Takeshi Mogami <mogami@akiru>
+
+ * lib/help/jobjects.hlp, lib/help/jobjects.txt:
+ ¥Õ¥¡¥¤¥ëÄɲäÎÄɲÃ
+
+ * lib/help/readme.txt:
+ Á°¡¢¡Ö´Ö°ã¤Ã¤Æreadme.txt¤òhelp¥Ç¥£¥ì¥¯¥È¥ê¤Ëadd¤·¤¿¤Þ¤Þ¤À¤Ã¤¿¡×¤È»×¤Ã¤Æºï½ü¤·¤¿¤¬¡¢
+ ´ª°ã¤¤¤À¤Ã¤¿¤Î¤ÇÉü³è¡£
+
+ * lib/help/jbldg.txt, lib/help/jcharattr.hlp, lib/help/jcharattr.txt, lib/help/jcommand.hlp, lib/help/jcommand.txt, lib/help/jcommand0.txt, lib/help/jcommdesc.hlp, lib/help/jcommdesc.txt, lib/help/jdefend.hlp, lib/help/jdefend.txt, lib/help/jdungeon.hlp, lib/help/jdungeon.txt, lib/help/jgambling.txt, lib/help/jgeneral.hlp, lib/help/jgeneral.txt, lib/help/jhelp.hlp, lib/help/jhelpinfo.txt, lib/help/jmagic.hlp, lib/help/jmagic.txt, lib/help/jmonster.hlp, lib/help/jmonster.txt, lib/help/joption.hlp, lib/help/joption.txt, lib/help/jplaying.txt, lib/help/jpref.hlp, lib/help/jpref.txt, lib/help/jspecial.hlp, lib/help/jtang.txt, lib/help/jtown.hlp, lib/help/jtown.txt, lib/help/jversion.txt, src/files.c, Changelogs, lib/help/Makefile.am, lib/help/j_general.txt, lib/help/j_item1.txt, lib/help/j_item2.txt, lib/help/j_name.txt, lib/help/j_trans.txt, lib/help/japanese.txt, lib/help/jattack.hlp, lib/help/jattack.txt, lib/help/jbirth.hlp, lib/help/jbirth.txt:
+ ÆüËܸìÈǤÎZ240¥Ø¥ë¥×¤ò¸µ¤ËÊѶòÈÚÅܥإë¥×¤òºîÀ®¡£
+ ¤Þ¤Àjmagic¤Ê¤É¡¢°ìÉô̤´°À®¡£
+
+2002-01-22 habu <habu@akiru>
+
* src/cmd5.c, src/externs.h, src/spells2.c:
¥Ú¥Ã¥ÈÇúÇˤÎËâË¡¤Ç¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òÇ˲õ¤Ç¤¤Ê¤¤¤è¤¦¤Ë½¤Àµ¡£
char header_mark_str[80];
+ /* Drop priv's */
+ safe_setuid_drop();
+
sprintf(header_mark_str, auto_dump_header, mark);
/* Remove old macro dumps */
msg_format("Failed to open %s.", buf);
#endif
msg_print(NULL);
+
+ /* Grab priv's */
+ safe_setuid_grab();
+
return NULL;
}
my_fclose(fff);
+ /* Grab priv's */
+ safe_setuid_grab();
+
return;
}
sprintf(file_name,"playrec-%s.txt",savefile_base);
#endif
+ /* Hack -- drop permissions */
+ safe_setuid_drop();
+
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, file_name);
fff = my_fopen(buf, "a");
/* Failure */
- if (!fff) {
+ if (!fff)
+ {
+ /* Hack -- grab permissions */
+ safe_setuid_grab();
#ifdef JP
msg_format("%s ¤ò³«¤¯¤³¤È¤¬¤Ç¤¤Þ¤»¤ó¤Ç¤·¤¿¡£¥×¥ì¥¤µÏ¿¤ò°ì»þÄä»ß¤·¤Þ¤¹¡£", buf);
#else
my_fclose(fff);
+ /* Hack -- grab permissions */
+ safe_setuid_grab();
+
if (do_level) write_level = FALSE;
return (0);
sprintf(file_name,"playrec-%s.txt",savefile_base);
#endif
+ /* Hack -- drop permissions */
+ safe_setuid_drop();
+
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, file_name);
/* Display the file contents */
show_file(FALSE, buf, nikki_title, -1, 0);
+
+ /* Hack -- grab permissions */
+ safe_setuid_grab();
}
static void do_cmd_bunshou(void)
sprintf(file_name,"playrec-%s.txt",savefile_base);
#endif
+ /* Hack -- drop permissions */
+ safe_setuid_drop();
+
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, file_name);
#endif
}
msg_print(NULL);
+
+ /* Hack -- grab permissions */
+ safe_setuid_grab();
}
#if 0
/* Ask for a file */
if (!askfor_aux(tmp, 80)) continue;
- /* Drop priv's */
- safe_setuid_drop();
-
/* Dump the macros */
(void)macro_dump(tmp);
- /* Grab priv's */
- safe_setuid_grab();
-
/* Prompt */
#ifdef JP
msg_print("¥Þ¥¯¥í¤òÄɲä·¤Þ¤·¤¿¡£");
/* Ask for a file */
if (!askfor_aux(tmp, 80)) continue;
- /* Drop priv's */
- safe_setuid_drop();
-
/* Dump the macros */
(void)keymap_dump(tmp);
- /* Grab priv's */
- safe_setuid_grab();
-
/* Prompt */
#ifdef JP
msg_print("¥¡¼ÇÛÃÖ¤òÄɲä·¤Þ¤·¤¿¡£");
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, tmp);
- /* Drop priv's */
- safe_setuid_drop();
-
/* Append to the file */
fff = open_auto_dump(buf, mark, &line_num);
if (!fff) continue;
- /* Grab priv's */
- safe_setuid_grab();
-
/* Start dumping */
#ifdef JP
fprintf(fff, "\n# ¥â¥ó¥¹¥¿¡¼¤Î[¿§/ʸ»ú]¤ÎÀßÄê\n\n");
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, tmp);
- /* Drop priv's */
- safe_setuid_drop();
-
/* Append to the file */
fff = open_auto_dump(buf, mark, &line_num);
if (!fff) continue;
- /* Grab priv's */
- safe_setuid_grab();
-
/* Start dumping */
#ifdef JP
fprintf(fff, "\n# ¥¢¥¤¥Æ¥à¤Î[¿§/ʸ»ú]¤ÎÀßÄê\n\n");
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, tmp);
- /* Drop priv's */
- safe_setuid_drop();
-
/* Append to the file */
fff = open_auto_dump(buf, mark, &line_num);
if (!fff) continue;
- /* Grab priv's */
- safe_setuid_grab();
-
/* Start dumping */
#ifdef JP
fprintf(fff, "\n# ÃÏ·Á¤Î[¿§/ʸ»ú]¤ÎÀßÄê\n\n");
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, tmp);
- /* Drop priv's */
- safe_setuid_drop();
-
/* Append to the file */
fff = open_auto_dump(buf, mark, &line_num);
if (!fff) continue;
- /* Grab priv's */
- safe_setuid_grab();
-
/* Start dumping */
#ifdef JP
fprintf(fff, "\n# ¥«¥é¡¼¤ÎÀßÄê\n\n");
char buf[1024];
+ /* Hack -- drop permissions */
+ safe_setuid_drop();
+
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, "dump.txt");
/* Close it */
my_fclose(fff);
+ /* Hack -- grab permissions */
+ safe_setuid_grab();
+
/* Message */
#ifdef JP
/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);
- /* Hack -- drop permissions */
- safe_setuid_drop();
-
/* Append to the file */
fff = my_fopen(filename, "w");
- /* Hack -- grab permissions */
- safe_setuid_grab();
-
/* Oops */
if (!fff) {
if (message) {
#endif
msg_print(NULL);
}
- return;
+
+ return;
}
/* Save the screen */
if (message)
- screen_save();
+ screen_save();
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, "htmldump.prf");
if (!tmpfff) {
for (i = 0; html_foot[i]; i++)
fprintf(fff, html_foot[i]);
- }
+ }
else {
rewind(tmpfff);
yomikomu = 0;
/* Restore the screen */
if (message)
- screen_load();
+ screen_load();
}
/*
msg_print(NULL);
+ /* Hack -- drop permissions */
+ safe_setuid_drop();
+
do_cmd_save_screen_html_aux(buf, 1);
+
+ /* Hack -- grab permissions */
+ safe_setuid_grab();
}
char buf[1024];
+ /* Hack -- drop permissions */
+ safe_setuid_drop();
+
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, "dump.txt");
/* File type is "TEXT" */
FILE_TYPE(FILE_TYPE_TEXT);
- /* Hack -- drop permissions */
- safe_setuid_drop();
-
/* Append to the file */
fff = my_fopen(buf, "w");
- /* Hack -- grab permissions */
- safe_setuid_grab();
-
/* Oops */
- if (!fff) {
+ if (!fff)
+ {
+ /* Hack -- grab permissions */
+ safe_setuid_grab();
#ifdef JP
- msg_format("¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó¤Ç¤·¤¿¡£", buf);
+ msg_format("¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó¤Ç¤·¤¿¡£", buf);
#else
- msg_format("Failed to open file %s.", buf);
+ msg_format("Failed to open file %s.", buf);
#endif
- msg_print(NULL);
- return;
+ msg_print(NULL);
+ return;
}
/* Close it */
my_fclose(fff);
+ /* Hack -- grab permissions */
+ safe_setuid_grab();
/* Message */
#ifdef JP
/* Open the non-existing file */
if (fd < 0) fff = my_fopen(buf, "w");
- /* Grab priv's */
- safe_setuid_grab();
-
-
/* Invalid file */
if (!fff)
{
/* Close it */
my_fclose(fff);
+ /* Grab priv's */
+ safe_setuid_grab();
/* Message */
#ifdef JP
/* Show a general "title" */
if (show_version)
{
+ prt(format(
#ifdef JP
-prt(format("[ÊѶòÈÚÅÜ %d.%d.%d, %s, %d/%d]",
+ "[ÊѶòÈÚÅÜ %d.%d.%d, %s, %d/%d]",
#else
- prt(format("[Hengband %d.%d.%d, %s, Line %d/%d]",
+ "[Hengband %d.%d.%d, %s, Line %d/%d]",
#endif
FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH,
}
else
{
+ prt(format(
#ifdef JP
-prt(format("[%s, %d/%d]",
+ "[%s, %d/%d]",
#else
- prt(format("[%s, Line %d/%d]",
+ "[%s, Line %d/%d]",
#endif
- caption, line, size), 0, 0);
+ caption, line, size), 0, 0);
}
/* Prompt -- menu screen */
if (line < 0) line = ((size-1)/20)*20;
}
-#ifdef JP_FALSE
- /* ÆüËܸìÈǤÇÄɲ䵤줿¥Ø¥ë¥×¤Îɽ¼¨ */
- /* ¤¢¤Þ¤ê¤è¤¤½èÍý¤Î»ÅÊý¤È¤Ï»×¤¨¤Ê¤¤¡¦¡¦¡¦¤¹¤Þ¤ó */
-
- /* ´Ê°×¥³¥Þ¥ó¥É°ìÍ÷ */
- if (menu && (k == 'c' || k == 'C'))
- {
- char tmp[80];
- switch (rogue_like_commands)
- {
- case TRUE:
- {
- strcpy(tmp, "j_com_r.txt");
- if(!show_file(TRUE, tmp, NULL, 0, mode)) k = 'q';
- break;
- }
- case FALSE:
- {
- strcpy(tmp, "j_com_o.txt");
- if(!show_file(TRUE, tmp, NULL, 0, mode)) k = 'q';
- break;
- }
- }
- }
-
-#endif
/* Recurse on numbers */
if (menu)
{
strcpy (xtmp, "");
#ifdef JP
-if (get_string("¥Õ¥¡¥¤¥ë̾: ", xtmp, 80))
+ if (!get_string("¥Õ¥¡¥¤¥ë̾: ", xtmp, 80))
#else
- if (get_string("File name: ", xtmp, 80))
+ if (!get_string("File name: ", xtmp, 80))
#endif
-
- {
- if (xtmp[0] && (xtmp[0] != ' '))
- {
- }
- }
- else
{
continue;
}
+
+ /* Close it */
+ my_fclose(fff);
+
+ /* Drop priv's */
+ safe_setuid_drop();
/* Build the filename */
path_build(buff, 1024, ANGBAND_DIR_USER, xtmp);
- /* Close it */
- my_fclose(fff);
-
/* Hack -- Re-Open the file */
fff = my_fopen(path, "r");
if (!(fff && ffp))
{
#ifdef JP
-msg_print("¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£");
+msg_print("¥Õ¥¡¥¤¥ë¤¬³«¤±¤Þ¤»¤ó¡£");
#else
msg_print("Failed to open file.");
#endif
my_fclose(fff);
my_fclose(ffp);
+ /* Grab priv's */
+ safe_setuid_grab();
+
/* Hack -- Re-Open the file */
fff = my_fopen(path, "r");
}