-/* $NetBSD: fwide.c,v 1.3 2005/06/12 05:21:27 lukem Exp $ */\r
+/*\r
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available\r
+ under the terms and conditions of the BSD License that accompanies this\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.\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)2001 Citrus Project,\r
* All rights reserved.\r
*\r
* SUCH DAMAGE.\r
*\r
* $Citrus$\r
- */\r
+\r
+ NetBSD: fwide.c,v 1.3 2005/06/12 05:21:27 lukem Exp\r
+*/\r
#include <LibConfig.h>\r
#include <sys/EfiCdefs.h>\r
-#if defined(LIBC_SCCS) && !defined(lint)\r
-__RCSID("$NetBSD: fwide.c,v 1.3 2005/06/12 05:21:27 lukem Exp $");\r
-#endif /* LIBC_SCCS and not lint */\r
\r
#include <assert.h>\r
+#include <errno.h>\r
#include <stdio.h>\r
#include <wchar.h>\r
#include "reentrant.h"\r
struct wchar_io_data *wcio;\r
\r
_DIAGASSERT(fp != NULL);\r
+ if(fp == NULL) {\r
+ errno = EINVAL;\r
+ return (0);\r
+ }\r
\r
/*\r
* this implementation use only -1, 0, 1\r