File: [OMI] / omi / base / Attic / io.h
(download)
Revision: 1.1,
Wed May 30 21:47:49 2012 UTC (12 years, 1 month ago) by mike
Branch: MAIN
Initial revision
|
/*
**==============================================================================
**
** Open Management Infrastructure (OMI)
**
** Copyright (c) Microsoft Corporation
**
** Licensed under the Apache License, Version 2.0 (the "License"); you may not
** use this file except in compliance with the License. You may obtain a copy
** of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
** MERCHANTABLITY OR NON-INFRINGEMENT.
**
** See the Apache 2 License for the specific language governing permissions
** and limitations under the License.
**
**==============================================================================
*/
#ifndef _base_io_h
#define _base_io_h
#include <common.h>
#include <stdio.h>
#include <stdarg.h>
BEGIN_EXTERNC
FILE* Fopen(const char* path, const char* mode);
PRINTF_FORMAT(3, 4)
int Snprintf(char* buf, size_t size, const char* fmt, ...);
int Vsnprintf(char* buf, size_t size, const char* fmt, va_list ap);
PRINTF_FORMAT(2, 3)
void Fzprintf(FILE* os, const MI_Char* format, ...);
PRINTF_FORMAT(1, 2)
void Zprintf(const MI_Char* format, ...);
PRINTF_FORMAT(3, 4)
int Szprintf(MI_Char* buffer, size_t count, const MI_Char* format, ...);
/*
ATTN:
*/
#if defined(_WIN32) || defined( linux )
#define MI_GET_SAFE_PRINTF_STRING(p) (p)
#else
#define MI_GET_SAFE_PRINTF_STRING(p) ((p) ? (p) : "<null>")
#endif
END_EXTERNC
#endif /* _base_io_h */