download crc_test.c
Language: C
LOC: 23
Project Info
grub.org - Distributed Internet Crawler(grub)
Server: SourceForge
Type: cvs
...ge\g\grub\grub\client\util\
   alt_ftw.c
   alt_ftw.h
   bin_test_util.dsp
   clog.cpp
   clog.h
   ConfigFileInfo.h
   crc.h
   crc_32.c
   crc_32.cpp
   crc_32.h
   crc_test.c
   crc_test.cpp
   crc32.c
   crc32.h
   dbl_list.c
   dbl_list.h
   delay.cpp
   delay.h
   diagnose.h
   fc32.c
   file_data.c
   file_data.h
   getopt.c
   getopt.h
   grubconf.c
   grubconf.h
   GrubExp.cpp
   GrubExp.h
   Gui.cpp
   Gui.h
   intl.h
   lib_util.dsp
   lockfile.cpp
   lockfile.h
   Makefile.am
   parsecfg.c
   parsecfg.h
   platform.h
   rmfiles.c
   rmfiles.h
   ServerSettings.cpp
   ServerSettings.h
   sniptype.h
   StatusInterface.cpp
   StatusInterface.h
   strip_url.c
   strip_url.h
   test_util.cpp

/* 
 * Testing the crc files and file_data structures.
 * Date: 03/16/2001
 * Author: Ledio Ago
 */
#include "crc_32.h"
#include "file_data.h"
#include <stdio.h>
#include <string.h>

/*
int main( int argc, char *argv[] )
*/
int main()
{
	unsigned long 	crc;
	long size;
	file_data_t *fdata;
	char fname[100];
	FILE *ofp;	

	gen_crc_table();

	fdata = create_file_data();
	file_data( fdata, "ledio sarah", strlen("ledio sarah") );

	destroy_file_data(fdata, &size, &crc );

	printf( "Cr: %u and size: %ld\n", (unsigned int)crc, size );

	fdata = create_file_data();
	file_data( fdata, "ledio", strlen("ledio") );
	file_data( fdata, " ", strlen(" ") );
	file_data( fdata, "sarah", strlen("sarah") );

	destroy_file_data(fdata, &size, &crc );

	printf( "Cr: %u and size: %ld\n", (unsigned int)crc, size );
}

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us