Remove experimental Unicode support.
This reverts commit 7f0f43e6f9 and some related
subsequent commits.
This compiles, but I have not done extensive testing.
Conflicts:
include/config.h
include/decl.h
include/extern.h
include/global.h
include/tradstdc.h
include/wintty.h
src/drawing.c
src/files.c
src/hacklib.c
src/mapglyph.c
src/options.c
sys/winnt/nttty.c
win/tty/getline.c
win/tty/topl.c
win/tty/wintty.c
This commit is contained in:
@@ -315,10 +315,6 @@
|
||||
*/
|
||||
#endif /* CHDIR */
|
||||
|
||||
/*
|
||||
* Enable some UNICODE support.
|
||||
*/
|
||||
/*#define UNICODE_SUPPORT */ /* master on/off for any unicode support */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -320,7 +320,6 @@ E NEARDATA winid WIN_MESSAGE;
|
||||
E NEARDATA winid WIN_STATUS;
|
||||
#endif
|
||||
E NEARDATA winid WIN_MAP, WIN_INVEN;
|
||||
E nhwchar toplines[];
|
||||
|
||||
/* pline (et al) for a single string argument (suppress compiler warning) */
|
||||
#define pline1(cstr) pline("%s", cstr)
|
||||
@@ -331,6 +330,7 @@ E nhwchar toplines[];
|
||||
#define Sprintf1(buf, cstr) Sprintf(buf, "%s", cstr)
|
||||
#define panic1(cstr) panic("%s", cstr)
|
||||
|
||||
E char toplines[];
|
||||
#ifndef TCAP_H
|
||||
E struct tc_gbl_data { /* also declared in tcap.h */
|
||||
char *tc_AS, *tc_AE; /* graphics start and end (tty font swapping) */
|
||||
|
||||
@@ -731,7 +731,6 @@ E void FDECL(check_recordfile, (const char *));
|
||||
E void NDECL(read_wizkit);
|
||||
E int FDECL(read_sym_file, (int));
|
||||
E int FDECL(parse_sym_line, (char *,int));
|
||||
E int FDECL(sym_val, (const char *));
|
||||
E void FDECL(paniclog, (const char *, const char *));
|
||||
E int FDECL(validate_prefix_locations, (char *));
|
||||
#ifdef SELECTSAVED
|
||||
@@ -846,20 +845,6 @@ E int NDECL(phase_of_the_moon);
|
||||
E boolean NDECL(friday_13th);
|
||||
E int NDECL(night);
|
||||
E int NDECL(midnight);
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
E nhwchar *FDECL(nhwstrncpy, (nhwchar *,const char *,size_t));
|
||||
E nhwchar *FDECL(nhwncpy, (nhwchar *,const nhwchar *,size_t));
|
||||
E nhwchar *FDECL(nhwcpy, (nhwchar *,const nhwchar *));
|
||||
E nhwchar *FDECL(nhwstrcpy, (nhwchar *,const char *));
|
||||
E char *FDECL(strnhwcpy, (char *,const nhwchar *));
|
||||
E nhwchar *FDECL(nhwstrcat, (nhwchar *,const char *));
|
||||
E nhwchar *FDECL(nhwcat, (nhwchar *,const nhwchar *));
|
||||
E nhwchar *FDECL(nhwindex, (const nhwchar *,int));
|
||||
E size_t FDECL(nhwlen, (const nhwchar *));
|
||||
E int FDECL(nhwcmp, (const nhwchar *,const nhwchar *));
|
||||
E int FDECL(nhwncmp, (const nhwchar *,const nhwchar *,int));
|
||||
E int FDECL(nhwstrcmp, (const nhwchar *,const char *));
|
||||
#endif
|
||||
|
||||
/* ### invent.c ### */
|
||||
|
||||
@@ -1587,6 +1572,7 @@ E int FDECL(load_symset, (const char *,int));
|
||||
E void FDECL(parsesymbols, (char *));
|
||||
E struct symparse *FDECL(match_sym, (char *));
|
||||
E void NDECL(set_playmode);
|
||||
E int FDECL(sym_val, (char *));
|
||||
|
||||
/* ### pager.c ### */
|
||||
|
||||
|
||||
@@ -198,8 +198,6 @@ struct instance_flags {
|
||||
boolean rlecomp; /* run-length comp of levels when writing savefile */
|
||||
uchar num_pad_mode;
|
||||
boolean echo; /* 1 to echo characters */
|
||||
boolean unicodecapable; /* unicode support is possible on platform */
|
||||
boolean unicodedisp; /* unicode support is turned on */
|
||||
#if 0
|
||||
boolean DECgraphics; /* use DEC VT-xxx extended character set */
|
||||
boolean IBMgraphics; /* use IBM extended character set */
|
||||
|
||||
@@ -65,41 +65,10 @@ typedef xchar boolean; /* 0 or 1 */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* UNICODE_SUPPORT
|
||||
* Unicode/wide character related support.
|
||||
* type nhsym: loadable symbols go into this type
|
||||
*/
|
||||
#ifdef UNICODE_SUPPORT
|
||||
# define UNICODE_DRAWING /* store drawing symbols in wchar_t data type */
|
||||
# define UNICODE_WIDEWINPORT /* store and render wide chars in window port */
|
||||
/*# define UNICODE_PLAYERTEXT*/ /* not implemented - player input in wide chars */
|
||||
#include <limits.h>
|
||||
#include <wchar.h>
|
||||
#else
|
||||
# undef UNICODE_DRAWING
|
||||
# undef UNICODE_WIDEWINPORT
|
||||
# undef UNICODE_PLAYERTEXT
|
||||
#endif
|
||||
|
||||
#if defined(UNICODE_DRAWING)
|
||||
typedef wchar_t nhsym; /* nhsym is wide char */
|
||||
#else
|
||||
typedef uchar nhsym;
|
||||
#endif
|
||||
|
||||
#if defined(UNICODE_WIDEWINPORT)
|
||||
typedef wchar_t nhwchar; /* nhwchar (window port char) is wide char */
|
||||
#else
|
||||
typedef char nhwchar;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Not Implemented presently */
|
||||
#if defined(UNICODE_PLAYERTEXT)
|
||||
typedef wchar_t nhptext; /* player input is wide char */
|
||||
#else
|
||||
typedef char nhptext;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef STRNCMPI
|
||||
# ifndef __SASC_60 /* SAS/C already shifts to stricmp */
|
||||
|
||||
@@ -193,11 +193,6 @@ extern void NDECL(toggle_mouse_support);
|
||||
extern void FDECL(map_subkeyvalue, (char *));
|
||||
extern void NDECL(load_keyboard_handler);
|
||||
extern void NDECL(raw_clear_screen);
|
||||
# ifdef UNICODE_WIDEWINPORT
|
||||
extern void FDECL(xputc, (NHWCHAR_P));
|
||||
# else
|
||||
extern void FDECL(xputc, (int));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
22
include/rm.h
22
include/rm.h
@@ -227,13 +227,6 @@ struct symdef {
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* Graphics sets for display symbols
|
||||
*/
|
||||
#define PRIMARY 0 /* primary graphics */
|
||||
#define ROGUESET 1 /* rogue graphics */
|
||||
#define NUM_GRAPHICS 2
|
||||
|
||||
struct symparse {
|
||||
unsigned range;
|
||||
#define SYM_CONTROL 1 /* start/finish markers */
|
||||
@@ -260,18 +253,25 @@ struct symsetentry {
|
||||
Bitfield(nocolor,1); /* don't use color if set */
|
||||
Bitfield(primary,1); /* restricted for use as primary set */
|
||||
Bitfield(rogue,1); /* restricted for use as rogue lev set */
|
||||
Bitfield(unicode,1); /* restricted for use as a unicode set */
|
||||
/* 5 free bits */
|
||||
};
|
||||
|
||||
/*
|
||||
* Graphics sets for display symbols
|
||||
*/
|
||||
#define DEFAULT_GRAPHICS 0 /* regular characters: '-', '+', &c */
|
||||
#define PRIMARY 0 /* primary graphics set */
|
||||
#define ROGUESET 1 /* rogue graphics set */
|
||||
#define NUM_GRAPHICS 2
|
||||
|
||||
/*
|
||||
* special symbol set handling types ( for invoking callbacks, etc.)
|
||||
* Must match the order of the known_handlers strings
|
||||
* in drawing.c
|
||||
*/
|
||||
#define H_UNK 0
|
||||
#define H_IBM 1
|
||||
#define H_DEC 2
|
||||
#define H_UNK 0
|
||||
#define H_IBM 1
|
||||
#define H_DEC 2
|
||||
|
||||
extern const struct symdef defsyms[MAXPCHARS]; /* defaults */
|
||||
extern const struct symdef def_warnsyms[WARNCOUNT];
|
||||
|
||||
@@ -257,7 +257,6 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
||||
# define BOOLEAN_P boolean
|
||||
# endif
|
||||
# define ALIGNTYP_P aligntyp
|
||||
# define NHWCHAR_P nhwchar
|
||||
#else
|
||||
# ifdef WIDENED_PROTOTYPES
|
||||
# define CHAR_P int
|
||||
@@ -267,14 +266,6 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
||||
# define SHORT_P int
|
||||
# define BOOLEAN_P int
|
||||
# define ALIGNTYP_P int
|
||||
# if defined(UNICODE_WIDEWINPORT) && defined(WCHAR_MAX)
|
||||
# if WCHAR_MAX >= INT_MAX
|
||||
# define NHWCHAR_P nhwchar
|
||||
# endif
|
||||
# endif
|
||||
# ifndef NHWCHAR_P
|
||||
# define NHWCHAR_P int
|
||||
# endif
|
||||
# else
|
||||
/* Neither widened nor unwidened prototypes. Argument list expansion
|
||||
* by FDECL/VDECL always empty; all xxx_P vanish so defs aren't needed. */
|
||||
|
||||
@@ -35,8 +35,8 @@ struct WinDesc {
|
||||
/* maxcol is also used by WIN_MESSAGE for */
|
||||
/* tracking the ^P command */
|
||||
short *datlen; /* allocation size for *data */
|
||||
nhwchar **data; /* window data [row][column] */
|
||||
nhwchar *morestr; /* string to display instead of default */
|
||||
char **data; /* window data [row][column] */
|
||||
char *morestr; /* string to display instead of default */
|
||||
tty_menu_item *mlist; /* menu information (MENU) */
|
||||
tty_menu_item **plist; /* menu page pointers (MENU) */
|
||||
short plist_size; /* size of allocated plist (MENU) */
|
||||
@@ -88,7 +88,7 @@ extern struct WinDesc *wins[MAXWIN];
|
||||
extern struct DisplayDesc *ttyDisplay; /* the tty display descriptor */
|
||||
|
||||
extern char morc; /* last character typed to xwaitforspace */
|
||||
extern nhwchar defmorestr[]; /* default --more-- prompt */
|
||||
extern char defmorestr[]; /* default --more-- prompt */
|
||||
|
||||
/* port specific external function references */
|
||||
|
||||
@@ -109,9 +109,7 @@ E void NDECL(tty_shutdown);
|
||||
* actually would be expanded. So here, we have to make an exception. */
|
||||
E void FDECL(xputc, (int));
|
||||
#else
|
||||
# ifndef WIN32CON
|
||||
E void FDECL(xputc, (CHAR_P));
|
||||
# endif
|
||||
#endif
|
||||
E void FDECL(xputs, (const char *));
|
||||
#if defined(SCREEN_VGA) || defined(SCREEN_8514)
|
||||
@@ -154,10 +152,10 @@ E int FDECL(has_color,(int color));
|
||||
|
||||
/* ### topl.c ### */
|
||||
|
||||
E void FDECL(addtopl, (const nhwchar *));
|
||||
E void FDECL(addtopl, (const char *));
|
||||
E void NDECL(more);
|
||||
E void FDECL(update_topl, (const nhwchar *));
|
||||
E void FDECL(putsyms, (const nhwchar *));
|
||||
E void FDECL(update_topl, (const char *));
|
||||
E void FDECL(putsyms, (const char*));
|
||||
|
||||
/* ### wintty.c ### */
|
||||
#ifdef CLIPPING
|
||||
@@ -167,9 +165,6 @@ E void FDECL(docorner, (int, int));
|
||||
E void NDECL(end_glyphout);
|
||||
E void FDECL(g_putch, (int));
|
||||
E void FDECL(win_tty_init, (int));
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
E void FDECL(u_putch, (nhwchar));
|
||||
#endif
|
||||
|
||||
/* external declarations */
|
||||
E void FDECL(tty_init_nhwindows, (int *, char **));
|
||||
|
||||
Reference in New Issue
Block a user