⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 read_ini.sed

📁 wm PNE 3.3 source code, running at more than vxworks6.x version.
💻 SED
字号:
# $Header: /usr/cvsroot/target/src/wrn/wm/demo/lib/read_ini.sed,v 1.1.1.1 2001/11/05 17:48:42 tneale Exp $#################################################################################  *** Restricted Rights Legend ***##  The programs and information contained herein are licensed only#  pursuant to a license agreement that contains use, reverse#  engineering, disclosure, and other restrictions; accordingly, it#  is "Unpublished--all rights reserved under the applicable#  copyright laws".##  Use duplication, or disclosure by the Government is subject to#  restrictions as set forth in subparagraph (c)(1)(ii) of the Rights#  in Technical Data and Computer Licensed Programs clause of DFARS#  52.227 7013.##  Copyright 2000-2001 Wind River Systems, Inc.#  Copyright 1998 Integrated Systems, Inc.#  All rights reserved.##  *** Government Use ***##  The Licensed Programs and their documentation were developed at#  private expense and no part of them is in the public domain.##  The Licensed Programs are "Restricted Computer Software" as that#  term is defined in Clause 52.227-19 of the Federal Acquisition#  Regulations (FAR) and are "Commercial Computer Software" as that#  term is defined in Subpart 227.401 of the Department of Defense#  Federal Acquisition Regulation Supplement (DFARS).##  (i) If the licensed Programs are supplied to the Department of#      Defense (DoD), the Licensed Programs are classified as#      "Commercial Computer Software" and the Government is acquiring#      only "restricted rights" in the Licensed Programs and their#      documentation as that term is defined in Clause 52.227#      7013(c)(1) of the DFARS, and##  (ii) If the Licensed Programs are supplied to any unit or agency#      of the United States Government other than DoD, the#      Government's rights in the Licensed Programs and their#      documentation will be as defined in Clause 52.227-19(c)(2) of#      the FAR.################################################################################# sed script to convert from one of the two formats that snark/lib/read_ini.c# knows how to read to the other format.## Ordinarily, the demo configuration routines in read_ini load configuration# data from a file called etc.ini.  However, this does not make a very good# demo on embedded systems where there is no filesystem, so these routines# can also be configured to load configuration information from a static array.# This is still not particularly efficient (if you want efficency, use the# real configuration APIs for the various Epilogue products), but it is fairly# to use and thus makes a reasonable demo.## Rather than having to maintain two sets of configuration files, you can write# configuration files in the normal etc.ini format and use this script to# convert them to the static array format that the snark demo package uses when# you've installed the SNARK_READ_INI_FROM_MEMORY configuration option.## This script is intended to be used only on well-formed etc.ini files.# It does not attempt to detect every possible format violation, and it# transcribes etc.ini comments to C comments without checking them for# possible nested C comments.  We do try to do appropriate quoting for# doublequote and backslash as supported by snark/lib/parse.c.## This script works on all the versions of sed where we've tried it.# Rumor has it that some versions of sed are so abysmally stupid that# they will only tolerate a single comment on the first line of a script.# If you get weird errors trying to use this script, try deleting all the# comments to see if that helps....# Header boilerplate#1i\/*\\ * Automatically generated file.  You may choose to modify this file\\ * by hand, but beware of accidently overwriting it.\\ */\\#include <common/h/config.h>\#include <common/h/glue.h>\#include <snark/h/read_ini.h>\\struct ini_table etc_ini_table[] = {# Trailer boilerplate#$a\\ \ { 0, 0 }\};# Delete comments and blank lines#/^[ 	]*$/D/^[ 	]*;/D# Handle section headers#/^[ 	]*\[/ {  s|^[ 	]*\[|  { "|  s|\][ 	]*$|", 0 },|  b}# Handle variable assignments/=/ {  s|\\|\\\\|g  s|"|\\"|g  s|^[ 	]*|  { "|  s|[ 	]*=[ 	]*|", "|  s|[ 	]*$|" },|  b}# Delete anything else#D

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -