<commit_before>#include <uwsgi.h>
#include <curl/curl.h>
#include <jansson.h>

extern struct uwsgi_server uwsgi;

#define PUSHBULLET_PUSH_URL "https://api.pushbullet.com/v2/pushes"

struct pushbullet_config {
    // Pushbullet API token
    char *token;

    // Pushbullet targets
    // Only one can be specified
    char *device_iden;
    char *email;
    char *channel_tag;
    char *client_iden;

    // Optional parameters
    char *source_device_iden;

    // Push details
    char *title;
    char *body;
    char *url;

    // Autogenerated parameters
    const char *type;

    // Other configuration options
    char *ssl_no_verify;
    char *timeout;
};

#define pkv(x) #x, &pbc->x
static int pushbullet_config_do(char *arg, struct pushbullet_config *pbc) {
    const static char* type_note = "note";
    const static char* type_link = "url";

    const static char* default_title = "uWSGI Alert!";

    memset(pbc, 0, sizeof(struct pushbullet_config));

    if (uwsgi_kvlist_parse(arg, strlen(arg), ',', '=',
                pkv(token),
                pkv(device_iden),
                pkv(email),
                pkv(channel_tag),
                pkv(client_iden),<commit_msg>fixed static usage<commit_after>#include <uwsgi.h>
#include <curl/curl.h>
#include <jansson.h>

extern struct uwsgi_server uwsgi;

#define PUSHBULLET_PUSH_URL "https://api.pushbullet.com/v2/pushes"

struct pushbullet_config {
    // Pushbullet API token
    char *token;

    // Pushbullet targets
    // Only one can be specified
    char *device_iden;
    char *email;
    char *channel_tag;
    char *client_iden;

    // Optional parameters
    char *source_device_iden;

    // Push details
    char *title;
    char *body;
    char *url;

    // Autogenerated parameters
    const char *type;

    // Other configuration options
    char *ssl_no_verify;
    char *timeout;
};

#define pkv(x) #x, &pbc->x
static int pushbullet_config_do(char *arg, struct pushbullet_config *pbc) {
    const char* type_note = "note";
    const char* type_link = "url";

    const char* default_title = "uWSGI Alert!";

    memset(pbc, 0, sizeof(struct pushbullet_config));

    if (uwsgi_kvlist_parse(arg, strlen(arg), ',', '=',
                pkv(token),
                pkv(device_iden),
                pkv(email),
                pkv(channel_tag),
                pkv(client_iden),
{'fraction_non_alphanumeric': 0.11336717428087986, 'fraction_numerical': 0.001692047377326565, 'mean_word_length': 2.6384615384615384, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '6045193', 'n_tokens_mistral': 820, 'n_tokens_neox': 775, 'n_words': 194}