File: graphics.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 (21 lines) | stat: -rw-r--r-- 379 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
#include <stdlib.h>
#include <stdio.h>
#include "wv.h"
				
void wvDumpPicture(U32 pos,FILE *fd)
	{
	static int i;
    U32 j;
	U32 len;
	FILE *out;
	char buffer[64];

	fseek(fd,pos,SEEK_SET);
	len = read_32ubit(fd);
	sprintf(buffer,"graphicdump%d",i++);
	out = fopen(buffer,"wb");
	fseek(fd,pos,SEEK_SET);
    for (j=0;j<len;j++)
        fputc(getc(fd),out);
    fclose(out);
	}