[GME-commit] GMESRC/GME/Include/apr-iconv api_version.h, NONE, 1.1 apr_iconv.h, NONE, 1.1

Log messages of CVS commits gme-commit at list.isis.vanderbilt.edu
Wed Feb 13 12:40:10 CST 2008


Update of /project/gme-repository/GMESRC/GME/Include/apr-iconv
In directory escher:/tmp/cvs-serv7007

Added Files:
	api_version.h apr_iconv.h 
Log Message:
AprIconv - Apache Portable Runtime - charset conversion lib include files.


CVS User: Zoltan Molnar, ISIS (zolmol)

--- NEW FILE: apr_iconv.h ---
/*-
 * Copyright (c) 1999,2000
 *	Konstantin Chuguev.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by Konstantin Chuguev
 *	and its contributors.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

#ifndef APR_ICONV_H
#define APR_ICONV_H

#include "apr.h"
#include "apr_pools.h"
#include <stddef.h>

/**
 * API_DECLARE_EXPORT is defined when building the libapriconv dynamic 
 * library, so that all public symbols are exported.
 *
 * API_DECLARE_STATIC is defined when including the apriconv public headers, 
 * to provide static linkage when the dynamic library may be unavailable.
 *
 * API_DECLARE_STATIC and API_DECLARE_EXPORT are left undefined when
 * including the apr-iconv public headers, to import and link the symbols 
 * from the dynamic libapriconv library and assure appropriate indirection 
 * and calling conventions at compile time.
 */

#if !defined(WIN32)
/**
 * The public apr-iconv functions are declared with API_DECLARE(), so they 
 * use the most portable calling convention.  Public apr-iconv functions 
 * with variable arguments must use API_DECLARE_NONSTD().
 *
 * @deffunc API_DECLARE(rettype) apr_func(args);
 */
#define API_DECLARE(type)            type
/**
 * The private apr-iconv functions are declared with API_DECLARE_NONSTD(), 
 * so they use the most optimal C language calling conventions.
 *
 * @deffunc API_DECLARE(rettype) apr_func(args);
 */
#define API_DECLARE_NONSTD(type)     type
/**
 * All exported apr-iconv variables are declared with API_DECLARE_DATA
 * This assures the appropriate indirection is invoked at compile time.
 *
 * @deffunc API_DECLARE_DATA type apr_variable;
 * @tip extern API_DECLARE_DATA type apr_variable; syntax is required for
 * declarations within headers to properly import the variable.
 */
#define API_DECLARE_DATA
#elif defined(API_DECLARE_STATIC)
#define API_DECLARE(type)            type __stdcall
#define API_DECLARE_NONSTD(type)     type
#define API_DECLARE_DATA
#elif defined(API_DECLARE_EXPORT)
#define API_DECLARE(type)            __declspec(dllexport) type __stdcall
#define API_DECLARE_NONSTD(type)     __declspec(dllexport) type
#define API_DECLARE_DATA             __declspec(dllexport)
#else
#define API_DECLARE(type)            __declspec(dllimport) type __stdcall
#define API_DECLARE_NONSTD(type)     __declspec(dllimport) type
#define API_DECLARE_DATA             __declspec(dllimport)
#endif

/*
 * apr_iconv_t:	charset conversion descriptor type
 */
typedef void *apr_iconv_t;

/* __BEGIN_DECLS */

API_DECLARE(apr_status_t) apr_iconv_open(const char *, const char *, apr_pool_t *, apr_iconv_t *);
API_DECLARE(apr_status_t) apr_iconv(apr_iconv_t, const char **, apr_size_t *, char **, apr_size_t *, apr_size_t *);
API_DECLARE(apr_status_t) apr_iconv_close(apr_iconv_t, apr_pool_t *);

/* __END_DECLS */

#endif /* APR_ICONV_H */

--- NEW FILE: api_version.h ---
/* Copyright 2000-2004 The Apache Software Foundation
 *
 * 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
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef API_VERSION_H
#define API_VERSION_H

#include "apr.h"
#include "apr_version.h"

#include "apr_iconv.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file api_version.h
 * @brief 
 * 
 * APR-iconv's Version
 *
 * There are several different mechanisms for accessing the version. There
 * is a string form, and a set of numbers; in addition, there are constants
 * which can be compiled into your application, and you can query the library
 * being used for its actual version.
 *
 * Note that it is possible for an application to detect that it has been
 * compiled against a different version of API by use of the compile-time
 * constants and the use of the run-time query function.
 *
 * API version numbering follows the guidelines specified in:
 *
 *     http://apr.apache.org/versioning.html
 */

/* The numeric compile-time version constants. These constants are the
 * authoritative version numbers for API. 
 */

/** major version 
 * Major API changes that could cause compatibility problems for older
 * programs such as structure size changes.  No binary compatibility is
 * possible across a change in the major version.
 */
#define API_MAJOR_VERSION       0

/** 
 * Minor API changes that do not cause binary compatibility problems.
 * Should be reset to 0 when upgrading API_MAJOR_VERSION
 */
#define API_MINOR_VERSION       9

/** patch level */
#define API_PATCH_VERSION       7

/** 
 *  This symbol is defined for internal, "development" copies of API. This
 *  symbol will be #undef'd for releases. 
 */
/* #define API_IS_DEV_VERSION */


/** The formatted string of API's version */
#define API_VERSION_STRING \
     APR_STRINGIFY(API_MAJOR_VERSION) "." \
     APR_STRINGIFY(API_MINOR_VERSION) "." \
     APR_STRINGIFY(API_PATCH_VERSION) \
     API_IS_DEV_STRING

/**
 * Return APR-util's version information information in a numeric form.
 *
 *  @param pvsn Pointer to a version structure for returning the version
 *              information.
 */
API_DECLARE(void) api_version(apr_version_t *pvsn);

/** Return API's version information as a string. */
API_DECLARE(const char *) api_version_string(void);


/** Internal: string form of the "is dev" flag */
#ifdef API_IS_DEV_VERSION
#define API_IS_DEV_STRING "-dev"
#else
#define API_IS_DEV_STRING ""
#endif

#ifdef __cplusplus
}
#endif

#endif /* API_VERSION_H */



More information about the GME-commit mailing list