(file) Return to io.h CVS log (file) (dir) Up to [OMI] / omi / base

 1 mike  1.1 /*
 2           **==============================================================================
 3           **
 4           ** Open Management Infrastructure (OMI)
 5           **
 6           ** Copyright (c) Microsoft Corporation
 7           ** 
 8           ** Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 9           ** use this file except in compliance with the License. You may obtain a copy 
10           ** of the License at 
11           **
12           **     http://www.apache.org/licenses/LICENSE-2.0 
13           **
14           ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15           ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
16           ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
17           ** MERCHANTABLITY OR NON-INFRINGEMENT. 
18           **
19           ** See the Apache 2 License for the specific language governing permissions 
20           ** and limitations under the License.
21           **
22 mike  1.1 **==============================================================================
23           */
24           
25           #ifndef _base_io_h
26           #define _base_io_h
27           
28           #include <common.h>
29           #include <stdio.h>
30           #include <stdarg.h>
31           
32           BEGIN_EXTERNC
33           
34           FILE* Fopen(const char* path, const char* mode);
35           
36           PRINTF_FORMAT(3, 4)
37           int Snprintf(char* buf, size_t size, const char* fmt, ...);
38           
39           int Vsnprintf(char* buf, size_t size, const char* fmt, va_list ap);
40           
41           PRINTF_FORMAT(2, 3)
42           void Fzprintf(FILE* os, const MI_Char* format, ...);
43 mike  1.1 
44           PRINTF_FORMAT(1, 2)
45           void Zprintf(const MI_Char* format, ...);
46           
47           PRINTF_FORMAT(3, 4)
48           int Szprintf(MI_Char* buffer, size_t count, const MI_Char* format, ...);
49           
50           /*
51           ATTN:
52           */
53           #if defined(_WIN32) || defined( linux )
54           #define MI_GET_SAFE_PRINTF_STRING(p)  (p)
55           #else
56           #define MI_GET_SAFE_PRINTF_STRING(p)  ((p) ? (p) : "<null>")
57           #endif
58           
59           END_EXTERNC
60           
61           #endif /* _base_io_h */

ViewCVS 0.9.2