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

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

?? slist.c

?? MPI stands for the Message Passing Interface. Written by the MPI Forum (a large committee comprising
?? C
字號:
/* slist.c -- generalised singly linked lists   Copyright (C) 2000, 2004 Free Software Foundation, Inc.   Written by Gary V. Vaughan, 2000   NOTE: The canonical source of this file is maintained with the   GNU Libtool package.  Report bugs to bug-libtool@gnu.org.GNU Libltdl is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2 of the License, or (at your option) any later version.As a special exception to the GNU Lesser General Public License,if you distribute this file as part of a program or library thatis built using GNU Libtool, you may include this file under thesame distribution terms that you use for the rest of that program.GNU Libltdl is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with GNU Libltdl; see the file COPYING.LIB.  If not, acopy can be downloaded from  http://www.gnu.org/licenses/lgpl.html,or obtained by writing to the Free Software Foundation, Inc.,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*/#include <assert.h>#include "slist.h"static SList *	slist_sort_merge    (SList *left, SList *right,				     SListCompare *compare, void *userdata);/* Call DELETE repeatedly on each element of HEAD.   CAVEAT: If you call this when HEAD is the start of a list of boxed           items, you must remember that each item passed back to your	   DELETE function will be a boxed item that must be slist_unbox()ed	   before operating on its contents.   e.g. void boxed_delete (void *item) { item_free (slist_unbox (item)); }        ...	  slist = slist_delete (slist, boxed_delete);	...*/SList *slist_delete (SList *head, void (*delete_fct) (void *item)){  assert (delete_fct);  while (head)    {      SList *next = head->next;      (*delete_fct) (head);      head = next;    }  return 0;}/* Call FIND repeatedly with MATCHDATA and each item of *PHEAD, until   FIND returns non-NULL, or the list is exhausted.  If a match is found   the matching item is destructively removed from *PHEAD, and the value   returned by the matching call to FIND is returned.   CAVEAT: To avoid memory leaks, unless you already have the address of           the stale item, you should probably return that from FIND if	   it makes a successful match.  Don't forget to slist_unbox()	   every item in a boxed list before operating on its contents.   */void *slist_remove (SList **phead, SListCallback *find, void *matchdata){  SList *stale = 0;  void *result = 0;  assert (find);  if (!phead || !*phead)    return 0;  /* Does the head of the passed list match? */  result = (*find) (*phead, matchdata);  if (result)    {      stale = *phead;      *phead = stale->next;    }  /* what about the rest of the elements? */  else    {      SList *head;      for (head = *phead; head->next; head = head->next)	{	  result = (*find) (head->next, matchdata);	  if (result)	    {	      stale		= head->next;	      head->next	= stale->next;	    }	}    }  return result;}/* Call FIND repeatedly with each element of SLIST and MATCHDATA, until   FIND returns non-NULL, or the list is exhausted.  If a match is found   the value returned by the matching call to FIND is returned. */void *slist_find (SList *slist, SListCallback *find, void *matchdata){  void *result = 0;  assert (find);  for (; slist; slist = slist->next)    {      result = (*find) (slist, matchdata);      if (result)	break;    }  return result;}/* Return a single list, composed by destructively concatenating the   items in HEAD and TAIL.  The values of HEAD and TAIL are undefined   after calling this function.   CAVEAT: Don't mix boxed and unboxed items in a single list.   e.g.  slist1 = slist_concat (slist1, slist2);  */SList *slist_concat (SList *head, SList *tail){  if (!head)    {      return tail;    }  while (head->next)    head = head->next;  head->next = tail;  return head;}/* Return a single list, composed by destructively appending all of   the items in SLIST to ITEM.  The values of ITEM and SLIST are undefined   after calling this function.   CAVEAT:  Don't mix boxed and unboxed items in a single list.   e.g.  slist1 = slist_cons (slist_box (data), slist1);  */SList *slist_cons (SList *item, SList *slist){  if (!item)    {      return slist;    }  assert (!item->next);  item->next = slist;  return item;}/* Return a list starting at the second item of SLIST.  */SList *slist_tail (SList *slist){  return slist ? slist->next : 0;}/* Return a list starting at the Nth item of SLIST.  If SLIST is less   than N items long, NULL is returned.  Just to be confusing, list items   are counted from 1, to get the 2nd element of slist:   e.g. shared_list = slist_nth (slist, 2);  */SList *slist_nth (SList *slist, size_t n){  for (;n > 1 && slist; n--)    slist = slist->next;  return slist;}/* Return the number of items in SLIST.  We start counting from 1, so   the length of a list with no items is 0, and so on.  */size_tslist_length (SList *slist){  size_t n;  for (n = 0; slist; ++n)    slist = slist->next;  return n;}/* Destructively reverse the order of items in SLIST.  The value of SLIST   is undefined after calling this function.  CAVEAT: You must store the result of this function, or you might not          be able to get all the items except the first one back again.  e.g.    slist = slist_reverse (slist);  */SList *slist_reverse (SList *slist){  SList *result = 0;  SList *next;  while (slist)    {      next		= slist->next;      slist->next	= result;      result		= slist;      slist 		= next;    }  return result;}/* Call FOREACH once for each item in SLIST, passing both the item and   USERDATA on each call. */void *slist_foreach (SList *slist, SListCallback *foreach, void *userdata){  void *result = 0;  assert (foreach);  while (slist)    {      SList *next = slist->next;      result = (*foreach) (slist, userdata);      if (result)	break;      slist = next;    }  return result;}/* Destructively merge the items of two ordered lists LEFT and RIGHT,   returning a single sorted list containing the items of both --  Part of   the quicksort algorithm.  The values of LEFT and RIGHT are undefined   after calling this function.   At each iteration, add another item to the merged list by taking the   lowest valued item from the head of either LEFT or RIGHT, determined   by passing those items and USERDATA to COMPARE.  COMPARE should return   less than 0 if the head of LEFT has the lower value, greater than 0 if   the head of RIGHT has the lower value, otherwise 0.  */static SList *slist_sort_merge (SList *left, SList *right, SListCompare *compare,		  void *userdata){  SList merged, *insert;  insert = &merged;  while (left && right)    {      if ((*compare) (left, right, userdata) <= 0)	{	  insert = insert->next = left;	  left = left->next;	}      else	{	  insert = insert->next = right;	  right = right->next;	}    }  insert->next = left ? left : right;  return merged.next;}/* Perform a destructive quicksort on the items in SLIST, by repeatedly   calling COMPARE with a pair of items from SLIST along with USERDATA   at every iteration.  COMPARE is a function as defined above for   slist_sort_merge().  The value of SLIST is undefined after calling   this function.   e.g.  slist = slist_sort (slist, compare, 0);  */SList *slist_sort (SList *slist, SListCompare *compare, void *userdata){  SList *left, *right;  if (!slist)    return slist;  /* Be sure that LEFT and RIGHT never contain the same item.  */  left = slist;  right = slist->next;  /* Skip two items with RIGHT and one with SLIST, until RIGHT falls off     the end.  SLIST must be about half way along.  */  while (right && (right = right->next))    {      if (!right || !(right = right->next))	break;      slist = slist->next;    }  right = slist->next;  slist->next = 0;  /* Sort LEFT and RIGHT, then merge the two.  */  return slist_sort_merge (slist_sort (left, compare, userdata),			   slist_sort (right, compare, userdata),			   compare, userdata);}/* Aside from using the functions above to manage chained structures of   any type that has a NEXT pointer as its first field, SLISTs can   be comprised of boxed items.  The boxes are chained together in   that case, so there is no need for a NEXT field in the item proper.   Some care must be taken to slist_box and slist_unbox each item in   a boxed list at the appropriate points to avoid leaking the memory   used for the boxes.  It us usually a very bad idea to mix boxed and   non-boxed items in a single list.  *//* Return a `boxed' freshly mallocated 1 element list containing   USERDATA.  */SList *slist_box (const void *userdata){  SList *item = (SList *) malloc (sizeof *item);  if (item)    {      item->next     = 0;      item->userdata = userdata;    }  return item;}/* Return the contents of a `boxed' ITEM, recycling the box itself.  */void *slist_unbox (SList *item){  void *userdata = 0;  if (item)    {      /* Strip the const, because responsibility for this memory	 passes to the caller on return.  */      userdata = (void *) item->userdata;      free (item);    }  return userdata;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩免费在线观看| 亚洲精品中文字幕乱码三区 | 成人午夜电影小说| 欧美性感一类影片在线播放| 久久久国产精品麻豆| 日韩av电影免费观看高清完整版 | 蜜桃在线一区二区三区| 一本久久a久久精品亚洲| 亚洲精品一区二区三区影院| 亚洲欧美国产毛片在线| 国产盗摄女厕一区二区三区| 日韩视频一区二区三区在线播放 | 中文字幕一区日韩精品欧美| 免费的国产精品| 欧美群妇大交群的观看方式| 亚洲精品一卡二卡| 91在线精品秘密一区二区| 久久日一线二线三线suv| 日韩精品每日更新| 欧美日韩一区二区三区在线| 亚洲精品午夜久久久| 91亚洲国产成人精品一区二三| 精品对白一区国产伦| 美女精品自拍一二三四| 91精品国产综合久久久久久久| 亚洲一区精品在线| 欧美性色综合网| 亚洲一区二区三区国产| 91福利小视频| 玉足女爽爽91| 精品视频在线视频| 亚洲成人福利片| 在线电影欧美成精品| 视频一区二区不卡| 日韩一级在线观看| 国产在线不卡一卡二卡三卡四卡| 亚洲精品一区二区三区蜜桃下载| 久久电影网站中文字幕| 久久综合丝袜日本网| 日韩极品在线观看| 欧美精品久久99| 蜜桃一区二区三区在线| 久久综合999| 成人精品小蝌蚪| 悠悠色在线精品| 欧美精品一卡二卡| 蜜乳av一区二区三区| 欧美精品一区二区三区高清aⅴ| 国产乱国产乱300精品| 久久久www免费人成精品| 粉嫩高潮美女一区二区三区| 最新不卡av在线| 精品视频1区2区| 久久97超碰色| 中文字幕一区在线观看视频| 在线免费不卡电影| 麻豆一区二区三区| 中文乱码免费一区二区| 色婷婷综合久色| 日韩和欧美的一区| 欧美国产一区二区在线观看| 色婷婷av一区二区| 蜜臀91精品一区二区三区| 国产精品视频在线看| 欧美丝袜自拍制服另类| 激情成人综合网| 亚洲乱码国产乱码精品精的特点 | 性做久久久久久| 久久蜜臀精品av| 欧美性xxxxx极品少妇| 久久精品国产亚洲5555| 国产精品久久精品日日| 欧美精三区欧美精三区| 国产精品一区二区在线观看网站| 亚洲欧美一区二区三区久本道91 | 久久99久久久久久久久久久| 中文字幕一区免费在线观看| 欧美一区二区三区白人| 99国产精品久久久久久久久久久| 日本不卡123| 亚洲黄一区二区三区| 国产欧美一区二区三区沐欲| 欧美久久免费观看| gogogo免费视频观看亚洲一| 久久99国产精品免费网站| 亚洲一二三四在线| 国产精品狼人久久影院观看方式| 日韩午夜av电影| 欧美午夜精品一区二区蜜桃| 国产91清纯白嫩初高中在线观看| 青青草国产成人99久久| 亚洲成人三级小说| 亚洲三级视频在线观看| 国产亚洲精品aa午夜观看| 欧美精品久久久久久久多人混战 | 国产精品中文字幕日韩精品| 亚洲一区二区免费视频| 亚洲三级免费电影| 久久精品国产成人一区二区三区| 亚洲人成电影网站色mp4| 国产午夜久久久久| 精品国产一区久久| 日韩欧美一区二区免费| 日韩一区二区在线看| 欧美日韩国产三级| 欧美午夜理伦三级在线观看| 91成人免费网站| 在线观看网站黄不卡| 色诱亚洲精品久久久久久| av成人老司机| 97se狠狠狠综合亚洲狠狠| 成人网男人的天堂| 国产成人精品免费| 国产91丝袜在线播放九色| 国产成a人无v码亚洲福利| 国产成人午夜精品影院观看视频| 国产一二精品视频| 国产成人免费在线视频| gogogo免费视频观看亚洲一| 99精品国产热久久91蜜凸| 色综合久久久久网| 欧美在线视频全部完| 欧美日本一区二区三区四区| 91精品国产综合久久精品app| 欧美一区二区三区免费观看视频 | 欧美一区二区在线不卡| 日韩一区二区三| 久久亚洲捆绑美女| 国产精品女同一区二区三区| 国产精品另类一区| 亚洲男女一区二区三区| 性感美女久久精品| 精品一区二区三区在线观看 | 亚洲欧洲日本在线| 亚洲制服丝袜av| 免费视频最近日韩| 国产成人av电影免费在线观看| 91网站最新网址| 欧美视频在线不卡| 久久综合久久综合久久综合| 国产精品视频看| 亚洲h在线观看| 国产又粗又猛又爽又黄91精品| av亚洲精华国产精华精华| 欧美性生活影院| 久久精品亚洲国产奇米99| 亚洲欧美成人一区二区三区| 日本在线不卡一区| 国产91精品免费| 欧美男生操女生| 国产精品美女久久久久久久| 日日夜夜精品视频天天综合网| 国产中文字幕精品| 在线观看欧美黄色| 2021久久国产精品不只是精品| 亚洲精品老司机| 国产成人综合亚洲网站| 欧美三级蜜桃2在线观看| 久久精品人人做人人综合| 亚洲一区在线观看网站| 国产69精品一区二区亚洲孕妇| 欧美亚男人的天堂| 国产精品―色哟哟| 七七婷婷婷婷精品国产| 91网站在线观看视频| 久久综合久久鬼色| 亚洲国产成人精品视频| 成人精品亚洲人成在线| 精品久久人人做人人爰| 在线免费观看不卡av| 精品一区二区三区欧美| 欧美日韩不卡在线| 亚洲精品国产一区二区精华液 | 色综合天天综合网国产成人综合天| 日韩欧美色综合| 一区二区三区波多野结衣在线观看| 国产成人午夜精品影院观看视频| 91精品免费观看| 亚洲成人av一区二区三区| 99re成人精品视频| 国产三级精品在线| 国产综合成人久久大片91| 制服丝袜一区二区三区| 亚洲一区二区三区视频在线 | 亚洲啪啪综合av一区二区三区| 国产成人午夜99999| 精品99一区二区| 久久国产精品色| 日韩一级片在线观看| 日韩黄色小视频| 91精品国产综合久久香蕉的特点| 亚洲国产美女搞黄色| 欧美系列日韩一区| 亚洲综合成人在线| 欧美三级乱人伦电影| 亚洲高清免费观看| 欧美福利视频一区| 日韩精品乱码免费| 欧美群妇大交群中文字幕| 日韩中文欧美在线|