blob: c46e1466786299f063f7cc7f2f31f4b383f93dea (
plain)
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
|
#ifndef PTYCON_DRIVER_IMPL_H
#define PTYCON_DRIVER_IMPL_H
#include <ntapi/ntapi.h>
#include <ntcon/ntcon.h>
#include <gdi/gdi.h>
#include <stdint.h>
#include <stdio.h>
#include <ptycon/ptycon.h>
#include "argv/argv.h"
extern const struct argv_option ptyc_default_options[];
extern const ntapi_vtbl * ptyc_ntapi;
extern const ntcon_vtbl * const ptyc_ntcon;
extern const gdi_vtbl * const ptyc_gdi;
#define ntapi ptyc_ntapi
#define ntcon ptyc_ntcon
#define gdi ptyc_gdi
enum app_tags {
TAG_HELP,
TAG_VERSION,
TAG_DEBUG,
};
struct ptyc_driver_ctx_impl {
struct ptyc_common_ctx cctx;
struct ptyc_driver_ctx ctx;
};
static inline struct ptyc_driver_ctx_impl * ptyc_get_driver_ictx(struct ptyc_driver_ctx * dctx)
{
uintptr_t addr;
if (dctx) {
addr = (uintptr_t)dctx - offsetof(struct ptyc_driver_ctx_impl,ctx);
return (struct ptyc_driver_ctx_impl *)addr;
}
return 0;
}
#endif
|