亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? read_ini.c

?? wm PNE 3.3 source code, running at more than vxworks6.x version.
?? C
字號:
/* $Header: /usr/cvsroot/target/src/wrn/wm/demo/lib/read_ini.c,v 1.3 2003/01/15 14:04:34 josh Exp $ *//* * Copyright (C) 1999-2005 Wind River Systems, Inc. * All rights reserved.  Provided under license only. * Distribution or other use of this software is only * permitted pursuant to the terms of a license agreement * from Wind River Systems (and is otherwise prohibited). * Refer to that license agreement for terms of use. *//**************************************************************************** *  Copyright 1993-1997 Epilogue Technology Corporation. *  Copyright 1998 Integrated Systems, Inc. *  All rights reserved. ****************************************************************************//* * $Log: read_ini.c,v $ * Revision 1.3  2003/01/15 14:04:34  josh * directory structure shifting * * Revision 1.2  2001/11/08 15:56:25  tneale * Updated for newest file layout * * Revision 1.1.1.1  2001/11/05 17:48:42  tneale * Tornado shuffle * * Revision 2.15  2001/01/19 22:23:50  paul * Update copyright. * * Revision 2.14  2000/03/17 00:12:44  meister * Update copyright message * * Revision 2.13  1999/04/26 19:05:01  sra * Fix a few minor warnings, fix a few Solaris-specific problems in the * demo code. * * Revision 2.12  1998/07/15 17:49:28  meister * added nidrive.c and nidrv.h. * * Revision 2.11  1998/07/02 21:23:49  sra * Rearrange #include files to fix stdio dependency. * * Revision 2.10  1998/06/28 20:09:38  sra * Add support for SNARK_READ_INI_FROM_MEMORY. * * Revision 2.9  1998/05/13 21:16:13  meister * only compile this if SNARK_PSOS_NO_PHILE is not installed * * Revision 2.8  1998/02/25 04:57:36  sra * Update copyrights. * * Revision 2.7  1997/03/20 06:53:09  sra * DFARS-safe copyright text.  Zap! * * Revision 2.6  1997/03/19 20:20:40  sra * Remove gratuitous Attache dependencies. * * Revision 2.5  1997/03/19 04:47:35  sra * Get rid of some gratuitous historical dependencies on Attache. * * Revision 2.4  1997/02/25 10:58:16  sra * Update copyright notice, dust under the bed. * * Revision 2.3  1996/10/25 16:01:00  sar * Added some include files to get the configuration stuff correct. * * Revision 2.2  1996/03/22  10:05:39  sra * Update copyrights prior to Attache 3.2 release. * * Revision 2.1  1995/07/31  13:54:55  sra * OSPF now working well enough to let somebody else test it. * * Revision 2.0  1995/05/10  22:38:15  sra * Attache release 3.0. * * Revision 1.3  1995/01/06  00:52:48  sra * Update copyright notice for 2.1 release. * * Revision 1.2  1993/08/14  05:04:29  sra * Don't invalidate handle->iter_variable in ini_scan_for_section(), * Shawn's SNMPv2 configuration code wants it to stay valid. * * Revision 1.1  1993/07/05  21:53:30  sra * Initial revision * *//* [clearcase]modification history-------------------01a,19apr05,job  update copyright notices*/#include <wrn/wm/common/config.h>#include <wrn/wm/common/glue.h>#if !INSTALL_SNARK_READ_INI_FROM_MEMORY#include <stdio.h>#include <ctype.h>#endif#include <stdlib.h>#include <wrn/wm/demo/snarklib.h>#include <wrn/wm/demo/read_ini.h>#if !INSTALL_SNARK_READ_INI_FROM_MEMORY#define DOWNCASE(c)	(isupper((int) c) ? tolower((int) c) : (int) c)#define LINE_SKIP() \  do { \    while (c != '\n') \      if ((c = fgetc(handle->file)) == EOF) \	return 0; \  } while (0)#define SKIP_WHITE() \  do { \    while ((c == ' ') || (c == '\t')) \      if ((c = fgetc(handle->file)) == EOF) \	return 0; \  } while (0)#define	CHECK_TOKEN() \  do { \    while (*cp && DOWNCASE(c) == DOWNCASE(*cp)) { \      if ((c = fgetc(handle->file)) == EOF) \	return 0; \      cp++; \    } \  } while (0)#endif /* INSTALL_SNARK_READ_INI_FROM_MEMORY *//* * If the enviroment variable is set then use it to find the .ini file. * If no environment variable or file not found look in the current directory. * If no local file then look for the global default file. */struct ini_handle *ini_open(size_t buflen){  struct ini_handle *handle = GLUE_ALLOC(sizeof(*handle) + buflen);    if (!handle) {    fprintf(stderr, "Can't allocate handle for ini file\n");    return 0;  }  MEMSET(handle, 0, sizeof(*handle));  if ((handle->buflen = buflen) != 0)    handle->buffer = (char *) (handle + 1);#if !INSTALL_SNARK_READ_INI_FROM_MEMORY  {    static char env_ini[] = "ETC_INI";    static char local_file[] = "etc.ini";    static char global_file[] = "/etc/etc.ini";    char *env = getenv(env_ini);    if ((!env || (handle->file = fopen(env, "r")) == 0) &&	(handle->file = fopen(local_file, "r")) == 0 &&	(handle->file = fopen(global_file, "r")) == 0) {      fprintf(stderr, "Can't find init file %s\n", (env ? env : local_file));      GLUE_FREE(handle);      return 0;    }  }#endif /* INSTALL_SNARK_READ_INI_FROM_MEMORY */  return handle;}void ini_close(struct ini_handle *handle){  if (!handle)    return;#if !INSTALL_SNARK_READ_INI_FROM_MEMORY  if (handle->file)    fclose(handle->file);#endif /* INSTALL_SNARK_READ_INI_FROM_MEMORY */  GLUE_FREE(handle);}#if INSTALL_SNARK_READ_INI_FROM_MEMORYstatic unsigned long ini_get_pos(struct ini_handle *handle){  return handle->current_pos;}static void ini_set_pos(struct ini_handle *handle, unsigned long new_pos){  handle->current_pos = new_pos;}#else /* INSTALL_SNARK_READ_INI_FROM_MEMORY */static unsigned long ini_get_pos(struct ini_handle *handle){  return (unsigned long) ftell(handle->file);}static void ini_set_pos(struct ini_handle *handle, unsigned long new_pos){  fseek(handle->file, (long) new_pos, 0);}#endif /* INSTALL_SNARK_READ_INI_FROM_MEMORY *//* * Scans for a section with the right name. */static boolean_t ini_scan_for_section  (struct ini_handle *handle, char *section){  if (!handle || !section)    return 0;				/* bad arguments, lose */  if (section == handle->section_name) {    ini_set_pos(handle, handle->section_start);    return 1;				/* section was cached, win */  }  if (handle->section_name)		/* has file been used? */    ini_set_pos(handle, 0);		/* yeah, rewind it */#if INSTALL_SNARK_READ_INI_FROM_MEMORY  {    for (;;) {       if (!etc_ini_table[handle->current_pos].tag)	return 0;			/* "EOF", lose */      if (!etc_ini_table[handle->current_pos].value &&	  !STRICMP(section, etc_ini_table[handle->current_pos].tag))	break;				/* matching section tag, won */      handle->current_pos++;		/* otherwise, keep looking */    }    handle->current_pos++;		/* won, skip to first variable */  }#else /* INSTALL_SNARK_READ_INI_FROM_MEMORY */  {    char *cp;    int c;    if (!handle->file)      return 0;				/* bad arguments, lose */    for (;;) {      if ((c = fgetc(handle->file)) == EOF)	return 0;      if (c != '[') {			/* not at a section name */	LINE_SKIP();			/* so skip the line and try again */	continue;      }      if ((c = getc(handle->file)) == EOF)	return 0;      cp = section;			/* check the section name */      CHECK_TOKEN();      if (*cp == '\0' && c == ']')	/* matched exactly? */	break;				/* win */      LINE_SKIP();    }    LINE_SKIP();			/* won, skip to first variable */  }#endif /* INSTALL_SNARK_READ_INI_FROM_MEMORY */  /*   * Found the desired section.  Cache it and return win.   */  handle->section_name = section;  handle->section_start = ini_get_pos(handle);  return 1;}/* * Scan the current section for the right variable. */static char *ini_scan_for_variable  (struct ini_handle *handle, char *variable){  if (!handle || !variable || !handle->buffer || handle->buflen <= 0)    return 0;#if INSTALL_SNARK_READ_INI_FROM_MEMORY  {    for (;;) {      if (!etc_ini_table[handle->current_pos].tag ||	  !etc_ini_table[handle->current_pos].value)	return 0;			/* end of section, lose */      if (!STRICMP(variable, etc_ini_table[handle->current_pos].tag))	break;				/* matching variable tag, won */      handle->current_pos++;		/* otherwise, keep looking */    }    if (STRLEN(etc_ini_table[handle->current_pos].value) >= handle->buflen)      return 0;				/* buffer too small, lose */    STRCPY(handle->buffer, etc_ini_table[handle->current_pos].value);    handle->current_pos++;		/* won, skip over line we just read */  }#else /* INSTALL_SNARK_READ_INI_FROM_MEMORY */  {    char *cp;    int c;    if (!handle->file)      return 0;    for (;;) {      if ((c = fgetc(handle->file)) == EOF || c == '[')	return 0;      cp = variable;			/* check the variable name */      CHECK_TOKEN();      if (*cp == '\0') {	SKIP_WHITE();	if (c == '=')			/* and found right delimiter? */	  break;			/* win */      }      LINE_SKIP();			/* didn't match, keep looking */    }    if ((c = fgetc(handle->file)) == EOF)      return 0;    SKIP_WHITE();    cp = handle->buffer;		/* now copy the data */    while (c != '\n') {      *cp++ = c;      if (cp >= handle->buffer + handle->buflen ||	  (c = fgetc(handle->file)) == EOF)	return 0;    }    *cp = '\0';  }#endif /* INSTALL_SNARK_READ_INI_FROM_MEMORY */  return handle->buffer;}char *ini_lookup(struct ini_handle *handle, char *section, char *variable){  if (!handle || !ini_scan_for_section(handle, section))    return 0;  return ini_scan_for_variable(handle, variable);}char *ini_iter_start(struct ini_handle *handle, char *section, char *variable){  if (!handle || !ini_scan_for_section(handle, section))    return 0;  return ini_scan_for_variable(handle, (handle->iter_variable = variable));}char *ini_iter_next(struct ini_handle *handle){  if (!handle)    return 0;  return ini_scan_for_variable(handle, handle->iter_variable);}void ini_save (struct ini_handle *handle, struct ini_handle_saved *save){  save->section_name = handle->section_name;  save->section_start = handle->section_start;  save->iter_variable = handle->iter_variable;  save->current_pos = ini_get_pos(handle);}void ini_restore (struct ini_handle *handle, struct ini_handle_saved *save){  handle->section_name = save->section_name;  handle->section_start = save->section_start;  handle->iter_variable = save->iter_variable;  ini_set_pos(handle, save->current_pos);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性大战久久久| 99久久er热在这里只有精品15| 亚洲人成网站影音先锋播放| 久久久三级国产网站| 欧美精品一区二区三区久久久| 欧美视频一二三区| 欧美久久久一区| 欧美疯狂性受xxxxx喷水图片| 欧洲av一区二区嗯嗯嗯啊| 91日韩在线专区| 在线免费观看日韩欧美| 91国模大尺度私拍在线视频| 色狠狠桃花综合| 欧美日产在线观看| 91精品国产综合久久精品图片| 欧美日韩三级一区| 欧美高清dvd| 欧美日韩亚洲不卡| 日韩一区二区三区精品视频| 欧美sm极限捆绑bd| 欧美经典一区二区| 亚洲黄色性网站| 亚洲r级在线视频| 精品一区二区三区影院在线午夜| 国产精品自拍一区| 色婷婷av一区| 制服丝袜一区二区三区| 久久久国产精品麻豆| 中文字幕在线不卡一区二区三区 | 色拍拍在线精品视频8848| 一本一本久久a久久精品综合麻豆| 欧美伊人久久大香线蕉综合69| 正在播放亚洲一区| 久久精品这里都是精品| 亚洲精品欧美在线| 老司机午夜精品99久久| 本田岬高潮一区二区三区| 欧美日本一道本| 久久久不卡网国产精品一区| 亚洲精品免费在线观看| 麻豆高清免费国产一区| 日韩欧美一级在线播放| 91久久精品日日躁夜夜躁欧美| 欧美三级韩国三级日本三斤| 日韩精品最新网址| 亚洲精品亚洲人成人网在线播放| 奇米色777欧美一区二区| 成人免费高清视频在线观看| 欧美伦理视频网站| 亚洲国产精品成人久久综合一区| 日韩影视精彩在线| 99国内精品久久| 久久久久久**毛片大全| 丝瓜av网站精品一区二区| 成人黄色免费短视频| 精品99一区二区| 偷拍自拍另类欧美| 91成人在线免费观看| 国产亚洲欧美在线| 免费一区二区视频| 91福利在线播放| 日本一区二区三区高清不卡| 美女脱光内衣内裤视频久久网站 | 在线免费观看成人短视频| wwww国产精品欧美| 蜜臀av一区二区在线免费观看| 在线精品亚洲一区二区不卡| 成人免费在线播放视频| 国产福利一区二区| 精品剧情v国产在线观看在线| 亚洲国产综合在线| 在线观看精品一区| 亚洲男人天堂av网| 99视频精品在线| 国产精品久久久久久久久果冻传媒| 国产美女久久久久| 亚洲精品一区二区三区在线观看 | 蜜臀av国产精品久久久久| 欧美日韩高清影院| 亚州成人在线电影| 欧美精品在欧美一区二区少妇| 洋洋成人永久网站入口| 欧美视频中文字幕| 婷婷一区二区三区| 欧美一区二区播放| 久久99日本精品| 久久久久久夜精品精品免费| 激情文学综合插| 欧美国产一区二区| 成人黄色在线视频| 一区二区三区中文字幕精品精品 | 亚洲v日本v欧美v久久精品| 欧美性受xxxx| 秋霞国产午夜精品免费视频| 欧美大白屁股肥臀xxxxxx| 国产在线精品一区二区三区不卡| 久久一区二区三区国产精品| 丁香另类激情小说| 亚洲精品国产精华液| 欧美区一区二区三区| 蜜桃一区二区三区在线| 国产欧美一区视频| 在线一区二区三区四区五区 | 欧美蜜桃一区二区三区| 日韩av在线播放中文字幕| 精品国产伦理网| 97se亚洲国产综合自在线| 亚洲bt欧美bt精品| 欧美xxxxx牲另类人与| 成人免费看片app下载| 亚洲午夜激情av| 26uuu亚洲| 欧美综合天天夜夜久久| 久久www免费人成看片高清| 亚洲欧洲成人精品av97| 欧美一级在线视频| 97精品超碰一区二区三区| 三级成人在线视频| 中文字幕在线观看一区二区| 日韩一区二区三区精品视频| 不卡av电影在线播放| 蜜桃久久久久久久| 伊人婷婷欧美激情| 久久久www成人免费毛片麻豆 | 国产在线不卡一卡二卡三卡四卡| 国产精品久久777777| 日韩精品影音先锋| 在线观看亚洲精品视频| 国产成人av一区二区三区在线| 午夜精品一区二区三区免费视频| 中文字幕免费一区| 日韩精品在线一区| 欧美视频三区在线播放| 成人中文字幕电影| 首页欧美精品中文字幕| 亚洲少妇最新在线视频| 亚洲国产高清不卡| 精品对白一区国产伦| 91精品国产高清一区二区三区 | 91精品国产综合久久久久久久| 99视频热这里只有精品免费| 国产精品一区在线| 久国产精品韩国三级视频| 午夜精品福利视频网站| 亚洲精品视频在线观看免费| 亚洲国产精品成人综合 | 99这里只有久久精品视频| 精品影视av免费| 美女一区二区三区| 蜜桃av一区二区三区电影| 日日嗨av一区二区三区四区| 亚洲成人av在线电影| 一区二区三区自拍| 亚洲国产精品自拍| 亚洲一区二区三区视频在线播放 | 中日韩免费视频中文字幕| 2023国产精品自拍| 久久一日本道色综合| 久久综合色之久久综合| 26uuu国产一区二区三区| 日韩精品一区二区三区四区视频| 欧美日韩国产不卡| 欧美精品成人一区二区三区四区| 欧美日韩一区二区电影| 在线播放91灌醉迷j高跟美女| 精品视频一区 二区 三区| 欧美日韩国产精品自在自线| 91麻豆精品久久久久蜜臀| 88在线观看91蜜桃国自产| 欧美一区二区大片| 久久久久久亚洲综合| 国产精品福利影院| 一区二区三区免费网站| 日日骚欧美日韩| 韩国av一区二区三区四区 | 久久久久国产精品免费免费搜索| 国产亚洲综合在线| 最新热久久免费视频| 亚洲激情av在线| 蜜桃91丨九色丨蝌蚪91桃色| 国产一区二区视频在线播放| 成人性生交大片免费看中文| 91在线观看成人| 91精品国产手机| 中文字幕精品一区| 亚洲成a人片在线不卡一二三区| 美日韩一级片在线观看| 成人18精品视频| 欧美日韩黄视频| 国产校园另类小说区| 亚洲美女在线一区| 美国十次综合导航| av在线不卡免费看| 69堂精品视频| 中文字幕高清一区| 日韩二区三区四区| 成人免费视频一区| 日韩视频一区二区| 亚洲男同性视频| 国产高清不卡一区|