Lines Matching defs:ctx
92 idn__filemapper_t ctx;
104 if ((ctx = malloc(sizeof(struct idn__filemapper))) == NULL)
107 if ((r = idn_ucsmap_create(&ctx->map)) != idn_success) {
108 free(ctx);
112 r = read_file(file, fp, ctx->map);
116 idn_ucsmap_fix(ctx->map);
117 *ctxp = ctx;
119 idn_ucsmap_destroy(ctx->map);
120 free(ctx);
126 idn__filemapper_destroy(idn__filemapper_t ctx) {
128 assert(ctx != NULL);
132 idn_ucsmap_destroy(ctx->map);
133 free(ctx);
137 idn__filemapper_map(idn__filemapper_t ctx, const unsigned long *from,
143 assert(ctx != NULL && from != NULL && to != NULL);
153 r = idn_ucsmap_map(ctx->map, *from, ub.ucs, ub.size, &ub.len);
344 idn__filemapper_mapproc(void *ctx, const unsigned long *from,
346 return idn__filemapper_map((idn__filemapper_t)ctx, from, to, tolen);