# #include /* * MHEAD initializes a picture header in the CVL picture format * Calling sequence is * mhead(newarea, nrows, ncols); * where newarea is a pointer to a structure of type cvl_p, * and nrows and ncols are integer specifications of picture size. * * Joseph Pallas 9/18/80 cc -O -c mhead.c * Modified by Robert L. Kirby to reverse nrows and ncols * and change tag1 slightly to make it more distinctive. */ mhead(newarea, ncols, nrows) struct cvl_p *newarea; int nrows; int ncols; { /* newarea is NOT assumed to be zeroed */ newarea->cv_tag = 'TCIP' + 020000000000; /* identify as picture file */ newarea->cv_lcom = 0; newarea->cv_type = 0; newarea->cv_dims = 2; newarea->cv_hpls = 1; newarea->cv_plns = 1; newarea->cv_rows = nrows; newarea->cv_cols = ncols; newarea->cv_bnds = 1; newarea->cv_bp = 8; /* optional fields */ newarea->cv_ebb = 0; newarea->cv_sbb = 8; newarea->cv_bb = 8; newarea->cv_sbp = 8; newarea->cv_ebp = 0; }