File: shd.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 (37 lines) | stat: -rw-r--r-- 651 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
35
36
37
#include <stdlib.h>
#include <stdio.h>
#include "wv.h"

void wvGetSHD_internal(SHD *item,FILE *fd,U8 *pointer)
	{
	U16 temp16;
#ifdef PURIFY
	wvInitSHD(item);
#endif
	temp16 = dread_16ubit(fd,&pointer);
	item->icoFore = temp16 & 0x001F;
	item->icoBack = (temp16 & 0x03E0) >> 5;
	item->ipat	= (temp16 & 0xFC00) >> 10;
	}

void wvGetSHD(SHD *item,FILE *fd)
	{
	wvGetSHD_internal(item,fd,NULL);
	}

void wvGetSHDFromBucket(SHD *item,U8 *pointer)
	{
	wvGetSHD_internal(item,NULL,pointer);
	}

void wvInitSHD(SHD *item)
	{
	item->icoFore = 0;
	item->icoBack = 0;
	item->ipat	= 0;
	}

void wvCopySHD(SHD *dest,SHD *src)
	{
	memcpy(dest,src,sizeof(SHD));
	}