
⠪,   ⠪ ᨢ   ﬨ ⨯ (᫨ 筮
 ⨬ ⮡ ⨯  뢮 ⥪⮬,   ன).

char	*ts[]= {
	"dBase III",
	"FoxPro",
	"dBase IV",
	"Visual FoxPro",
	"Unknown"
	};


  ᮡ⢥ 㭪, 뢮   ,   ࠧ६
  .

void
StructInfo()
{
 char	*f1,*f2;

 f1=strrchr(d1->filename, '\\');
 f2=strrchr(d2->filename, '\\');
 if (f1) ++f1; else f1=d1->filename;
 if (f2) ++f2; else f2=d2->filename;

 printf("File: %-30s | File: %-30s\n"
	"Type: %-30s | Type: %-30s\n"
	"Last updated: %02d.%02d.%04d             | Last updated: %02d.%02d.%04d\n"
	"File size: %13ld             | File size: %13ld\n"
	"Header size: %11ld             | Header size: %11ld\n"
	"Record count: %10ld             | Record count: %10ld\n"
	"Field count: %11ld             | Field count: %11ld\n"
	"Record length: %9ld             | Record length: %9ld\n"
	,
	f1, f2,

	ts[GetMemoType(d1)], ts[GetMemoType(d2)],
	
	d1->hdr.last_month, d1->hdr.last_day, d1->hdr.last_year+1900,
	d2->hdr.last_month, d2->hdr.last_day, d2->hdr.last_year+1900,

	SetFilePointer(d1->h, 0, NULL, FILE_END),SetFilePointer(d2->h, 0, NULL, FILE_END),
	d1->hdr.offset_first, d2->hdr.offset_first,
	reccount(d1), reccount(d2),
	fieldcount(d1), fieldcount(d2),
	d1->hdr.rec_len, d2->hdr.rec_len
	);
}

砫  뤥    䠩 ᮡ⢥ ,  ⥩ (᫨
 ).

 char	*f1,*f2;

 f1=strrchr(d1->filename, '\\');
 f2=strrchr(d2->filename, '\\');
 if (f1) ++f1; else f1=d1->filename;
 if (f2) ++f2; else f2=d2->filename;


뢥  䠩:

 printf("File: %-30s | File: %-30s\n"
	[...]
	f1, f2,

. 㭪 GetMemoType 頥 ⨯  . 
0-dbase3, 2-FoxPro, 3-dbase4, 4-visualfoxpro, 5-⭮ .
 襬  ᨢ   ८ࠧ   ᮮ⢥騥
.

	"Type: %-30s | Type: %-30s\n"
	[...]
	ts[GetMemoType(d1)], ts[GetMemoType(d2)],

 ᫥  .    뢮   ଠ  m-d-y. 祭
 ।⢥   DBF 䠩.   
1900.   ᪫ ⭮,  CDBF***      易
  2156 ,  㯨 ९   ⢥
 ࠭ ,     ⮬  ,     
⠢ ஢  ९. :-)

	"Last updated: %02d.%02d.%04d             | Last updated: %02d.%02d.%04d\n"
	[...]
	d1->hdr.last_month, d1->hdr.last_day, d1->hdr.last_year+1900,
	d2->hdr.last_month, d2->hdr.last_day, d2->hdr.last_year+1900,

 䠩   ᪥      맢  㭪, 
⠭  㪠⥫       䠩.       뫮  
  㫥:
	⢮ ᥩ * ࠧ  + ࠧ .

	"File size: %13ld             | File size: %13ld\n"
	[...]
	SetFilePointer(d1->h, 0, NULL, FILE_END),SetFilePointer(d2->h, 0, NULL, FILE_END),

  -   ᬥ饭   砫 䠩   .
६ 祭  ,  뢠  䠩.

	"Header size: %11ld             | Header size: %11ld\n"
	[...]
	d1->hdr.offset_first, d2->hdr.offset_first,

⢮ ᥩ.          䨫஢,
 祭 ᫠ ᥩ ⮦  뫮    .
Hint:
㭪 reccount 頥 祭 ᫠ ᥩ  ⮬ 䨫.

	"Record count: %10ld             | Record count: %10ld\n"
	[...]
	reccount(d1), reccount(d2),

᫮   . -  饥 ᫮   㧭 
६  num_fld      DBF,  㭪  fieldcount  
  ᫮ ॠ쭮  ᯮ㥬  ᥩ ,     
   筮.

	"Field count: %11ld             | Field count: %11ld\n"
	[...]
	fieldcount(d1), fieldcount(d2),

 -  . 祭 ६  .

	"Record length: %9ld             | Record length: %9ld\n"
	[...]
	d1->hdr.rec_len, d2->hdr.rec_len

㭪 뢮 ਡ⥫쭮 ⠪ १:

File: sample.dbf                     | File: Birthday.dbf
Type: dBase III                      | Type: dBase III
Last updated: 02.21.2001             | Last updated: 02.20.2001
File size:          1359             | File size:          1553
Header size:         225             | Header size:         225
Record count:         14             | Record count:         16
Field count:           6             | Field count:           6
Record length:        81             | Record length:        83
