From b0ed293eac8ad1fb78a9ce5d578c9c7823cc1011 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 4 Aug 2018 07:13:57 -0400 Subject: library: removed ptyc_create_driver_ctx() [too much of a good thing]. --- src/driver/ptyc_driver_ctx.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src') diff --git a/src/driver/ptyc_driver_ctx.c b/src/driver/ptyc_driver_ctx.c index 2867000..dd66b76 100644 --- a/src/driver/ptyc_driver_ctx.c +++ b/src/driver/ptyc_driver_ctx.c @@ -349,35 +349,6 @@ int ptyc_get_driver_ctx( return PTYC_OK; } -int ptyc_create_driver_ctx( - const struct ptyc_common_ctx * cctx, - struct ptyc_driver_ctx ** pctx) -{ - const struct argv_option * optv[PTYC_OPTV_ELEMENTS]; - struct argv_meta * meta; - struct ptyc_driver_ctx_impl * ctx; - char * argv[] = {"ptycon_driver",0}; - - if (ptyc_init()) - return -1; - - if (ptyc_vtbl_init()) - return -1; - - argv_optv_init(ptyc_default_options,optv); - - if (!(meta = argv_get(argv,optv,0,STDERR_FILENO))) - return -1; - - if (!(ctx = ptyc_driver_ctx_alloc(meta,cctx,0))) - return ptyc_get_driver_ctx_fail(0); - - ctx->ctx.cctx = &ctx->cctx; - memcpy(&ctx->cctx,cctx,sizeof(*cctx)); - *pctx = &ctx->ctx; - return PTYC_OK; -} - static void ptyc_free_driver_ctx_impl(struct ptyc_driver_ctx_alloc * ictx) { ptyc_free_pty(&ictx->ctx.ctx); -- cgit v1.2.3