亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cp-hash.c

?? HLPDK V10.0+ System Extension Library
?? C
字號:
/*  cp-hash.c  -- file copying (hash search routines)
    Copyright (C) 1989, 1990 Free Software Foundation.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 1, or (at your option)
    any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

    Written by Torbjorn Granlund, Sweden (tege@sics.se). */

#include <stdio.h>
#include "cp.h"

char *hash_insert ();
char *hash_insert2 ();

struct htab *htab;
char new_file;

/* Add PATH to the list of files that we have created.
   Return 0 if successful, 1 if not. */

int
remember_created (path)
     char *path;
{
  struct stat sb;

  if (stat (path, &sb) < 0)
    {
      error (0, errno, "%s", path);
      return 1;
    }

  hash_insert (sb.st_ino, sb.st_dev, &new_file);
  return 0;
}

/* Add path NODE, copied from inode number INO and device number DEV,
   to the list of files we have copied.
   Return NULL if inserted, otherwise non-NULL. */

char *
remember_copied (node, ino, dev)
     char *node;
     ino_t ino;
     dev_t dev;
{
  return hash_insert (ino, dev, node);
}

/* Allocate space for the hash structures, and set the global
   variable `htab' to point to it.  The initial hash module is specified in
   MODULUS, and the number of entries are specified in ENTRY_TAB_SIZE.  (The
   hash structure will be rebuilt when ENTRY_TAB_SIZE entries have been
   inserted, and MODULUS and ENTRY_TAB_SIZE in the global `htab' will be
   doubled.)  */

void
hash_init (modulus, entry_tab_size)
     unsigned modulus;
     unsigned entry_tab_size;
{
  struct htab *htab_r;

  htab_r = (struct htab *)
    xmalloc (sizeof (struct htab) + sizeof (struct entry *) * modulus);

  htab_r->entry_tab = (struct entry *)
    xmalloc (sizeof (struct entry) * entry_tab_size);

  htab_r->modulus = modulus;
  htab_r->entry_tab_size = entry_tab_size;
  htab = htab_r;

  forget_all ();
}

/* Reset the hash structure in the global variable `htab' to
   contain no entries.  */

void
forget_all ()
{
  int i;
  struct entry **p;

  htab->first_free_entry = 0;

  p = htab->hash;
  for (i = htab->modulus; i > 0; i--)
    *p++ = NULL;
}

/* Insert path NODE, copied from inode number INO and device number DEV,
   into the hash structure in the global variable `htab', if an entry with
   the same inode and device was not found already.
   Return NULL if inserted, otherwise non-NULL. */

char *
hash_insert (ino, dev, node)
     ino_t ino;
     dev_t dev;
     char *node;
{
  struct htab *htab_r = htab;

  if (htab_r->first_free_entry >= htab_r->entry_tab_size)
    {
      int i;
      struct entry *ep;
      unsigned modulus;
      unsigned entry_tab_size;

      /* Increase the number of hash entries, and re-hash the data.
	 The method of shrinking and increasing is made to compactify
	 the heap.  If twice as much data would be allocated
	 straightforwardly, we would never re-use a byte of memory.  */

      /* Let htab shrink.  Keep only the header, not the pointer vector.  */

      htab_r = (struct htab *)
	xrealloc ((char *) htab_r, sizeof (struct htab));

      modulus = 2 * htab_r->modulus;
      entry_tab_size = 2 * htab_r->entry_tab_size;

      /* Increase the number of possible entries.  */

      htab_r->entry_tab = (struct entry *)
	xrealloc ((char *) htab_r->entry_tab,
		  sizeof (struct entry) * entry_tab_size);

      /* Increase the size of htab again.  */

      htab_r = (struct htab *)
	xrealloc ((char *) htab_r,
		  sizeof (struct htab) + sizeof (struct entry *) * modulus);

      htab_r->modulus = modulus;
      htab_r->entry_tab_size = entry_tab_size;
      htab = htab_r;

      i = htab_r->first_free_entry;

      /* Make the increased hash table empty.  The entries are still
	 available in htab->entry_tab.  */

      forget_all ();

      /* Go through the entries and install them in the pointer vector
	 htab->hash.  The items are actually inserted in htab->entry_tab at
	 the position where they already are.  The htab->coll_link need
	 however be updated.  Could be made a little more efficient.  */

      for (ep = htab_r->entry_tab; i > 0; i--)
	{
	  hash_insert2 (htab_r, ep->ino, ep->dev, ep->node);
	  ep++;
	}
    }

  return hash_insert2 (htab_r, ino, dev, node);
}

/* Insert path NODE, copied from inode number INO and device number DEV,
   into the hash structure HTAB, if not already present.
   Return NULL if inserted, otherwise non-NULL. */

char *
hash_insert2 (htab, ino, dev, node)
     struct htab *htab;
     ino_t ino;
     dev_t dev;
     char *node;
{
  struct entry **hp, *ep2, *ep;
  hp = &htab->hash[ino % htab->modulus];
  ep2 = *hp;

  /* Collision?  */

  if (ep2 != NULL)
    {
      ep = ep2;

      /* Search for an entry with the same data.  */

      do
	{
	  if (ep->ino == ino && ep->dev == dev)
	    return ep->node;	/* Found an entry with the same data.  */
	  ep = ep->coll_link;
	}
      while (ep != NULL);

      /* Did not find it.  */

    }

  ep = *hp = &htab->entry_tab[htab->first_free_entry++];
  ep->ino = ino;
  ep->dev = dev;
  ep->node = node;
  ep->coll_link = ep2;		/* ep2 is NULL if not collision.  */

  return NULL;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色哟哟一区二区| 亚洲电影在线免费观看| 欧美丝袜丝交足nylons| 成人国产一区二区三区精品| 激情欧美一区二区| 国内不卡的二区三区中文字幕 | 亚洲一本大道在线| 亚洲欧美在线高清| 国产精品久久久久影视| 国产精品青草综合久久久久99| 奇米色一区二区| 亚洲曰韩产成在线| 亚洲午夜影视影院在线观看| 亚洲韩国一区二区三区| 婷婷综合五月天| 日日夜夜免费精品| 麻豆91在线播放| 国产一区不卡视频| 99这里只有久久精品视频| 91捆绑美女网站| 91精品国产91热久久久做人人| 韩国在线一区二区| 国产一区在线看| 大美女一区二区三区| www.激情成人| 在线播放中文字幕一区| 精品国产凹凸成av人导航| 亚洲国产精品99久久久久久久久| 欧美日韩视频在线观看一区二区三区 | av激情成人网| 国产精品欧美精品| 一区二区在线观看免费视频播放| 欧美妇女性影城| 精品久久久久久久久久久久包黑料| 99热精品国产| 欧美精品色一区二区三区| 欧美一级日韩免费不卡| 国产片一区二区| 亚洲一区二区四区蜜桃| 亚洲一级二级三级在线免费观看| 国产精品久久免费看| 亚洲电影视频在线| 国产精品亚洲午夜一区二区三区 | 中文字幕人成不卡一区| 亚洲五码中文字幕| 久久国产精品72免费观看| 99re在线视频这里只有精品| 91精品久久久久久久99蜜桃 | 国产一区日韩二区欧美三区| 91老师国产黑色丝袜在线| 欧美变态凌虐bdsm| 一区二区三区国产豹纹内裤在线| 欧美激情综合在线| 蜜桃一区二区三区在线| 91碰在线视频| 国产亚洲一区二区三区在线观看| 91精品国产综合久久精品app| 在线观看av一区二区| 国产精品不卡一区二区三区| 精品亚洲aⅴ乱码一区二区三区| 午夜激情一区二区三区| 春色校园综合激情亚洲| 26uuu亚洲综合色欧美| 亚洲国产va精品久久久不卡综合| 午夜私人影院久久久久| 一本一道综合狠狠老| 国产日本欧洲亚洲| 国产馆精品极品| 欧美一二三四区在线| 五月婷婷色综合| 制服丝袜亚洲播放| 三级亚洲高清视频| 欧美精品久久一区二区三区| 亚洲电影欧美电影有声小说| 欧美视频一区二| 亚洲丰满少妇videoshd| 欧美少妇性性性| 亚洲午夜精品17c| 欧美高清视频一二三区| 日韩综合在线视频| 欧美一级在线观看| 蜜臀91精品一区二区三区| 日韩美女视频一区二区在线观看| 久久影院午夜片一区| 国产精品一区二区三区四区| 日韩一级在线观看| 国产在线精品一区二区夜色| 国产亚洲短视频| 国产a区久久久| 1024亚洲合集| 久久精品水蜜桃av综合天堂| 国产一区二区三区在线观看免费| 99国产精品国产精品毛片| 亚洲欧美日韩国产综合| 在线精品视频免费观看| 亚洲一区二区美女| 日韩视频一区二区| 国产激情91久久精品导航| 亚洲欧美在线视频观看| 欧美日韩一区二区欧美激情| 日本不卡高清视频| 国产日产欧产精品推荐色| 色哟哟一区二区三区| 视频一区免费在线观看| 久久人人超碰精品| 91丨九色porny丨蝌蚪| 五月激情六月综合| 精品粉嫩超白一线天av| 成人av影视在线观看| 一区二区欧美视频| 日韩欧美国产成人一区二区| www..com久久爱| 日韩电影网1区2区| 国产精品久久久久9999吃药| 9191久久久久久久久久久| 国产精品亚洲成人| 亚洲国产精品久久久男人的天堂| 成人av资源下载| 婷婷成人综合网| 国产亚洲欧美日韩日本| 欧美日韩一区二区在线观看| 国产精品亚洲第一| 欧美aaa在线| 亚洲人成网站色在线观看| 日韩一区二区不卡| 色综合久久66| 国产成人精品三级麻豆| 天天影视网天天综合色在线播放| 日本高清成人免费播放| 国产精品亚洲一区二区三区在线| 欧美大片免费久久精品三p| 色综合久久88色综合天天 | 国产欧美久久久精品影院| 91极品视觉盛宴| 不卡视频一二三| 国产一区二区三区综合| 日本 国产 欧美色综合| 亚洲综合精品自拍| 亚洲日本中文字幕区| 国产精品乱码一区二区三区软件 | 亚洲资源在线观看| 国产精品美日韩| 久久久精品欧美丰满| 日韩美女一区二区三区| 884aa四虎影成人精品一区| 91久久国产最好的精华液| 国产成人丝袜美腿| 国产乱码精品1区2区3区| 老司机精品视频一区二区三区| 欧美一卡在线观看| 欧美熟乱第一页| 欧美亚洲动漫精品| 99久久久久免费精品国产 | 欧美喷水一区二区| 99re在线视频这里只有精品| gogo大胆日本视频一区| 不卡高清视频专区| 337p亚洲精品色噜噜狠狠| 欧美精品丝袜久久久中文字幕| 国内精品免费**视频| 美女一区二区视频| 蜜臀精品一区二区三区在线观看| 日本一区二区三区国色天香| 欧美极品xxx| 日韩伦理免费电影| 一个色在线综合| 无码av中文一区二区三区桃花岛| 欧美tk—视频vk| 精品国产乱码久久久久久久| 亚洲精品一线二线三线无人区| 色呦呦网站一区| 欧美日韩一区在线| 日韩一区二区三区精品视频| 欧美一区二区三区不卡| 国产人成亚洲第一网站在线播放| 欧美视频一区在线| 日韩女优电影在线观看| 国产夜色精品一区二区av| 日韩理论片在线| 亚洲地区一二三色| 精品一区二区三区视频在线观看| 国产精品久久久久永久免费观看 | 中文字幕高清一区| 一区二区三区91| 奇米亚洲午夜久久精品| 国产91对白在线观看九色| 91福利在线观看| 日韩精品最新网址| 国产欧美视频一区二区三区| 专区另类欧美日韩| 免费在线观看一区二区三区| 成人网页在线观看| 在线综合视频播放| 亚洲国产电影在线观看| 亚洲.国产.中文慕字在线| 91老司机福利 在线| 日韩免费在线观看| 亚洲日本电影在线| 国产在线精品不卡| 欧美日韩电影在线|