Example #1
0
static sfd_entry *new_sfd_entry (void)
{
    sfd_entry *sfd;
    sfd = xtalloc (1, sfd_entry);
    sfd->name = NULL;
    sfd->subfont = NULL;
    return sfd;
}
Example #2
0
void pdf_init_map_file(string map_name)
{
    assert(mitem == NULL);
    mitem = xtalloc(1, mapitem);
    mitem->mode = FM_DUPIGNORE;
    mitem->type = MAPFILE;
    mitem->line = xstrdup(map_name);
}
Example #3
0
static ff_entry *new_ff_entry (void)
{
    ff_entry *ff;
    ff = xtalloc (1, ff_entry);
    ff->ff_name = NULL;
    ff->ff_path = NULL;
    return ff;
}
Example #4
0
static cw_entry *new_cw_entry(void)
{
    cw_entry *cw;
    cw = xtalloc(1, cw_entry);
    cw->cw_objnum = 0;
    cw->width = NULL;
    return cw;
}
Example #5
0
static ttf_cmap_entry *new_ttf_cmap_entry(void)
{
    ttf_cmap_entry *e;
    e = xtalloc(1, ttf_cmap_entry);
    e->ttf_name = NULL;
    e->table = NULL;
    return e;
}
Example #6
0
static glyph_unicode_entry *new_glyph_unicode_entry(void)
{
    glyph_unicode_entry *e;
    e = xtalloc(1, glyph_unicode_entry);
    e->name = NULL;
    e->code = UNI_UNDEF;
    e->unicode_seq = NULL;
    return e;
}
Example #7
0
fe_entry *new_fe_entry()
{
    fe_entry *fe;
    fe = xtalloc(1, fe_entry);
    fe->name = NULL;
    fe->fe_objnum = 0;
    fe->glyph_names = NULL;     /* encoding file not yet read in */
    fe->tx_tree = NULL;
    return fe;
}
Example #8
0
static subfont_entry *new_subfont_entry (void)
{
    int i;
    subfont_entry *subfont;
    subfont = xtalloc (1, subfont_entry);
    subfont->infix = NULL;
    for (i = 0; i < 256; ++i)
        subfont->charcodes[i] = -1;     /* unassigned */
    subfont->next = NULL;
    return subfont;
}
Example #9
0
image *new_image(void)
{
    image *p = xtalloc(1, image);
    set_wd_running(p);
    set_ht_running(p);
    set_dp_running(p);
    img_transform(p) = 0;
    img_dict(p) = NULL;
    img_dictref(p) = LUA_NOREF;
    return p;
}
Example #10
0
static fo_entry *new_fo_entry(void)
{
    fo_entry *fo;
    fo = xtalloc(1, fo_entry);
    fo->fo_objnum = 0;
    fo->tex_font = 0;
    fo->fm = NULL;
    fo->fd = NULL;
    fo->fe = NULL;
    fo->cw = NULL;
    fo->first_char = 1;
    fo->last_char = 0;
    fo->tounicode_objnum = 0;
    return fo;
}
Example #11
0
static void checkpdfsave(scaledpos pos)
{
pos_entry*new_stack;
if(pos_stack_used>=pos_stack_size){
pos_stack_size+= STACK_INCREMENT;
new_stack= xtalloc((unsigned)pos_stack_size,pos_entry);
memcpy((void*)new_stack,(void*)pos_stack,(unsigned)pos_stack_used*sizeof(pos_entry));
xfree(pos_stack);
pos_stack= new_stack;
}
pos_stack[pos_stack_used].pos.h= pos.h;
pos_stack[pos_stack_used].pos.v= pos.v;
if(global_shipping_mode==SHIPPING_PAGE){
pos_stack[pos_stack_used].matrix_stack= matrix_stack_used;
}
pos_stack_used++;
}
Example #12
0
fm_entry *new_fm_entry(void)
{
    fm_entry *fm;
    fm = xtalloc(1, fm_entry);
    fm->tfm_name = NULL;
    fm->sfd_name = NULL;
    fm->ps_name = NULL;
    fm->fd_flags = 4;
    fm->ff_name = NULL;
    fm->encname = NULL;
    fm->type = 0;
    fm->slant = 0;
    fm->extend = 0;
    fm->links = 0;
    fm->pid = -1;
    fm->eid = -1;
    fm->subfont = NULL;
    fm->in_use = false;
    return fm;
}
Example #13
0
image_dict *new_image_dict(void)
{
    image_dict *p = xtalloc(1, image_dict);
    memset(p, 0, sizeof(image_dict));
    set_wd_running(p);
    set_ht_running(p);
    set_dp_running(p);
    img_transform(p) = 0;
    img_pagenum(p) = 1;
    img_type(p) = IMG_TYPE_NONE;
    img_pagebox(p) = PDF_BOX_SPEC_MEDIA;
    img_unset_bbox(p);
    img_unset_group(p);
    img_state(p) = DICT_NEW;
    /*tex A value of -1 means unused while the used counts from 0 */
    img_index(p) = -1;
    img_luaref(p) = 0;
    img_errorlevel(p) = pdf_inclusion_errorlevel;
    fix_pdf_version(static_pdf);
    img_pdfmajorversion(p) = pdf_major_version;
    img_pdfminorversion(p) = pdf_minor_version;
    return p;
}
Example #14
0
fd_entry *new_fd_entry(void)
{
    fd_entry *fd;
    int i;
    fd = xtalloc(1, fd_entry);
    fd->fd_objnum = 0;
    fd->fontname = NULL;
    fd->subset_tag = NULL;
    fd->ff_found = false;
    fd->ff_objnum = 0;
    fd->fn_objnum = 0;
    fd->all_glyphs = false;
    fd->write_ttf_glyph_names = false;
    for (i = 0; i < FONT_KEYS_NUM; i++) {
        fd->font_dim[i].val = 0;
        fd->font_dim[i].set = false;
    }
    fd->fe = NULL;
    fd->builtin_glyph_names = NULL;
    fd->fm = NULL;
    fd->tx_tree = NULL;
    fd->gl_tree = NULL;
    return fd;
}
Example #15
0
void new_img_pdfstream_struct(image_dict * p)
{
    img_pdfstream_ptr(p) = xtalloc(1, pdf_stream_struct);
    img_pdfstream_stream(p) = NULL;
    img_pdfstream_size(p) = 0;
}