unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 75d65cbe90208f3de3becb6eebea987c2bdc0349 1073 bytes (raw)
name: notmuch-opts.h 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
#ifndef NOTMUCH_OPTS_H
#define NOTMUCH_OPTS_H

#include "notmuch.h"

enum notmuch_opt_type {
    NOTMUCH_OPT_NULL = 0,
    NOTMUCH_OPT_BOOLEAN,
    NOTMUCH_OPT_KEYWORD,
    NOTMUCH_OPT_POSITION
};

typedef enum notmuch_opt_result {
    NOTMUCH_OPT_ERROR = -2,
    NOTMUCH_OPT_GOT_POS = -1,
    NOTMUCH_OPT_STOP = 0,
    NOTMUCH_OPT_SUCCESS = 1
} notmuch_opt_result_t;

typedef struct notmuch_keyword {
    const char *name;
    int value;
} notmuch_keyword_t;

typedef struct notmuch_opt_desc {
    const char *name;
    int  arg_id;
    enum notmuch_opt_type opt_type;
    struct notmuch_keyword *keywords;
    void *output_var;
} notmuch_opt_desc_t;

typedef struct notmuch_opt {
    int arg_id;
    int keyword_id;
    const char *string;
} notmuch_opt_t;

notmuch_bool_t
parse_option (const char *arg, const notmuch_opt_desc_t* options);

notmuch_bool_t
parse_position_arg (const char *arg,
		    int position_arg_index,
		    const notmuch_opt_desc_t* options);

int
notmuch_parse_args(int argc, char **argv, const notmuch_opt_desc_t *options, int opt_index);

#endif

debug log:

solving 75d65cb ...
found 75d65cb in https://yhetil.org/notmuch/1322808114-11854-1-git-send-email-david@tethera.net/

applying [1/1] https://yhetil.org/notmuch/1322808114-11854-1-git-send-email-david@tethera.net/
diff --git a/notmuch-opts.h b/notmuch-opts.h
new file mode 100644
index 0000000..75d65cb

Checking patch notmuch-opts.h...
Applied patch notmuch-opts.h cleanly.

index at:
100644 75d65cbe90208f3de3becb6eebea987c2bdc0349	notmuch-opts.h

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).