1/* 2 * iodbc_misc.h 3 * 4 * $Id: iodbc_misc.h,v 1.2 2006/07/10 13:49:46 source Exp $ 5 * 6 * Misc functions 7 * 8 * The iODBC driver manager. 9 * 10 * Copyright (C) 2005 by OpenLink Software <iodbc@openlinksw.com> 11 * All Rights Reserved. 12 * 13 * This software is released under the terms of either of the following 14 * licenses: 15 * 16 * - GNU Library General Public License (see LICENSE.LGPL) 17 * - The BSD License (see LICENSE.BSD). 18 * 19 * While not mandated by the BSD license, any patches you make to the 20 * iODBC source code may be contributed back into the iODBC project 21 * at your discretion. Contributions will benefit the Open Source and 22 * Data Access community as a whole. Submissions may be made at: 23 * 24 * http://www.iodbc.org 25 * 26 * 27 * GNU Library Generic Public License Version 2 28 * ============================================ 29 * This library is free software; you can redistribute it and/or 30 * modify it under the terms of the GNU Library General Public 31 * License as published by the Free Software Foundation; either 32 * version 2 of the License, or (at your option) any later version. 33 * 34 * This library is distributed in the hope that it will be useful, 35 * but WITHOUT ANY WARRANTY; without even the implied warranty of 36 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 37 * Library General Public License for more details. 38 * 39 * You should have received a copy of the GNU Library General Public 40 * License along with this library; if not, write to the Free 41 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 42 * 43 * 44 * The BSD License 45 * =============== 46 * Redistribution and use in source and binary forms, with or without 47 * modification, are permitted provided that the following conditions 48 * are met: 49 * 50 * 1. Redistributions of source code must retain the above copyright 51 * notice, this list of conditions and the following disclaimer. 52 * 2. Redistributions in binary form must reproduce the above copyright 53 * notice, this list of conditions and the following disclaimer in 54 * the documentation and/or other materials provided with the 55 * distribution. 56 * 3. Neither the name of OpenLink Software Inc. nor the names of its 57 * contributors may be used to endorse or promote products derived 58 * from this software without specific prior written permission. 59 * 60 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 61 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 62 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 63 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR 64 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 65 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 66 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 67 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 68 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 69 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 70 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 71 */ 72#ifndef _IODBC_MISC_H_ 73#define _IODBC_MISC_H_ 74 75#include "inifile.h" 76 77int _iodbcdm_cfg_init_str (PCONFIG *ppconf, void *str, int size, int wide); 78int _iodbcdm_cfg_parse_str (PCONFIG pconfig, void *str, int size, int wide); 79void *_iodbcdm_cfg_lookup (PCONFIG pconfig, const char *id); 80int _iodbcdm_cfg_to_string (PCONFIG pconfig, char *section, 81 char *buf, size_t buf_sz); 82 83#endif /* _IODBC_MISC_H_ */ 84