'pull' prebuilts from master into release branch

This commit is contained in:
nhmall
2015-12-04 07:46:21 -05:00
parent 786ac8abe6
commit eed4549f53
3 changed files with 118 additions and 482 deletions

View File

@@ -33,7 +33,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -50,7 +50,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -167,7 +167,7 @@ extern FILE *yyin, *yyout;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -224,7 +224,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -568,9 +568,7 @@ int yy_flex_debug = 0;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "dgn_comp.l"
#line 2 "dgn_comp.l"
/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1448710672 2015/11/28 11:37:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1449233101 2015/12/04 12:45:01 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.15 $ */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* Copyright (c) 1990 by M. Stephenson */
/* NetHack may be freely redistributed. See license for details. */
@@ -638,7 +636,6 @@ int FDECL(yyoutput, (int));
genericptr_t FDECL(realloc, (genericptr_t,size_t));
#endif
void FDECL(init_yyin, (FILE *));
void FDECL(init_yyout, (FILE *));
@@ -650,8 +647,6 @@ extern YYSTYPE yylval;
int nh_line_number = 1;
#line 654 "dgn_lex.c"
#define INITIAL 0
#ifndef YY_NO_UNISTD_H
@@ -710,7 +705,7 @@ extern int yywrap (void );
#endif
static void yyunput (int c,char *buf_ptr );
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
@@ -834,10 +829,6 @@ YY_DECL
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 83 "dgn_comp.l"
#line 841 "dgn_lex.c"
if ( !(yy_init) )
{
@@ -923,153 +914,123 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
#line 84 "dgn_comp.l"
return(A_DUNGEON);
YY_BREAK
case 2:
YY_RULE_SETUP
#line 85 "dgn_comp.l"
{ yylval.i=1; return(UP_OR_DOWN); }
YY_BREAK
case 3:
YY_RULE_SETUP
#line 86 "dgn_comp.l"
{ yylval.i=0; return(UP_OR_DOWN); }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 87 "dgn_comp.l"
return(ENTRY);
YY_BREAK
case 5:
YY_RULE_SETUP
#line 88 "dgn_comp.l"
return(STAIR);
YY_BREAK
case 6:
YY_RULE_SETUP
#line 89 "dgn_comp.l"
return(NO_UP);
YY_BREAK
case 7:
YY_RULE_SETUP
#line 90 "dgn_comp.l"
return(NO_DOWN);
YY_BREAK
case 8:
YY_RULE_SETUP
#line 91 "dgn_comp.l"
return(PORTAL);
YY_BREAK
case 9:
YY_RULE_SETUP
#line 92 "dgn_comp.l"
return(PROTOFILE);
YY_BREAK
case 10:
YY_RULE_SETUP
#line 93 "dgn_comp.l"
return(DESCRIPTION);
YY_BREAK
case 11:
YY_RULE_SETUP
#line 94 "dgn_comp.l"
return(LEVELDESC);
YY_BREAK
case 12:
YY_RULE_SETUP
#line 95 "dgn_comp.l"
return(ALIGNMENT);
YY_BREAK
case 13:
YY_RULE_SETUP
#line 96 "dgn_comp.l"
return(LEVALIGN);
YY_BREAK
case 14:
YY_RULE_SETUP
#line 97 "dgn_comp.l"
{ yylval.i=TOWN ; return(DESCRIPTOR); }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 98 "dgn_comp.l"
{ yylval.i=HELLISH ; return(DESCRIPTOR); }
YY_BREAK
case 16:
YY_RULE_SETUP
#line 99 "dgn_comp.l"
{ yylval.i=MAZELIKE ; return(DESCRIPTOR); }
YY_BREAK
case 17:
YY_RULE_SETUP
#line 100 "dgn_comp.l"
{ yylval.i=ROGUELIKE ; return(DESCRIPTOR); }
YY_BREAK
case 18:
YY_RULE_SETUP
#line 101 "dgn_comp.l"
{ yylval.i=D_ALIGN_NONE ; return(DESCRIPTOR); }
YY_BREAK
case 19:
YY_RULE_SETUP
#line 102 "dgn_comp.l"
{ yylval.i=D_ALIGN_NONE ; return(DESCRIPTOR); }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 103 "dgn_comp.l"
{ yylval.i=D_ALIGN_LAWFUL ; return(DESCRIPTOR); }
YY_BREAK
case 21:
YY_RULE_SETUP
#line 104 "dgn_comp.l"
{ yylval.i=D_ALIGN_NEUTRAL ; return(DESCRIPTOR); }
YY_BREAK
case 22:
YY_RULE_SETUP
#line 105 "dgn_comp.l"
{ yylval.i=D_ALIGN_CHAOTIC ; return(DESCRIPTOR); }
YY_BREAK
case 23:
YY_RULE_SETUP
#line 106 "dgn_comp.l"
return(BRANCH);
YY_BREAK
case 24:
YY_RULE_SETUP
#line 107 "dgn_comp.l"
return(CHBRANCH);
YY_BREAK
case 25:
YY_RULE_SETUP
#line 108 "dgn_comp.l"
return(LEVEL);
YY_BREAK
case 26:
YY_RULE_SETUP
#line 109 "dgn_comp.l"
return(RNDLEVEL);
YY_BREAK
case 27:
YY_RULE_SETUP
#line 110 "dgn_comp.l"
return(CHLEVEL);
YY_BREAK
case 28:
YY_RULE_SETUP
#line 111 "dgn_comp.l"
return(RNDCHLEVEL);
YY_BREAK
case 29:
YY_RULE_SETUP
#line 112 "dgn_comp.l"
{ yylval.i=atoi(yytext); return(INTEGER); }
YY_BREAK
case 30:
/* rule 30 can match eol */
YY_RULE_SETUP
#line 113 "dgn_comp.l"
{ yytext[yyleng - 1] = '\0'; /* discard the trailing \" */
yylval.str = dupstr(yytext + 1); /* skip the first \" */
return STRING; }
@@ -1077,31 +1038,25 @@ YY_RULE_SETUP
case 31:
/* rule 31 can match eol */
YY_RULE_SETUP
#line 116 "dgn_comp.l"
{ nh_line_number++; }
YY_BREAK
case 32:
/* rule 32 can match eol */
YY_RULE_SETUP
#line 117 "dgn_comp.l"
{ nh_line_number++; }
YY_BREAK
case 33:
YY_RULE_SETUP
#line 118 "dgn_comp.l"
; /* skip trailing tabs & spaces */
YY_BREAK
case 34:
YY_RULE_SETUP
#line 119 "dgn_comp.l"
{ return yytext[0]; }
YY_BREAK
case 35:
YY_RULE_SETUP
#line 120 "dgn_comp.l"
ECHO;
YY_BREAK
#line 1105 "dgn_lex.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1379,7 +1334,7 @@ static int yy_get_next_buffer (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
@@ -1434,7 +1389,7 @@ static int yy_get_next_buffer (void)
static void yyunput (int c, register char * yy_bp )
{
register char *yy_cp;
yy_cp = (yy_c_buf_p);
/* undo effects of setting up yytext */
@@ -1477,7 +1432,7 @@ static int yy_get_next_buffer (void)
{
int c;
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -1546,12 +1501,12 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
*
* @note This function does not reset the start condition to @c INITIAL .
*/
void yyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
@@ -1564,11 +1519,11 @@ static int yy_get_next_buffer (void)
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*
*/
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
@@ -1608,13 +1563,13 @@ static void yy_load_buffer_state (void)
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
*
*
* @return the allocated buffer state.
*/
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1637,11 +1592,11 @@ static void yy_load_buffer_state (void)
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
*
*
*/
void yy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -1662,7 +1617,7 @@ static void yy_load_buffer_state (void)
{
int oerrno = errno;
yy_flush_buffer(b );
b->yy_input_file = file;
@@ -1678,13 +1633,13 @@ static void yy_load_buffer_state (void)
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*
*/
void yy_flush_buffer (YY_BUFFER_STATE b )
{
@@ -1713,7 +1668,7 @@ static void yy_load_buffer_state (void)
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
*
*
*/
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
@@ -1743,7 +1698,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*
*/
void yypop_buffer_state (void)
{
@@ -1767,7 +1722,7 @@ void yypop_buffer_state (void)
static void yyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
@@ -1780,7 +1735,7 @@ static void yyensure_buffer_stack (void)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
@@ -1810,13 +1765,13 @@ static void yyensure_buffer_stack (void)
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
* @return the newly allocated buffer state object.
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -1845,14 +1800,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead.
*/
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
return yy_scan_bytes(yystr,strlen(yystr) );
}
@@ -1860,7 +1815,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
@@ -1869,7 +1824,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) yyalloc(n );
@@ -1923,16 +1878,16 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
*
*
*/
int yyget_lineno (void)
{
return yylineno;
}
/** Get the input stream.
*
*
*/
FILE *yyget_in (void)
{
@@ -1940,7 +1895,7 @@ FILE *yyget_in (void)
}
/** Get the output stream.
*
*
*/
FILE *yyget_out (void)
{
@@ -1948,7 +1903,7 @@ FILE *yyget_out (void)
}
/** Get the length of the current token.
*
*
*/
yy_size_t yyget_leng (void)
{
@@ -1956,7 +1911,7 @@ yy_size_t yyget_leng (void)
}
/** Get the current token.
*
*
*/
char *yyget_text (void)
@@ -1966,18 +1921,18 @@ char *yyget_text (void)
/** Set the current line number.
* @param line_number
*
*
*/
void yyset_lineno (int line_number )
{
yylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
*
* @see yy_switch_to_buffer
*/
void yyset_in (FILE * in_str )
@@ -2031,7 +1986,7 @@ static int yy_init_globals (void)
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
yy_delete_buffer(YY_CURRENT_BUFFER );
@@ -2098,10 +2053,6 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
#line 120 "dgn_comp.l"
/* routine to switch to another input file; needed for flex */
void
init_yyin( input_f )