User manual - DT-900 高速ファイルサーチライブラリver.1.00(2006年9月29日)

Hash Library User’s Manual 14
F.
F.F.
F.
サンプルアプリケーション
サンプルアプリケーションサンプルアプリケーション
サンプルアプリケーション
本章では、SAMPLEディレクトリにあるサンプルアプリケーションを説明します。
サンプルアプリケーションは、次のような構成になっています。
/**************************************************************************
Copyright information : Casio Computer Co. Ltd., Japan
File Name : Sample.c
Project Name : HASH LIBRARY
Author Name : Jei, Srinivasa Murthy, Vijay Mantri
Date of Creation : 18/8/1998
Version Number : 1.00
Brief Description : Sample program to test Hash Library Functions
On DT-900
**************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "HashLib.h"
#include "itron.h"
#include "cmndef.h"
#include "bios1mac.h"
/* -------------------------------------------------------------------------
Calls : iHashAssign (),
iHashRead (),
iHashWrite (),
iHashAdd ()
--------------------------------------------------------------------------*/
int ap_start(void)
{
FILE *fpIndex, /* File pointer for Index file. */
*fpData; /* File pointer for Data file. */
long ll = 8, /* To hold Length of Key. */
lV = 40, /* To hold Volume of Data file. */ /* 28-NOV-1997*/
lL = 10, /* To hold Length of Data record. */
lW1 = (lV*120)/100, /* To hold volume of Index file. */
lCount = 0; /* To hold a execution counter. */
Start
iHashAssign ()
iHashWrite ()
iHashRead ()
iHashAdd ()
End