예제 #1
0
파일: init.c 프로젝트: monarchdodra/dmd
char *Initializer::toChars()
{
    HdrGenState hgs;

    OutBuffer buf;
    toCBuffer(&buf, &hgs);
    return buf.extractString();
}
예제 #2
0
파일: init.c 프로젝트: dansanduleac/ldc
char *Initializer::toChars()
{   OutBuffer *buf;
    HdrGenState hgs;

    memset(&hgs, 0, sizeof(hgs));
    buf = new OutBuffer();
    toCBuffer(buf, &hgs);
    return buf->toChars();
}
예제 #3
0
파일: init.c 프로젝트: develop32/dmd
char *Initializer::toChars()
{
    HdrGenState hgs;

    OutBuffer buf;
    toCBuffer(&buf, &hgs);
    buf.writebyte(0);
    return buf.extractData();
}
예제 #4
0
void Module::genhdrfile()
{
    OutBuffer hdrbufr;
    hdrbufr.doindent = 1;

    hdrbufr.printf("// D import file generated from '%s'", srcfile->toChars());
    hdrbufr.writenl();

    HdrGenState hgs;
    memset(&hgs, 0, sizeof(hgs));
    hgs.hdrgen = 1;

    toCBuffer(&hdrbufr, &hgs);

    // Transfer image to file
    hdrfile->setbuffer(hdrbufr.data, hdrbufr.offset);
    hdrbufr.data = NULL;

    ensurePathToNameExists(Loc(), hdrfile->toChars());
    writeFile(loc, hdrfile);
}
예제 #5
0
파일: hdrgen.c 프로젝트: NilsBossung/ldc
void Module::genhdrfile()
{
    OutBuffer hdrbufr;

    hdrbufr.printf("// D import file generated from '%s'", srcfile->toChars());
    hdrbufr.writenl();

    HdrGenState hgs;
    memset(&hgs, 0, sizeof(hgs));
    hgs.hdrgen = 1;

    toCBuffer(&hdrbufr, &hgs);

    // Transfer image to file
    hdrfile->setbuffer(hdrbufr.data, hdrbufr.offset);
    hdrbufr.data = NULL;

    char *pt = FileName::path(hdrfile->toChars());
    if (*pt)
        FileName::ensurePathExists(pt);
    mem.free(pt);
    hdrfile->writev();
}
예제 #6
0
void Dsymbol::toHBuffer(OutBuffer *buf, HdrGenState *hgs)
{
    toCBuffer(buf, hgs);
}