zoukankan      html  css  js  c++  java
  • hashfile.h

    #include<unistd.h>
    #include<sys/stat.h>
    #define COLLISIONFACTOR 0.5
    struct HashFileHeader
    {
    int sig;
    int reclen; 
    int total_rec_num;
    int current_rec_num;  
    };
    struct CFTag
    {
    char collision; 
    char free; 
    };
    int hashfile_creat(const char *filename,mode_t mode,int reclen,int total_rec_num);
    //int hashfile_open(const char *filename,int flags); 
    int hashfile_open(const char *filename,int flags,mode_t mode);
    int hashfile_close(int fd);
    int hashfile_read(int fd,int keyoffset,int keylen,void *buf);
    int hashfile_write(int fd,int keyoffset,int keylen,void *buf);
    int hashfile_delrec(int fd,int keyoffset,int keylen,void *buf);
    int hashfile_findrec(int fd,int keyoffset,int keylen,void *buf);
    int hashfile_saverec(int fd,int keyoffset,int keylen,void *buf);
    int hash(int keyoffset,int keylen,void *buf,int total_rec_num);
    int checkHashFileFull(int fd);
    int readHashFileHeader(int fd,struct HashFileHeader *hfh);
    
  • 相关阅读:
    luogu_1414 又是毕业季II
    luogu_1372 又是毕业季I
    luogu_1313 计算系数
    luogu_1134 阶乘问题
    luogu_1514 引水入城
    luogu_1120 小木棍
    文件操作
    快速排序
    c oth
    ANSI C与C89、C99、C11区别差异
  • 原文地址:https://www.cnblogs.com/1112wlt/p/14159755.html
Copyright © 2011-2022 走看看