-/*\r
+/** @file\r
+ Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution.\r
+ The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+\r
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.\r
* All rights reserved.\r
*\r
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
* SUCH DAMAGE.\r
- */\r
\r
-/*\r
* Issues to be discussed:\r
* - Thread safe-ness must be checked\r
* - Return values. There seems to be no standard for return value (RFC2133)\r
* but INRIA implementation returns EAI_xxx defined for getaddrinfo().\r
- */\r
+**/\r
\r
#if 0\r
#include <sys/types.h>\r
u_long v4a;\r
#ifdef ENABLE_IPV6\r
u_char pfx;\r
-#endif\r
int h_error;\r
+#endif\r
char numserv[512];\r
char numaddr[512];\r
\r
hp = getipnodebyaddr(addr, gni_afd->a_addrlen, gni_afd->a_af, &h_error);\r
#else\r
hp = gethostbyaddr(addr, gni_afd->a_addrlen, gni_afd->a_af);\r
- h_error = h_errno;\r
+ //h_error = h_errno;\r
#endif\r
\r
if (hp) {\r
-\r
-/* Parser-tokenizer link implementation */\r
-\r
+/** @file\r
+ Parser-tokenizer link implementation.\r
+\r
+ Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution.\r
+ The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
#include "pgenheaders.h"\r
#include "tokenizer.h"\r
#include "node.h"\r
{\r
parser_state *ps;\r
node *n;\r
- int started = 0, handling_import = 0, handling_with = 0;\r
+ int started = 0;\r
+ //int handling_import = 0;\r
+ //int handling_with = 0;\r
\r
if ((ps = PyParser_New(g, start)) == NULL) {\r
fprintf(stderr, "no mem for new parser\n");\r
}\r
if (type == ENDMARKER && started) {\r
type = NEWLINE; /* Add an extra newline */\r
- handling_with = handling_import = 0;\r
+ //handling_with = 0;\r
+ //handling_import = 0;\r
started = 0;\r
/* Add the right number of dedent tokens,\r
except if a certain flag is given --\r
/** @file\r
Translate the host name into an IP address\r
\r
- Copyright (c) 2011-2012, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution.\r
+ The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
**/\r
-\r
#include <errno.h>\r
#include <netdb.h>\r
#include <string.h>\r
char mBuffer[65536];\r
\r
\r
-/**\r
- Translate the host name into an IP address\r
+/** Translate the host name into an IP address\r
\r
@param [in] Argc The number of arguments\r
@param [in] Argv The argument value array\r
IN char **Argv\r
)\r
{\r
- int AppStatus;\r
UINT8 * pIpAddress;\r
struct hostent * pHost;\r
\r
"%a starting\r\n",\r
Argv[0]));\r
\r
- //\r
// Determine if the host name is specified\r
- //\r
- AppStatus = 0;\r
if ( 1 == Argc ) {\r
Print ( L"%a <host name>\r\n", Argv[0]);\r
}\r
else {\r
- //\r
// Translate the host name\r
- //\r
pHost = _gethostbydnsname ( Argv[1], AF_INET );\r
if ( NULL == pHost ) {\r
Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );\r
pIpAddress[3]);\r
}\r
}\r
-\r
- //\r
// All done\r
- //\r
return errno;\r
}\r
/** @file\r
Translate the host name into an IP address\r
\r
- Copyright (c) 2011-2012, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution.\r
+ The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
**/\r
-\r
#include <errno.h>\r
#include <netdb.h>\r
#include <string.h>\r
char mBuffer[65536];\r
\r
\r
-/**\r
- Translate the host name into an IP address\r
+/** Translate the host name into an IP address\r
\r
- @param [in] Argc The number of arguments\r
- @param [in] Argv The argument value array\r
+ @param[in] Argc The number of arguments\r
+ @param[in] Argv The argument value array\r
\r
@retval 0 The application exited normally.\r
@retval Other An error occurred.\r
IN char **Argv\r
)\r
{\r
- int AppStatus;\r
UINTN Index;\r
struct hostent * pHost;\r
UINT8 * pIpAddress;\r
"%a starting\r\n",\r
Argv[0]));\r
\r
- //\r
// Determine if the host name is specified\r
- //\r
- AppStatus = 0;\r
if ( 1 == Argc ) {\r
Print ( L"%a <host name>\r\n", Argv[0]);\r
}\r
else {\r
- //\r
// Translate the host name\r
- //\r
pHost = gethostbyname ( Argv[1]);\r
if ( NULL == pHost ) {\r
Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );\r
pHost->h_addrtype,\r
pHost->h_name );\r
\r
- //\r
// Display the other addresses\r
- //\r
for ( Index = 1; NULL != pHost->h_addr_list[Index]; Index++ ) {\r
pIpAddress = (UINT8 *)pHost->h_addr_list[Index];\r
Print ( L"%d.%d.%d.%d\r\n",\r
pIpAddress[3]);\r
}\r
\r
- //\r
// Display the list of aliases\r
- //\r
ppName = pHost->h_aliases;\r
if (( NULL == ppName ) || ( NULL == *ppName )) {\r
Print ( L"No aliases\r\n" );\r
}\r
}\r
}\r
-\r
- //\r
// All done\r
- //\r
return errno;\r
}\r
/** @file\r
Translate the network name into an IP address\r
\r
- Copyright (c) 2011-2012, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution.\r
+ The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
**/\r
-\r
#include <errno.h>\r
#include <netdb.h>\r
#include <string.h>\r
char mBuffer[65536];\r
\r
\r
-/**\r
- Translate the network name into an IP address\r
+/** Translate the network name into an IP address\r
\r
- @param [in] Argc The number of arguments\r
- @param [in] Argv The argument value array\r
+ @param[in] Argc The number of arguments\r
+ @param[in] Argv The argument value array\r
\r
@retval 0 The application exited normally.\r
@retval Other An error occurred.\r
IN char **Argv\r
)\r
{\r
- int AppStatus;\r
UINT8 * pIpAddress;\r
struct netent * pNetwork;\r
\r
"%a starting\r\n",\r
Argv[0]));\r
\r
- //\r
// Determine if the network name is specified\r
- //\r
- AppStatus = 0;\r
if ( 1 == Argc ) {\r
Print ( L"%a <network name>\r\n", Argv[0]);\r
}\r
else {\r
- //\r
// Translate the net name\r
- //\r
pNetwork = getnetbyname ( Argv[1]);\r
if ( NULL == pNetwork ) {\r
Print ( L"ERROR - network not found, errno: %d\r\n", errno );\r
pIpAddress[3]);\r
}\r
}\r
-\r
- //\r
// All done\r
- //\r
return errno;\r
}\r
/** @file\r
Translate the service name into a port number\r
\r
- Copyright (c) 2011-2012, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution.\r
+ The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
**/\r
-\r
#include <errno.h>\r
#include <netdb.h>\r
#include <string.h>\r
char mBuffer[65536];\r
\r
\r
-/**\r
- Translate the service name into a port number\r
+/** Translate the service name into a port number\r
\r
- @param [in] Argc The number of arguments\r
- @param [in] Argv The argument value array\r
+ @param[in] Argc The number of arguments\r
+ @param[in] Argv The argument value array\r
\r
@retval 0 The application exited normally.\r
@retval Other An error occurred.\r
IN char **Argv\r
)\r
{\r
- int AppStatus;\r
int PortNumber;\r
struct servent * pService;\r
\r
- //\r
// Determine if the service name is specified\r
- //\r
- AppStatus = 0;\r
if ( 1 == Argc ) {\r
Print ( L"%a <service name>\r\n", Argv[0]);\r
}\r
else {\r
- //\r
// Translate the service name\r
- //\r
pService = getservbyname ( Argv[1], NULL );\r
if ( NULL == pService ) {\r
Print ( L"ERROR - service not found, errno: %d\r\n", errno );\r
pService->s_proto );\r
}\r
}\r
-\r
- //\r
// All done\r
- //\r
return errno;\r
}\r
/** @file\r
Translate the port number into a service name\r
\r
- Copyright (c) 2011-2012, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution.\r
+ The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
**/\r
-\r
#include <errno.h>\r
#include <netdb.h>\r
#include <stdio.h>\r
char mBuffer[65536];\r
\r
\r
-/**\r
- Translate the port number into a service name\r
+/** Translate the port number into a service name\r
\r
- @param [in] Argc The number of arguments\r
- @param [in] Argv The argument value array\r
+ @param[in] Argc The number of arguments\r
+ @param[in] Argv The argument value array\r
\r
@retval 0 The application exited normally.\r
@retval Other An error occurred.\r
IN char **Argv\r
)\r
{\r
- int AppStatus;\r
int PortNumber;\r
struct servent * pService;\r
\r
- //\r
// Determine if the service name is specified\r
- //\r
- AppStatus = 0;\r
if (( 2 != Argc )\r
|| ( 1 != sscanf ( Argv[1], "%d", &PortNumber ))) {\r
Print ( L"%a <port number>\r\n", Argv[0]);\r
}\r
else {\r
- //\r
// Translate the port number\r
- //\r
pService = getservbyport ( htons ( PortNumber ), NULL );\r
if ( NULL == pService ) {\r
Print ( L"ERROR - service not found, errno: %d\r\n", errno );\r
pService->s_proto );\r
}\r
}\r
-\r
- //\r
// All done\r
- //\r
return errno;\r
}\r
// Determine if the receive operation is pending\r
Status = EslSocketPortCloseRxDone ( pPort );\r
DBG_EXIT_STATUS ( Status );\r
+ --Status;\r
}\r
\r
\r
short events\r
)\r
{\r
- EFI_SIMPLE_TEXT_INPUT_PROTOCOL *Proto;\r
ConInstance *Stream;\r
EFI_STATUS Status = RETURN_SUCCESS;\r
short RdyMask = 0;\r
}\r
if(Stream->InstanceNum == 0) {\r
// STDIN: Only input is supported for this device\r
- Proto = (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)Stream->Dev;\r
Status = da_ConRawRead (filp, &Stream->UnGetKey);\r
if(Status == RETURN_SUCCESS) {\r
RdyMask = POLLIN;\r