(void)strcpy(buf, pw->pw_name);
buf[16] = '\0';
-#ifdef CAPITALIZE_USER_NAME
/* Hack -- capitalize the user name */
#ifdef JP
if (!iskanji(buf[0]))
#endif
if (islower(buf[0]))
buf[0] = toupper(buf[0]);
-#endif /* CAPITALIZE_USER_NAME */
return;
}
* path, and a leading "tilde" to indicate a special directory, and default to a
* relative path, but MSDOS uses a leading "drivename plus colon" to indicate the
* use of a "special drive", and then the rest of the path is parsed "normally",
- * and MACINTOSH uses a leading colon to indicate a relative path, and an embedded
- * colon to indicate a "drive plus absolute path", and finally defaults to a file
- * in the current working directory, which may or may not be defined.
+ * and an embedded colon to indicate a "drive plus absolute path", and finally
+ * defaults to a file in the current working directory, which may or may not be defined.
*
* We should probably parse a leading "~~/" as referring to "ANGBAND_DIR". (?)
*/
-#ifdef ACORN
-
-
- /*
- * Most of the "file" routines for "ACORN" should be in "main-acn.c"
- */
-
-
-#else /* ACORN */
-
-
#ifdef SET_UID
/*
{
/* Accept the filename */
(void)strnfmt(buf, max, "%s", file);
-
-#if defined(MAC_MPW) && defined(CARBON)
- /* Fix it according to the current operating system */
- convert_pathname(buf);
-#endif /* MAC_MPW && CARBON */
-
- /* Success */
return 0;
}
{
char buf[1024];
-#if defined(MAC_MPW) || defined(MACH_O_CARBON)
+#if defined(MACH_O_CARBON)
FILE *tempfff;
#endif
/* Hack -- Try to parse the path */
if (path_parse(buf, 1024, file)) return (NULL);
-#if defined(MAC_MPW) || defined(MACH_O_CARBON)
+#if defined(MACH_O_CARBON)
if (my_strchr(mode, 'w'))
{
/* setting file type/creator */
}
-#endif /* ACORN */
-
-
#ifdef HAVE_MKSTEMP
FILE *my_fopen_temp(char *buf, int max)
/* Convert weirdness */
for (s = tmp; *s; s++)
{
-#if defined(MACINTOSH) || defined(MACH_O_CARBON)
+#if defined(MACH_O_CARBON)
/*
* Be nice to the Macintosh, where a file can have Mac or Unix
*/
if (*s == '\r') *s = '\n';
-#endif /* MACINTOSH || MACH_O_CARBON */
+#endif /* MACH_O_CARBON */
/* Handle newline */
if (*s == '\n')
}
-#ifdef ACORN
-
-
-/*
- * Most of the "file" routines for "ACORN" should be in "main-acn.c"
- *
- * Many of them can be rewritten now that only "fd_open()" and "fd_make()"
- * and "my_fopen()" should ever create files.
- */
-
-
-#else /* ACORN */
-
-
-/*
- * The Macintosh is a little bit brain-dead sometimes
- */
-#ifdef MACINTOSH
-# define open(N,F,M) \
-((M), open((char*)(N),F))
-# define write(F,B,S) \
-write(F,(char*)(B),S)
-#endif /* MACINTOSH */
-
-
/*
* Several systems have no "O_BINARY" flag
*/
/* Hack -- Try to parse the path */
if (path_parse(buf, 1024, file)) return -1;
-#if defined(MAC_MPW) || defined(MACH_O_CARBON)
+#if defined(MACH_O_CARBON)
{
int fdes;
/* Create the file, fail if exists, write-only, binary */
/* Verify the fd */
if (fd < 0) return -1;
-#if defined(ULTRIX) || defined(NeXT)
+#if defined(NeXT)
/* Truncate */
ftruncate(fd, n);
#endif
}
-#endif /* ACORN */
-
-
-
-
/*
* Important note about "colors"
*
parse_macro = FALSE;
}
-
/*
* Mega-Hack -- special "inkey_next" pointer.
*
*/
static concptr inkey_next = NULL;
-
-#ifdef ALLOW_BORG
-
-/*
- * Mega-Hack -- special "inkey_hack" hook.
- *
- * This special function hook allows the "Borg" (see elsewhere) to take
- * control of the "inkey()" function, and substitute in fake keypresses.
- */
-char(*inkey_hack)(int flush_first) = NULL;
-
-#endif /* ALLOW_BORG */
-
-
-
/*
* Get a keypress from the user.
*
/* Forget pointer */
inkey_next = NULL;
-
-#ifdef ALLOW_BORG
-
- /* Mega-Hack -- Use the special hook */
- if (inkey_hack && ((ch = (*inkey_hack)(inkey_xtra)) != 0))
- {
- /* Cancel the various "global parameters" */
- inkey_base = inkey_xtra = inkey_flag = inkey_scan = FALSE;
-
- /* Accept result */
- return (ch);
- }
-
-#endif /* ALLOW_BORG */
-
-
/* Hack -- handle delayed "flush()" */
if (inkey_xtra)
{
* This function will correctly handle any width up to the maximum legal
* value of 256, though it works best for a standard 80 character width.
*/
-void c_roff(byte a, concptr str)
+void c_roff(TERM_COLOR a, concptr str)
{
int x, y;
};
#endif
-static char inkey_from_menu(void)
+static char inkey_from_menu(player_type *player_ptr)
{
char cmd;
int basey, basex;
int menu = 0;
bool kisuu;
- if (p_ptr->y - panel_row_min > 10) basey = 2;
+ if (player_ptr->y - panel_row_min > 10) basey = 2;
else basey = 13;
basex = 15;
screen_save();
+ floor_type* floor_ptr = player_ptr->current_floor_ptr;
while (TRUE)
{
int i;
switch (special_menu_info[hoge].jouken)
{
case MENU_CLASS:
- if (p_ptr->pclass == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
+ if (player_ptr->pclass == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
break;
case MENU_WILD:
- if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_arena && !p_ptr->current_floor_ptr->inside_quest)
+ if (!floor_ptr->dun_level && !floor_ptr->inside_arena && !floor_ptr->inside_quest)
{
- if ((byte)p_ptr->wild_mode == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
+ if ((byte)player_ptr->wild_mode == special_menu_info[hoge].jouken_naiyou) menu_name = special_menu_info[hoge].name;
}
break;
default:
put_str(_("》", "> "), basey + 1 + num / 2, basex + 2 + (num % 2) * 24);
/* Place the cursor on the player */
- move_cursor_relative(p_ptr->y, p_ptr->x);
+ move_cursor_relative(player_ptr->y, player_ptr->x);
sub_cmd = inkey();
if ((sub_cmd == ' ') || (sub_cmd == 'x') || (sub_cmd == 'X') || (sub_cmd == '\r') || (sub_cmd == '\n'))
/*
* Request a command from the user.
*
- * Sets p_ptr->command_cmd, p_ptr->command_dir, p_ptr->command_rep,
- * p_ptr->command_arg. May modify p_ptr->command_new.
+ * Sets player_ptr->command_cmd, player_ptr->command_dir, player_ptr->command_rep,
+ * player_ptr->command_arg. May modify player_ptr->command_new.
*
* Note that "caret" ("^") is treated specially, and is used to
* allow manual input of control characters. This can be used
* Note that this command is used both in the dungeon and in
* stores, and must be careful to work in both situations.
*
- * Note that "p_ptr->command_new" may not work any more.
+ * Note that "player_ptr->command_new" may not work any more.
*/
-void request_command(int shopping)
+void request_command(player_type *player_ptr, int shopping)
{
int i;
if (!shopping && command_menu && ((cmd == '\r') || (cmd == '\n') || (cmd == 'x') || (cmd == 'X'))
&& !keymap_act[mode][(byte)(cmd)])
- cmd = inkey_from_menu();
+ cmd = inkey_from_menu(player_ptr);
}
/* Clear top line */
{
concptr s;
- object_type *o_ptr = &p_ptr->inventory_list[i];
+ object_type *o_ptr = &player_ptr->inventory_list[i];
if (!o_ptr->k_idx) continue;
/* No inscription */
}
-#ifdef SORT_R_INFO
-
/*
* Array size for which InsertionSort
* is used instead of QuickSort
quicksort(elements, 0, number - 1);
}
-#endif /* SORT_R_INFO */
-
-#ifdef SUPPORT_GAMMA
-
/* Table of gamma values */
byte gamma_table[256];
}
}
-#endif /* SUPPORT_GAMMA */
-
/*
* Add a series of keypresses to the "queue".