File: machine_type.c

package info (click to toggle)
dhex 0.69-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 512 kB
  • sloc: ansic: 5,482; makefile: 71; sh: 46
file content (27 lines) | stat: -rw-r--r-- 354 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
#include <stdio.h>
#include "machine_type.h"

tUInt64	getfilepos(tFptr f)
{
	tUInt64	x;
	x=ftell(f);
	return x;
}
tUInt64 getfilesize(tFptr f)
{
	tUInt64 x;
	fseek(f,0,SEEK_END);
	x=getfilepos(f);

	return x;	
	//return (tUInt64)ftell(f);	
}
tInt8	setfilepos(tFptr f,tUInt64 pos)
{
	if (fseek(f,pos,SEEK_SET)!=0)
	{
		return RETNOK;
	}
	return RETOK;
}