473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

is there config file analysis code can be read?

hello everyone:

I wanna write a fucntion to analyze the configuration file httpd.conf of
Apache.

I just constructed a global list data type, in it I can have node like this:

/************************************************** *************

typedef struct KEY_VALUE{
char *key;
char *value;
}KVPair;

typedef enum {ATOM, LIST} ElemTag;

typedef struct GLNode{
ElemTag tag; // tag "base node"(ATOM) or "sublist"(LIST)
KVPair atom; // element value
struct GLNode *head; // point to first node of the sublist; NULL if empty
struct GLNode *prev; // point to prev node of the list; NULL if head
struct GLNode *next; // point to next node of the list; NULL if tail
} GLNode, *GLLink;

typedef struct GList{
GLLink hp;
GLLink tp;
} *GList;

************************************************** *************/

if the option is in first level let "tag = ATOM "

spliting the config option into 2 parts...

else let "tag = LIST"; GLNode.head point to the first sub node..
And I can use the sublist to deal with the following config info...

<Directroy /docs>
options ..... // lever 2 , first node
...... .....
</Directory>
but when I met the sublist with another sublist (see the following config info)
I got no idea...

<IfModule ...>
option_key option_value
<Directroy /docs>
options .....
...... .....
</Directory>
</IfMoudle>
try to give me some advise on how to initilize the GList...
Thank you in advance

Wade
Nov 14 '05 #1
0 876

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Ryan | last post by:
I've created a custom configuration section that inherits (naturally) from System.Configuration.ConfigurationSection. The configuration section is working 99% fine, however I keep coming across a...
1
by: Matt F | last post by:
Two of the projects in my solution that both need to use a common user.config file. This is a data application - the executable that is created with the first project is the primary executable...
3
by: Brad | last post by:
Probably a very basic questions here: When using code to look at a web.config item, how can I tell if the value is/is not inherited? I have some common code that needs to iterate through settings...
3
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I am trying to implement a configuration section in web.config and was wondering if I could do it without writing a handeler. I tried in the <configSections>. <sectionGroup name="Domains" >...
4
by: =?Utf-8?B?anVhbkBtc2RuQ29tcGFueS5jb20=?= | last post by:
I have a mixed mode application that uses several dlls, which most are native and my new one is mixed. My new dll uses several dependent .NET assemblies. I wanted to place these dependent .NET...
6
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I...
3
by: SevDer | last post by:
Hi All, I am recently experiencing a weird problem. I don't know what exactly is the cause of the problem but here is my scenario and symptoms. First of all here is my architecture 1. I have...
3
by: =?Utf-8?B?RHVrZSAoQU4yNDcp?= | last post by:
I've added a web deployment project and want to use the config section replacement but I'm obviously not understanding something. I have set up an alternate appSettings file,...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I cut and paste the following code from msdn help page which it just introduces view and multiview server controls. Here is what I do: in vs studio 2005, File --New Web Site, it...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a app that uses several membership/role providers. I can list these Providers with the code: Dim rootWebConfig1 As Configuration rootWebConfig1 =...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.