<commit_before>/*
 * Memphis - Cairo Rederer for OSM in C
 * Copyright (C) 2008  <<EMAIL>>
 *
 * 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 2 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, write to the Free Software Foundation,
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef RULESET_H
#define RULESET_H

#define WAY         1
#define NODE        2
#define RELATION    4

#define LINE        1
#define POLYGONE    2
#define TEXT        3

/*
 * LinkedList Struct for Draws
 */
typedef struct _cfgDraw cfgDraw;
struct _cfgDraw {
        short int   type;
        short int   minlayer;
        short int   maxlayer;
        short int   color[3];
        char*       pattern;
        float       width;
        cfgDraw     *next;
    };

/*
 * LinkedList Struct for Rule/Else
 */
typedef struct _cfgRule cfgRule;
typedef struct _cfgElse cfgElse;

struct _cfgElse {
        cfgRule     *sub;
        cfgRule     *next;
        cfgDraw     *draw;
#ifdef DEBUG
        int         d;
#endif
    };
struct _cfgRule {
        short int   type;
        char        **key;
        char        **value;
        cfgRule     *parent;<commit_msg>readability improvement. thanks to andy<commit_after>/*
 * Memphis - Cairo Rederer for OSM in C
 * Copyright (C) 2008  <<EMAIL>>
 *
 * 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 2 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, write to the Free Software Foundation,
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef RULESET_H
#define RULESET_H

typedef enum osmTypes {
    WAY         = 1,
    NODE        = 2,
    RELATION    = 4,
} osmTypes;

typedef enum mapPrimitives {
    LINE        = 1,
    POLYGONE    = 2,
    TEXT        = 3,
} mapPrimitives;

/*
 * LinkedList Struct for Draws
 */
typedef struct _cfgDraw cfgDraw;
struct _cfgDraw {
        mapPrimitives type;
        short int   minlayer;
        short int   maxlayer;
        short int   color[3];
        char*       pattern;
        float       width;
        cfgDraw     *next;
    };

/*
 * LinkedList Struct for Rule/Else
 */
typedef struct _cfgRule cfgRule;
typedef struct _cfgElse cfgElse;

struct _cfgElse {
        cfgRule     *sub;
        cfgRule     *next;
        cfgDraw     *draw;
#ifdef DEBUG
        int         d;
#endif
    };
struct _cfgRule {
        short int   type;
        char        **key;
        char        **value;
        cfgRule     *parent;
{'fraction_non_alphanumeric': 0.06734104046242774, 'fraction_numerical': 0.015028901734104046, 'mean_word_length': 2.2497652582159624, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5843610', 'n_tokens_mistral': 1041, 'n_tokens_neox': 964, 'n_words': 426}