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