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

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

?? chap23.lst

?? These files contain all of the code listings in C: The Complete Reference, 4th Edition The so
?? LST
字號:
listing 1
struct cell {
  char cell_name[9];  /* cell name e.g., A1, B34 */
  char  formula[128]; /* info e.g., 10/B2 */
  struct cell *next;  /* pointer to next entry */
  struct cell *prior; /* pointer to previous record */
} ;

listing 2
struct cell *start = NULL; /* first element in list */
struct cell *last = NULL;  /* last element in list */

listing 3
/* Store cells in sorted order. */
void dls_store(struct cell *i, /* pointer to new cell to insert */
               struct cell **start, 
               struct cell **last) 
{
  struct cell *old, *p;

  if(!*last) { /* first element in list */
    i->next = NULL;
    i->prior = NULL;
    *last = i;
    *start = i;
    return;
  }

  p = *start; /* start at top of list */

  old = NULL;
  while(p) {
    if(strcmp(p->cell_name, i->cell_name) < 0){
      old = p;
      p = p->next;
    }
    else { 
      if(p->prior) { /* is a middle element */
        p->prior->next = i;
        i->next = p;
        i->prior = p->prior;
        p->prior = i;
        return;
      }
      i->next = p; /* new first element */
      i->prior = NULL;
      p->prior = i;
      *start = i;
      return;
    }
  }
  old->next = i; /* put on end */
  i->next = NULL;
  i->prior = old;
  *last = i;
  return;
}

listing 4
void deletecell(char *cell_name,
            struct cell **start,
            struct cell **last)
{
  struct cell *info;

  info = find(cell_name, *start);
  if(info) {
    if(*start==info) {
      *start = info->next;
      if(*start) (*start)->prior = NULL;
      else *last = NULL;
    }
    else {
      if(info->prior) info->prior->next = info->next;
      if(info != *last)
          info->next->prior = info->prior;
      else
        *last = info->prior;
    }
    free(info); /* return memory to system */
  }
}

listing 5
struct cell *find(char *cell_name, struct cell *start)
{
  struct cell *info;

  info = start;
  while(info) {
    if(!strcmp(cell_name, info->cell_name)) return info;
    info = info->next; /* get next cell */
  }
  printf("Cell not found.\n");
  return NULL; /* not found */
}

listing 6
struct cell {
  char cell_name[9];  /* cell name e.g., A1, B34 */
  char  formula[128]; /* info e.g., 10/B2 */
  struct cell *left;  /* pointer to left subtree */
  struct cell *right; /* pointer to right subtree */
} list_entry;

listing 7
struct cell *stree(
        struct cell *root,
        struct cell *r,
        struct cell *n)
{
  if(!r) {    /* first node in subtree */
    n->left = NULL;
    n->right = NULL;
    if(!root) return n;  /* first entry in tree */
    if(strcmp(n->cell_name, root->cell_name) < 0)
      root->left = n;
    else
      root->right = n;
    return n;
  }

  if(strcmp(r->cell_name, n->cell_name) <= 0)
    stree(r, r->right, n);
  else
    stree(r, r->left, n);

  return root;
}

listing 8
struct cell *dtree(
        struct cell *root,
        char *key)
{
  struct cell *p, *p2;

  if(!root) return root; /* item not found */

  if(!strcmp(root->cell_name, key)) { /* delete root */
    /* this means an empty tree */
    if(root->left == root->right){
      free(root);
      return NULL;
    }
    /* or if one subtree is null */
    else if(root->left == NULL) {
      p = root->right;
      free(root);
      return p;
    }
    else if(root->right == NULL) {
      p = root->left;
      free(root);
      return p;
    }
    /* or both subtrees present */
    else {
      p2 = root->right;
      p = root->right;
      while(p->left) p = p->left;
      p->left = root->left;
      free(root);
      return p2;
    }
  }
  if(strcmp(root->cell_name, key)<=0)
    root->right = dtree(root->right, key);
  else root->left = dtree(root->left, key);
  return root;
}

listing 9
struct cell *search_tree(
        struct cell *root,
        char *key)
{
  if(!root) return root;  /* empty tree */
  while(strcmp(root->cell_name, key)) {
    if(strcmp(root->cell_name, key) <= 0)
      root = root->right;
    else root = root->left;
    if(root == NULL) break;
  }
  return root;
}

listing 10
struct cell {
  char cell_name[9];
  char  formula[128];
} list_entry[2600];   /* 2,600 cells */

listing 11
struct cell {
  char cell_name[9]; 
  char formula[128];
} list_entry;

struct cell *sheet[2600]; /* array of 2,600 pointers */

listing 12
void init_sheet(void)
{
  register int t;

  for(t=0; t < 2600; ++t) sheet[t] = NULL;
}

listing 13
void store(struct cell *i)
{
  int loc;
  char *p;

  /* compute index given cell name */
  loc = *(i->cell_name) - 'A'; /* column */
  p = &(i->cell_name[1]);
  loc += (atoi(p)-1) * 26; /* number of rows * row width + column */

  if(loc >= 2600) {
    printf("Cell out of bounds.\n");
    return;
  }
  sheet[loc] = i; /* place pointer in the array */
}

listing 14
void deletecell(struct cell *i)
{
  int loc;
  char *p;

  /* compute index given cell name */
  loc = *(i->cell_name) - 'A'; /* column */
  p = &(i->cell_name[1]);
  loc += (atoi(p)-1) * 26; /* number of rows * row width + column */

  if(loc >= 2600) {
    printf("Cell out of bounds.\n");
    return;
  }
  if(!sheet[loc]) return; /* don't free a null pointer */

  free(sheet[loc]);  /* return memory to system */
  sheet[loc] = NULL;
}

listing 15
struct cell *find(char *cell_name)
{
  int loc;
  char *p;

  /* compute index given name */
  loc = *(cell_name) - 'A'; /* column */
  p = &(cell_name[1]);
  loc += (atoi(p)-1) * 26; /* number of rows * row width + column */

  if(loc>=2600 || !sheet[loc]) { /* no entry in that cell */
    printf("Cell not found.\n");
    return NULL;  /* not found */
  }
  else return sheet[loc];
}

listing 16
#define MAX 260

struct htype {
  int index;   /* logical index */
  int val;     /* actual value of the array element */
  struct htype *next; /* pointer to next value with same hash */
} primary[MAX];

listing 17
/* Initialize the hash array. */
void init(void)
{
  register int i;

  for (i=0; i<MAX; i++) {
    primary[i].index = -1;
    primary[i].next = NULL;  /* null chain */
    primary[i].val = 0;
  }
}

listing 18
/* Compute hash and store value. */
void store(char *cell_name, int v)
{
  int h, loc;
  struct htype *p;

  /* produce the hash value */
  loc = *cell_name - 'A'; /* column */
  loc += (atoi(&cell_name[1])-1) * 26; /* rows * width + columns */
  h = loc/10; /* hash */

  /* Store in the location unless full or
     store there if logical indexes agree - i.e., update.
  */
  if(primary[h].index==-1 || primary[h].index==loc) {
    primary[h].index = loc;
    primary[h].val = v;
    return;
  }

  /* otherwise, create or add to collision list */
  p = (struct htype *) malloc(sizeof(struct htype));
  if(!p) {
    printf("Out of Memory\n");
    return;
  }
  p->index = loc;
  p->val = v;
  slstore(p, &primary[h]);
}

/* Add elements to the collision list. */
void slstore(struct htype *i,
             struct htype *start)
{
  struct htype *old, *p;

  old = start;
  /* find end of list */
  while(start) {
    old = start;
    start = start->next;
  }
  /* link in new entry */
  old->next = i;
  i->next = NULL;
}

listing 19
/* Compute hash and return value. */
int find(char *cell_name)
{
  int h, loc;
  struct htype *p;

  /* produce the hash value */
  loc = *cell_name - 'A'; /* column */
  loc += (atoi(&cell_name[1])-1) * 26; /* rows * width + column */
  h = loc/10;

  /* return the value if found */
  if(primary[h].index == loc) return(primary[h].val);
  else { /* look in collision list */
    p = primary[h].next;
    while(p) {
      if(p->index == loc) return p->val;
      p = p->next;
    }
    printf("Not in Array\n");
    return -1;
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美男生操女生| 欧美精品一区二区三区四区 | 香港成人在线视频| 久久一留热品黄| 欧美性欧美巨大黑白大战| 国产一区二区精品久久99| 亚洲一线二线三线视频| 中文字幕电影一区| 日韩亚洲欧美中文三级| 色欧美片视频在线观看 | 美女视频黄a大片欧美| 中文字幕欧美一区| 国产视频一区二区在线观看| 91精品国产综合久久国产大片| 不卡av在线免费观看| 国产综合色产在线精品| 午夜精品福利一区二区蜜股av| ...xxx性欧美| 国产欧美一区二区精品性色 | 亚洲裸体在线观看| 久久久精品免费观看| 欧美一区二区视频观看视频| 欧洲色大大久久| 99精品黄色片免费大全| 国产精品一区二区在线播放| 美国毛片一区二区| 首页综合国产亚洲丝袜| 国产成人亚洲综合a∨婷婷| 蜜臀久久久久久久| 天天影视涩香欲综合网| 亚洲高清视频中文字幕| 亚洲精品免费播放| 国产精品久久久久久久久果冻传媒| 久久久久久久久伊人| 久久亚洲影视婷婷| 久久蜜桃一区二区| 久久综合久色欧美综合狠狠| 日韩色在线观看| 欧美成人激情免费网| 日韩精品最新网址| 精品欧美一区二区久久| 精品少妇一区二区三区日产乱码| 日韩精品在线一区二区| 日韩精品资源二区在线| 亚洲精品一区二区精华| 国产婷婷色一区二区三区四区| www精品美女久久久tv| 久久久三级国产网站| 欧美激情一区二区三区四区| 国产精品色在线观看| 亚洲欧洲一区二区三区| 亚洲黄色免费电影| 五月天亚洲婷婷| 久久精品国内一区二区三区| 国产美女精品人人做人人爽| 粉嫩av一区二区三区在线播放| 成人福利电影精品一区二区在线观看 | 曰韩精品一区二区| 亚洲女子a中天字幕| 亚洲图片欧美一区| 免费xxxx性欧美18vr| 国产精品一区二区在线观看不卡| av动漫一区二区| 欧美亚洲高清一区| 欧美电影免费观看高清完整版在线| 欧美精品一区二区三| 国产精品色眯眯| 亚洲一区二区三区视频在线播放 | 成人国产一区二区三区精品| 色综合中文字幕国产 | 中文字幕精品一区二区三区精品| 中文字幕一区二区在线观看| 自拍av一区二区三区| 亚洲电影一区二区三区| 久久国产精品99久久久久久老狼| 国产高清成人在线| 91福利国产精品| 精品久久久久一区| 中文字幕在线免费不卡| 婷婷六月综合亚洲| 成人看片黄a免费看在线| 欧美在线小视频| 精品va天堂亚洲国产| 亚洲欧美日韩电影| 久久精品国产成人一区二区三区| 成人亚洲精品久久久久软件| 欧美猛男男办公室激情| 国产欧美精品一区二区三区四区| 亚洲综合久久av| 国产不卡视频在线观看| 欧美性色欧美a在线播放| 久久综合999| 亚洲国产欧美在线| 成人性生交大合| 欧美一区二区国产| 亚洲日本在线看| 国产一区二区成人久久免费影院| 欧美日韩精品欧美日韩精品一 | 日韩成人dvd| 91亚洲国产成人精品一区二区三| 日韩欧美黄色影院| 一区二区三区四区亚洲| 国产精品18久久久久久久久久久久 | 日韩一级免费一区| 亚洲激情自拍视频| 国产成人精品午夜视频免费| 欧美一区二区三区在线电影| 亚洲人精品午夜| 顶级嫩模精品视频在线看| 欧美一区二区在线不卡| 一区二区三区日本| www.99精品| 国产精品伦理一区二区| 久久99久久99| 欧美日韩国产成人在线免费| 亚洲日本欧美天堂| 成人一区二区三区视频在线观看 | 久久精品免费看| 欧美另类变人与禽xxxxx| 亚洲乱码中文字幕| av福利精品导航| 欧美激情一区在线观看| 国产寡妇亲子伦一区二区| 精品对白一区国产伦| 日本视频免费一区| 欧美福利视频一区| 亚洲成a人v欧美综合天堂下载| 欧美在线999| 亚洲尤物在线视频观看| 在线欧美日韩国产| 亚洲黄色免费电影| 在线免费视频一区二区| 亚洲精品伦理在线| 在线观看免费成人| 一区二区免费在线播放| 色婷婷av一区二区三区gif| 综合久久久久久久| 日本精品一级二级| 亚洲午夜精品一区二区三区他趣| 欧美在线你懂得| 亚洲午夜久久久| 91精品国产色综合久久ai换脸| 琪琪久久久久日韩精品| 日韩欧美国产三级电影视频| 久久99热这里只有精品| 久久精品日产第一区二区三区高清版 | 麻豆精品视频在线观看免费| 日韩一区二区三区三四区视频在线观看| 日韩精品视频网| 日韩美女视频一区二区在线观看| 久久99精品久久久久久| 精品国产1区二区| 成人爱爱电影网址| 亚洲情趣在线观看| 精品视频在线看| 老司机一区二区| 国产精品午夜电影| 色综合久久中文字幕综合网| 亚洲一线二线三线视频| 日韩欧美123| 不卡一二三区首页| 亚洲成人在线网站| 亚洲精品一线二线三线| 成人高清伦理免费影院在线观看| 亚洲精品免费在线观看| 在线播放亚洲一区| 国产成人自拍网| 亚洲夂夂婷婷色拍ww47| 精品成人私密视频| 一本高清dvd不卡在线观看| 日本不卡视频一二三区| 欧美国产日韩亚洲一区| 欧美日韩免费在线视频| 国产一区二区按摩在线观看| 亚洲理论在线观看| 欧美tk丨vk视频| 一本大道久久a久久精二百| 麻豆精品一区二区av白丝在线| 国产精品的网站| 精品三级在线看| 91麻豆自制传媒国产之光| 蜜桃一区二区三区在线| 中文字幕一区在线观看| 日韩欧美高清在线| 色婷婷av一区二区三区软件| 精品在线你懂的| 亚洲一卡二卡三卡四卡无卡久久| 久久―日本道色综合久久| 欧美少妇xxx| 不卡av电影在线播放| 另类小说视频一区二区| 一区二区三区不卡视频 | 国产精品素人一区二区| 91精品国产综合久久精品| 99re成人精品视频| 国产美女久久久久| 日韩精品成人一区二区在线| 国产精品你懂的| 久久综合九色综合97_久久久| 欧美精品一区在线观看|