File: dcs.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 (34 lines) | stat: -rw-r--r-- 610 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
31
32
33
34
#include <stdlib.h>
#include <stdio.h>
#include "wv.h"

void wvGetDCS_internal(DCS *item,FILE *fd, U8 *pointer)
	{
	U16 temp16;
	temp16 = dread_16ubit(fd,&pointer);
	item->fdct = temp16 & 0x0007;
	item->count = (temp16 & 0x00F8) >> 3;
	item->reserved = (temp16 & 0xff00) >> 8;
	}

void wvGetDCS(DCS *item,FILE *fd)
	{
	wvGetDCS_internal(item,fd,NULL);
	}

void wvGetDCSFromBucket(DCS *item,U8 *pointer)
	{
	wvGetDCS_internal(item,NULL,pointer);
	}

void wvCopyDCS(DCS *dest,DCS *src)
	{
	memcpy(dest,src,sizeof(DCS));
	}

void wvInitDCS(DCS *item)
	{
	item->fdct = 0;
	item->count = 0;
	item->reserved = 0;
	}