#include
#define booksize 100
#define blhnum 50
#define rrunm 50 #include typedef struct{ int bno; char bname[21]; int namenext; char author[9]; int authnext; char press[11]; int prenext; char sortno[4]; int storenum; int borrownum;
}bookrectype;
typedef struct{ bookrectype bookdbase[booksize]; int len;
}bookdbasefile;
typedef struct{
int bno;
int recno;
}bidxrectype;
typedef struct{
bidxrectype bnoidx[booksize]; int len;
}bnoidxfile;
typedef struct{
char bname[21];
int lhead;
int recnum;
}bnrectype;
typedef struct{
bnrectype lhfrec1[blhnum];
}
}
int len1;
}lhfile1;
typedef struct{
char author[9];
int lhead;
int recnum;
}barectype;
typedef struct {
barectype lhfrec2[blhnum]; int len2;
}lhfile2;
typedef struct {
char press[11];
int lhead;
int recnum;
}bprectype;
typedef struct{
bprectype lhfrec3[blhnum]; int len3;
}lhfile3;
typedef struct{
int rno;
char name[8];
int bn1;
int bn2;
}rrectype;
typedef struct{
rrectype readrec[rrunm]; int len;
}readerfile;
typedef struct{
int rno;
int recno;
}ridxrectype;
typedef struct{
ridxrectype rnoidx[rrunm]; int len;
}rnoidxfile;
typedef struct{
int rno;
int bno;
char date1[9];
char date2[9];
}bbookrectype;
typedef struct{
bbookrectype bbook[booksize];
int len;
}bbookfile;
bookdbasefile appedbaserec(bookdbasefile bf)
{ int i;
i=++bf.len;
printf(" 书号 书 名 作者名 出版商 分类号 藏书量 \n"); scanf("%d%s",&bf.bookdbase[i].bno, bf.bookdbase[i].bname); scanf("%s%s",&bf.bookdbase[i].author, bf.bookdbase[i].press); scanf("%s %d",&bf.bookdbase[i].sortno,&bf.bookdbase[i].storenum); bf.bookdbase[i].borrownum=0;
return bf;
}
bnoidxfile changebnoidxf(bookdbasefile bf,bnoidxfile bif)
{ int i,j,k=1;
i=bf.len;
j=bif.len;
while(j>=1)
{
if(bf.bookdbase[i].bno>bif.bnoidx[i].bno)
{ k=j+1;break;}
j--;
}
if(bif.len>0)
for(j=bif.len;j>=k;j--)
bif.bnoidx[j+1]=bif.bnoidx[j]; bif.bnoidx[k].bno=bf.bookdbase[i].bno;
bif.bnoidx[k].recno=i;
bif.len++;
return bif;
lhfile1 changelinkheabf1(bookdbasefile *bf,lhfile1 lhf1)
{ int i,j,k,m;
char sm[21];
i=bf->l