File: pgd.c

package info (click to toggle)
abiword 0.7.7-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 20,604 kB
  • ctags: 18,358
  • sloc: cpp: 88,791; ansic: 66,296; sh: 7,777; makefile: 3,397; xml: 687; perl: 361; awk: 273; sed: 36; csh: 28
file content (30 lines) | stat: -rw-r--r-- 805 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stdlib.h>
#include <stdio.h>
#include "wv.h"

void wvGetPGD(version ver,PGD *item,FILE *fd)
	{
	U16 temp16;
	
	temp16 = read_16ubit(fd);
	item->fContinue = temp16 & 0x0001;
	item->fUnk = (temp16 & 0x0002)>>1;
	item->fRight = (temp16 & 0x0004)>>2;
	item->fPgnRestart = (temp16 & 0x0008)>>3;
	item->fEmptyPage = (temp16 & 0x0010)>>4;
	item->fAllFtn = (temp16 & 0x0020)>>5;
	item->fColOnly = (temp16 & 0x0040)>>6;
	item->fTableBreaks = (temp16 & 0x0080)>>7;
	item->fMarked = (temp16 & 0x0100)>>8;
	item->fColumnBreaks = (temp16 & 0x0200)>>9;
	item->fTableHeader = (temp16 & 0x0400)>>10;
	item->fNewPage = (temp16 & 0x0800)>>11;
	item->bkc = (temp16 & 0xF000)>>12;

	item->lnn=read_16ubit(fd);
	item->pgn=read_16ubit(fd);
	if (ver == WORD8)
		item->dym=(S32)read_32ubit(fd);
	else
		item->dym=0;
	}