?? libconfig.h
字號:
/* voifax general configuration interface library * Copyright (C) 2004 Simone Freddio & Andrea Emanuelli * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *//* Questa libreria gestisce file di configurazione formattati secondo le seguenti regole: 1) Le linee che cominciano con '#' sono ignorate 2) Le righe piu' corte di 3 caratteri sono ignorate 3) Le righe devono essere formattate su 3 colonne separate da \t 4) Le colonne sono nell'ordine: sezione chiave valore*/#define MAXHASHNUMBER 32 /* Definisce il numero massimo di coppie chiave/valore per singola sezione */#define MAXHASHSIZE 128 /* Definisce la lunghezza massima per le chiavi e i valori */#define MAXSECTIONS 64 /* Definisce il numero massimo di sezione per signolo file */typedef struct { int used; char key[MAXHASHSIZE]; char val[MAXHASHSIZE];} lc_item;typedef struct { int used; char section_name[MAXHASHSIZE]; lc_item items[MAXHASHNUMBER];} lc_section;lc_section sections[MAXSECTIONS];int libconfig_init(char *filename); /* legge il file di configurazione specificato e popola la struttura contente sezioni, chiavi e valori */char *libconfig_getvalue(char *secname, char *key, char *defval); /* restituisce il valore associato alla coppia sezione/chiave */void libconfig_freehash(void); /* Reinizializza la libreria */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -