📄 conf.h
字号:
/* Westell 6100 multicast data collection utility * Copyright: Josh Carroll (josh.carroll@gmail.com) * 10/13/2004 * * Thanks to LSorensen, mith, rkeene, and bgr on EFNet * #Linux for the help with my rusty C skills, and thanks * to dmonnier, Yock, no_strings, freerock, hondje, * shenion, and shray on #ATU freenode. * * Also thanks to aedinius on #c on EFNet for helping clean the code * up. * * conf.h 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, version 2. * * 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 **/#include <stdio.h>#include <string.h>#include <sys/stat.h>#include <stdlib.h>#include <regex.h>#define MAX_PATH 80#define SEARCH_LEN 3#define READ_BUFF 1024typedef struct { char path[MAX_PATH]; int model; int decimal; char *bcast; char *laddr;} wconf_t;int rematch(const char *regexp, const char *string);char *match_config(char *regex, char * line);int model_def(char *line);char *bcast_def(char *line);char *laddr_def(char *line);int decimal_def(char *line);int read_config(wconf_t *conf);int parse_config(wconf_t *conf);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -