DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T f

⟦71104e3d1⟧ TextFile

    Length: 1726 (0x6be)
    Types: TextFile
    Names: »fe_write.c«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z« 
        └─⟦036c765ac⟧ 
            └─⟦this⟧ »TeX3.0/TeXcontrib/salkind/src/fe_write.c« 
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
    └─⟦this⟧ »./tex82/TeXcontrib/salkind/src/fe_write.c« 
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦63303ae94⟧ »unix3.14/TeX3.14.tar.Z« 
        └─⟦c58930e5c⟧ 
            └─⟦this⟧ »TeX3.14/TeXcontrib/salkind/src/fe_write.c« 

TextFile


#include <stdio.h>
#include "rst.h"

write_filemark(fp)
FILE *fp;
{
	fseek(fp, 0L, 0);
	outstr("Rast", fp);
	out4byt(0, fp);
}

write_preamble(rp, fp)
struct rst_preamble *rp;
FILE *fp;
{
	fseek(fp, 8L, 0);
	out2byt(rp->rp_bytes, fp);
	out1byt(rp->rp_version, fp);
	out3byt(rp->rp_glyphptr, fp);
	out2byt(rp->rp_firstglyph, fp);
	out2byt(rp->rp_lastglyph, fp);
	out4byt(rp->rp_fontmag, fp);
	out4byt(rp->rp_designsize, fp);
	out4byt(rp->rp_interline, fp);
	out4byt(rp->rp_interword, fp);
	out2byt(rp->rp_rotation, fp);
	out1byt(rp->rp_charadvance, fp);
	out1byt(rp->rp_lineadvance, fp);
	out4byt(rp->rp_checksum, fp);
	out2byt(rp->rp_fontres, fp);
	out1byt(rp->rp_fontident.s_l, fp);
	outstr(rp->rp_fontident.s_p, fp);
	out1byt(rp->rp_facetype.s_l, fp);
	outstr(rp->rp_facetype.s_p, fp);
	out1byt(rp->rp_outdevice.s_l, fp);
	outstr(rp->rp_outdevice.s_p, fp);
	out1byt(rp->rp_creator.s_l, fp);
	outstr(rp->rp_creator.s_p, fp);
}

write_glyphdir(rp, gd, fp)
struct rst_preamble *rp;
struct rst_glyph_entry *gd;
FILE *fp;
{
	register int i;

	fseek(fp, (long)rp->rp_glyphptr, 0);
	for (i = rp->rp_firstglyph; i <= rp->rp_lastglyph; i++) {
		out2byt(gd[i].rg_h, fp);
		out2byt(gd[i].rg_w, fp);
		out2byt(gd[i].rg_y, fp);
		out2byt(gd[i].rg_x, fp);
		out4byt(gd[i].rg_width, fp);
		out3byt(gd[i].rg_offset, fp);
	}
}

write_rasters(rp, gd, poff, ifp, ofp)
struct rst_preamble *rp;
struct rst_glyph_entry *gd;
long *poff;
FILE *ifp, *ofp;
{
	register int i, j, k;
	int c;

        for (i = rp->rp_firstglyph; i <= rp->rp_lastglyph; i++) {
		fseek(ifp, poff[i], 0);
		fseek(ofp, (long)gd[i].rg_offset, 0);
		for (j = 0; j < gd[i].rg_h; j++) {
			for (k = 0; k < gd[i].rg_w; k++) {
				c = getc(ifp);
				putc(c, ofp);
			}
		}
	}
}