MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / input

Function input

Engine/source/console/CMDscan.cpp:1671–1735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1669static int yyinput()
1670#else
1671static int input()
1672#endif
1673 {
1674 int c;
1675
1676 *yy_c_buf_p = yy_hold_char;
1677
1678 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1679 {
1680 /* yy_c_buf_p now points to the character we want to return.
1681 * If this occurs *before* the EOB characters, then it's a
1682 * valid NUL; if not, then we've hit the end of the buffer.
1683 */
1684 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1685 /* This was really a NUL. */
1686 *yy_c_buf_p = '\0';
1687
1688 else
1689 { /* need more input */
1690 yytext_ptr = yy_c_buf_p;
1691 ++yy_c_buf_p;
1692
1693 switch ( yy_get_next_buffer() )
1694 {
1695 case EOB_ACT_END_OF_FILE:
1696 {
1697 if ( yywrap() )
1698 {
1699 yy_c_buf_p =
1700 yytext_ptr + YY_MORE_ADJ;
1701 return EOF;
1702 }
1703
1704 if ( ! yy_did_buffer_switch_on_eof )
1705 YY_NEW_FILE;
1706#ifdef __cplusplus
1707 return yyinput();
1708#else
1709 return input();
1710#endif
1711 }
1712
1713 case EOB_ACT_CONTINUE_SCAN:
1714 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1715 break;
1716
1717 case EOB_ACT_LAST_MATCH:
1718#ifdef __cplusplus
1719 YY_FATAL_ERROR(
1720 "unexpected last match in yyinput()" );
1721#else
1722 YY_FATAL_ERROR(
1723 "unexpected last match in input()" );
1724#endif
1725 }
1726 }
1727 }
1728

Callers

nothing calls this directly

Calls 1

yy_get_next_bufferFunction · 0.85

Tested by

no test coverage detected