/*
pev - the PE file analyzer toolkit
output.c - functions to output results in different formats
Copyright (C) 2012 Fernando Mercês
Copyright (C) 2012 Gabriel Duarte
Copyright (C) 2012 Jan Seidl
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 3 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, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
// Da structs
struct Sector
{
char title[255];
struct Line *firstline;
struct Sector *parent;
struct Sector *child;
struct Sector *next;
struct Sector *prev;
}
struct Line
{
char key[255];
char value[255];
struct Line *next;
struct Line *prev;
}
int main(int argc, char* argv[])
{
// Cria sector 1 e subsector 1.1
struct Sector sector1;
struct Sector sector1_1;
// Cria sector 2
struct Sector sector2;
// Cria as lines
struct Line line1_a;// sect 1
struct Line line1_b;// sect 1
struct Line line1_1_a; // sect 1.1
struct Line line1_1_b; // sect 1.1
struct Line line2; // sect 2
// Attach all sector relationships
sector1->child = §or1_1;
sector1->next = §or2;
sector1->firstline = &line1_a;
sector2->prev = §or1;
// sector 1
line1_a->key "Line 1a key";
line1_a->value "Line 1a value";
line1_a->next = &line1_b;
line1_b->key = "Line 1b key";
line1_b->value = "Line 1b value";
line1_b->prev = &line1_a;
// sector 2
line2->key = "Linha 1 da sect 2";
line2->value = "Valor da linha 1 da sect 2";
sector2->firstline = &line2;
}