1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     os_UtilityTWL.cpp
4 
5   Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Revision: 13145 $
14  *---------------------------------------------------------------------------*/
15 
16 #include <twl/types.h>
17 #include <twl/os.h>
18 
19 namespace nw {
20 namespace os {
21 
22 namespace internal {
23 
24 /*!--------------------------------------------------------------------------*
25   Name:        VPrintf
26 
27   @brief       引数リスト指定で書式付き文字列を出力します。
28 
29   @param[in]   fmt     出力文字列フォーマット
30   @param[in]   vlist   可変長引数リスト
31 
32   @return      None.
33  *---------------------------------------------------------------------------*/
34 void
VPrintf(const char * fmt,std::va_list vlist)35 VPrintf(const char *fmt, std::va_list vlist)
36 {
37     OS_VPrintf(fmt, vlist);
38 }
39 
40 } // namespace internal
41 
42 /*!--------------------------------------------------------------------------*
43   Name:        Halt
44 
45   @brief       プログラムを異常終了します。
46 
47   @return      None.
48  *---------------------------------------------------------------------------*/
49 void
Halt()50 Halt()
51 {
52     OS_Terminate();
53 }
54 
55 /*!--------------------------------------------------------------------------*
56   Name:        VSNPrintf
57 
58   @brief       引数リスト指定で、与えられたバッファへ書式付き文字列を出力します。
59 
60   @param[out]  dst
61   @param[in]   len
62   @param[in]   fmt     出力文字列フォーマット
63   @param[in]   vlist   可変長引数リスト
64 
65   @return      出力文字列の文字列長 ('\0'を除く)
66  *---------------------------------------------------------------------------*/
67 int
VSNPrintf(char * dst,size_t len,const char * fmt,std::va_list vlist)68 VSNPrintf(char* dst, size_t len, const char* fmt, std::va_list vlist)
69 {
70     return OS_VSNPrintf(dst, len, fmt, vlist);
71 }
72 
73 
74 }  // namespace os
75 }  // namespace nw
76