<commit_before>#include <ctime>
#include <iostream>
#include <cassert>

// Interface of this cpp file is used by C code, we need to declare 
// extern "C" to prevent linking errors.
extern "C" {
#include "keystate/keystate_ds_submit_cmd.h"
#include "keystate/keystate_ds_submit_task.h"
#include "shared/duration.h"
#include "shared/file.h"
#include "shared/str.h"
#include "daemon/engine.h"
}

static const char *module_str = "keystate_ds_submit_cmd";

void
help_keystate_ds_submit_cmd(int sockfd)
{
    char buf[ODS_SE_MAXLINE];
    (void) snprintf(buf, ODS_SE_MAXLINE,
        "key ds-submit   show ds-submit flag for all keys.\n"
        "  --zone <zone> (aka -z) force submit of KSK key for zone <zone>.\n"
        "  --id <id>     (aka -k) force submit of KSK key with id <id>.\n"
        "  --auto        (aka -a) perform submit for all keys that have "
                        "the ds-submit flag set.\n"
        );
    ods_writen(sockfd, buf, strlen(buf));
}

int
handled_keystate_ds_submit_cmd(int sockfd, engine_type* engine,
                               const char *cmd, ssize_t n)
{
    char buf[ODS_SE_MAXLINE];
    const char *argv[8];
    const int NARGV = sizeof(argv)/sizeof(char*);
    int argc;
    task_type *task;
    ods_status status;
    const char *scmd = "key ds-submit";

    cmd = ods_check_command(cmd,n,scmd);<commit_msg>Fix help in 'key ds-submit'<commit_after>#include <ctime>
#include <iostream>
#include <cassert>

// Interface of this cpp file is used by C code, we need to declare 
// extern "C" to prevent linking errors.
extern "C" {
#include "keystate/keystate_ds_submit_cmd.h"
#include "keystate/keystate_ds_submit_task.h"
#include "shared/duration.h"
#include "shared/file.h"
#include "shared/str.h"
#include "daemon/engine.h"
}

static const char *module_str = "keystate_ds_submit_cmd";

void
help_keystate_ds_submit_cmd(int sockfd)
{
    char buf[ODS_SE_MAXLINE];
    (void) snprintf(buf, ODS_SE_MAXLINE,
        "key ds-submit   show submit flag for all keys.\n"
        "  --zone <zone> (aka -z) force submit of KSK key for zone <zone>.\n"
        "  --id <id>     (aka -k) force submit of KSK key with id <id>.\n"
        "  --auto        (aka -a) perform submit for all keys that have "
                        "the ds-submit flag set.\n"
        );
    ods_writen(sockfd, buf, strlen(buf));
}

int
handled_keystate_ds_submit_cmd(int sockfd, engine_type* engine,
                               const char *cmd, ssize_t n)
{
    char buf[ODS_SE_MAXLINE];
    const char *argv[8];
    const int NARGV = sizeof(argv)/sizeof(char*);
    int argc;
    task_type *task;
    ods_status status;
    const char *scmd = "key ds-submit";

    cmd = ods_check_command(cmd,n,scmd);
{'fraction_non_alphanumeric': 0.12072138387927861, 'fraction_numerical': 0.000736105999263894, 'mean_word_length': 2.8662873399715507, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3828192', 'n_tokens_mistral': 991, 'n_tokens_neox': 962, 'n_words': 271}