MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / net / wireless / rtlink / Utility / configapi.h
blob9e70a9bf86ca14d51ad71dca953527aa561e591b
1 /*
2 ***************************************************************************
3 * Ralink Tech Inc.
4 * 4F, No. 2 Technology 5th Rd.
5 * Science-based Industrial Park
6 * Hsin-chu, Taiwan, R.O.C.
8 * (c) Copyright 2002, Ralink Technology, Inc.
10 * All rights reserved. Ralink's source code is an unpublished work and the
11 * use of a copyright notice does not imply otherwise. This source code
12 * contains confidential trade secret material of Ralink Tech. Any attemp
13 * or participation in deciphering, decoding, reverse engineering or in any
14 * way altering the source code is stricitly prohibited, unless the prior
15 * written consent of Ralink Technology, Inc. is obtained.
16 ***************************************************************************
18 Module Name:
19 configapi.h
21 Abstract:
22 Implement getkeystring / writekeystring like windows API.
24 Revision History:
25 Who When What
26 -------- ---------- ----------------------------------------------
27 Paul Wu 01-22-2003 created
31 #ifndef _CONFIGAPI_H
32 #define _CONFIGAPI_H
34 #include <string.h>
35 #include <stdio.h>
36 #include <stdlib.h>
38 #define MAX_CHARS 256 // Maximum characters/line in Configuration File.
39 #define NEWLINE "\n"
41 #ifndef TRUE
42 #define TRUE 1
43 #endif
45 #ifndef FALSE
46 #define FALSE 0
47 #endif
49 int isfound(char *ptr, char *ini_buffer);
50 char *find_header(char *ini_buffer, char *header_name);
51 int get_parameter(char *str, int strsize, char *key, char *offset);
52 char *find_parameter(char *key, char *offset, int *length);
53 int writekeystring(char *section, char *key, char *str, char *path, char *filename);
54 int getkeystring(char *section, char *key, char *dest, int strsize, char *path, char *filename);
56 #endif //_CONFIGAPI_H