File: testcbf.c

package info (click to toggle)
cbflib 0.9.6%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 56,196 kB
  • sloc: ansic: 103,920; python: 4,552; sh: 3,032; makefile: 1,822; yacc: 659; f90: 210; xml: 210; cpp: 58; java: 16
file content (21 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "cbf.h"

int main() {
	FILE *f;
	cbf_handle ch;
	int status;
	unsigned int m;

	f = fopen("examples/template_pilatus6m_2463x2527.cbf", "rb");

	cbf_make_handle(&ch);

	status = cbf_read_widefile(ch, f, MSG_DIGEST);
	printf("read_widefile (%d)\n", status);

	status = cbf_count_datablocks(ch, &m);
	printf("count_dbs (%d) = %d\n", status, m);

	/*  fclose(f);*/ /* let cbflib handle the closing of a file */
	return 0;
}