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

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

?? xrun.c

?? 數據結構之任意多叉樹的建立和操作
?? C
?? 第 1 頁 / 共 2 頁
字號:
 /*--caller tree op----------------------------------------*/ /*--------------------------------------- fun_name:LevelTraverse author:    date:    2009-03-16 23:33 purpose: traverse the noder as the level order  in:      Caller * out:     none return:  Status: Okay or Do nothing. history: On the 20090316,  Creat it! -----------------------------------------*/ Status LevelTraverse(Caller *tree) {     Caller *th = tree;     Caller *to= NULL;          if(th == NULL) return DONT;     printf("--------------------------------------------------------------------\n");    while(th != NULL)    {        //printf("%s ==>", searchnameasid(th->id));        printf("%d --", th->id);        to = th->next;        while((th != NULL)&&(to != NULL))        {	    //printf("%s -->", searchnameasid(to->id));                        printf("%d --", to->id);            if((th->rear != NULL)&&(to->head != NULL))            {                th->rear->next = to->head;                to->head->front= th->rear;             }            th = to;            to = to->next;        }        while(th->head != NULL)        {            if(th->head->front == NULL) break;            th = th->front;        }	printf("\n");        th = th->head;    }    printf("\n--------------------------------------------------------------------\n");    return (OKAY); }  /*--------------------------------------- fun_name:KillCallerTree author:    date:    2009-03-16 23:33 purpose: free the memory as: one by one node . in: out: return: history: On the 20090316,  Creat it! -----------------------------------------*/ Status KillCallerTree(Caller * tree) {     Caller * tr = tree;     Caller * tf = NULL;          if(tr == NULL)       return DONT;     while(tr != NULL)     {         if((tr->id == 0)||(tr->depth == 0))	{	  break;	}        while(tr->rear != NULL)         {             tr = tr->rear;         }          if(tr->front != NULL)         {             tf = tr->front;         }         else         {             tf = tr->father;         }                       tr->father = NULL;         tr->head  = NULL;         tr->rear  = NULL;         tr->front  = NULL;         tr->next   = NULL;          free(tr);                  tr = tf;     }     return (OKAY); }  /*--------------------------------------- fun_name: AccessCaller author:     date:     20090317 00:14 purpose:  when traverse one tree ,it can accesse the node's information. in:       one node with the type is Caller out:      none return:   Status : okay or do nothing ! history:  On 20090317,  Creat it!           On 20090319,  modify it!-----------------------------------------*/ Status AccessCaller(Caller *cp) {     char yinyin[256];    char *liy = yinyin;    unsigned int lov;    Caller *cpp = NULL;        if(cp == NULL) return DONT;     memset(liy, 0x20, sizeof(char)*256);    liy[256-1] = 0x00;    #if RELEASE    printf("%s", searchnameasid(cp->id));    #else    printf("%d", cp->id);    #endif    if(cp->head != NULL) /* ask his first child */    {        printf("\n ");        lov = (cp->depth + 1)*2;        if((lov < 255)&&(lov>0))        {            liy += lov;             *(liy - 2) = '-';            *(liy - 1) = '>';            *(liy - 0) = 0x00;             printf("%s", yinyin);        }        else        {            *liy = 0x00;        }        }    else     if(cp->next != NULL) /* ask his first buddy*/    {        printf("\n ");        lov = (cp->depth -1)*2;        if(lov < 255)        {            liy += lov;     	    *liy = '.';	    liy++;            *liy = '<';            *(liy+1) = '-';            *(liy+2) = '\n';                    *(liy+3) = 0x20;	    *(liy+4) = 0x00;            printf("%s", yinyin);            lov = 0;            memset(yinyin, 0x20, sizeof(char)*256);            liy = yinyin;        }        else        {            *liy = 0x00;            printf("Too long ! error !\n");        }	/*-------------*/	lov = (cp->depth)*2;	if((lov < 255)&&(lov>0))        {            liy += lov;             *(liy - 2) = '-';            *(liy - 1) = '>';            *(liy - 0) = 0x00;             printf("%s", yinyin);        }        else        {            *liy = 0x00;        }    }    else /* RETURN HIS parents */    {        cpp = cp;        while(cpp != NULL)        {	    if(cpp->father == NULL) break;            printf("\n ");            lov = (cpp->father->depth)*2;            if(lov < 255)            {                liy += lov; 		*liy = '.';		*(liy+1) = '.';		liy += 2;                *liy = '<';                *(liy+1) = '-';                *(liy+2) = 0x00;                        printf("%s", yinyin);            }            else            {                *liy = 0x00;                printf("Too long ! error !\n");            }	               lov = 0;            memset(yinyin, 0x20, sizeof(char)*256);            liy = yinyin;            cpp = cpp->father;	               if(cpp->next != NULL)            {                break;            }        }	/*------------------*/	printf("\n ");	lov = (cpp->depth)*2;	if((lov < 255)&&(lov>0))        {            liy += lov;             *(liy - 2) = '-';            *(liy - 1) = '>';            *(liy - 0) = 0x00;             printf("%s", yinyin);        }        else        {            *liy = 0x00;	}    }    return (OKAY);}  /*--------------------------------------- fun_name: PreOrderTraverse author:    date:     20090311purpose:  pre - travel a treein: out: return: history: -----------------------------------------*/ Status PreOrderTraverse(Caller *Tree, Status (*Visit)(Caller *Branch)) {        if(Tree)     {         if(Visit(Tree))         {             if(PreOrderTraverse(Tree->head, AccessCaller))             {                 if(PreOrderTraverse(Tree->next, AccessCaller))                 {                     return OKAY;                 }             }         }         else         {         return DONT;         }     }     else     {         return OKAY;     } } /*--------------------------------------- fun_name: EmergeBeautifulTree author: date: purpose: BeautifulTree rise , Must: call it after LevelTraversein: out: return: history: 20090320 liyi write here.-----------------------------------------*/ Status EmergeBeautifulTree(Caller * arc){    Caller *to;    Caller *at;    to = arc;    while(to != NULL)    {        at = to;        while(at != NULL)        {            printf("%d", at->id);            if(at->next != NULL)            {                at = at->next;            }            else            {                while(at != NULL)                {                    if(at->head != NULL)                    {                        to = at->head;                        at = NULL;                        break;                    }                    else                    {                        if(at != to)                        {                            at = at->front;                        }                        else                        {                            if(at->front != NULL)                            {                                at->front->next =  NULL; //cut the line                                at = at->front->father;                            }                            else                            {                                at = at->father->front;				to = at;                            }                        }                    }                }            }        }	printf("\n");        }    return (OKAY);}/*--------------------------------------- fun_name:  ScanGetLineDeepauthor: date: purpose: in:      &order ; &depthout:     return:  nonehistory: 20090404 write here-----------------------------------------*/ Lineinfo * ScanGetLineDeep(Caller *ot,int *morder, int *mdeep){  int i = 0;  int depth = 0;  Caller *to;  Caller *tc;  Caller *tn;  Lineinfo *linezero = NULL;  Lineinfo *linetmpe = NULL;  Lineinfo *linenew  = NULL;    if(ot == NULL) return (NULL);  to = ot; tc = to->head;  tn = to->next;  while((tc != NULL) || (tn != NULL))  {    linenew = (Lineinfo *)malloc(sizeof(Lineinfo));    if(linenew == NULL) return (NULL);    linenew->icall      = to->id;    linenew->lcall.y    = to->depth;    linenew->lcall.x    = i;    linenew->lcall.life = to->exeinfo.elapse;    if(i == 0)    {      linezero = linenew;      linetmpe = linezero;      #if (!RELEASE)      printf("i  id  deep eat\n");      #endif    }    else    {      linetmpe->nline = (Lineinfo *)linenew;      linetmpe        = linenew;    }    linenew           = NULL;    depth = (depth >= to->depth)?(depth):(to->depth);    #if (!RELEASE)    printf("%d  %d    %d   %ld\n", i, to->id, to->depth, to->exeinfo.elapse);    #endif    i ++;    if(to->head != NULL)    {      to = to->head;       tc = to;       continue;    }    else    {      tc = NULL;    }    if(to->next != NULL)    {      to = to->next;       tn = to;       continue;    }    else    {      while(to->father != NULL)       {	to = to->father; 	if(to->next != NULL) 	{	  i++;	  to = to->next;	  tn = to;	  break;	}	else	{	  tn = NULL;	}      }    }  }  *morder = i;  *mdeep  = depth;  return (linezero);}/*-------------------------------------------------------------*/void DeleteLinelist(Lineinfo *listhead){  Lineinfo *irecycle = listhead;  Lineinfo *ifree    = NULL;  if(irecycle == NULL) return;  ifree = irecycle;  while(irecycle != NULL)  {    free(ifree);    irecycle = irecycle->nline;    ifree = irecycle;  }}/*--------------------------------------- fun_name: DirectoryOutPutauthor: date: purpose: DirectoryOutPut rise , Must: call it after LevelTraversein: out: return: history: 20090326 liyi write here.-----------------------------------------*/ Status DirectoryOutPut(Caller *toor, const char *pstr){  int i         = 0;  int maxorder  = 0;  int maxdeep   = 0;  int blocksize = 0;  int order     = 0;  int depth     = 0;  int maxcolumn = 0;  Lineinfo *linelist = NULL;  Lineinfo *linehead = NULL;  char *block        = NULL;  FILE *ftree        = NULL;  char fname[LEN_NAME];  char   cmd[256];  char cycle[LEN_CYCLE];  char lenstr = 0;  char *istr  = NULL;  char *bstr  = NULL;  if((toor == NULL) || (pstr == NULL)) return (DONT);  memset(fname,0x00, LEN_NAME*sizeof(char));  memset(cmd,  0x00, 256     *sizeof(char));  memset(cycle, 0x00,LEN_CYCLE*sizeof(char));   sprintf(fname, "%s_call_tree.txt", pstr);     /* compute maxdepth & every node's order */  linehead = ScanGetLineDeep(toor,&maxorder, &maxdeep);    if(linehead == NULL)    exit(1);  linelist = linehead;    #if (!RELEASE)  printf(" %d x %d \n", (maxorder+1), (maxdeep+1)*2);  #endif  /* malloc the mem */  maxcolumn = (maxdeep+1)*2 + LEN_FUNS;  blocksize = (maxorder+1)*maxcolumn;  block     = (char *)malloc(blocksize*sizeof(char));  if(block == NULL)   {    printf("mem alloc error !");    exit(1);  }  memset(block, 0x20, blocksize*sizeof(char));  /* write mem */  while((i <= maxorder) ||(linelist != NULL))  {    order = linelist->lcall.x;    depth = linelist->lcall.y * 2;    /* block[order*maxcolumn + depth] = i + 0x30; */    /* Get the fuction name */    istr   = block + (order*maxcolumn + depth);    bstr   = searchnameasid(linelist->icall);    lenstr = strlen(bstr);    if(lenstr < LEN_FUNS)    {      strncpy(istr, bstr, lenstr);    }    else    {      strncpy(istr, bstr, LEN_FUNS);    }        if((order > 0) && (depth >0))     {      block[order*maxcolumn + depth - 1] = '_';      block[order*maxcolumn + depth - 2] = '-';    }    /* insert the cycle value */    istr   = block+(order * maxcolumn + maxcolumn - 1 - LEN_CYCLE);    sprintf(cycle, "%ld", linelist->lcall.life);    lenstr = strlen(cycle);    strncpy(istr, cycle, lenstr);    istr   = NULL;    lenstr = 0;        block[order * maxcolumn + maxcolumn - 1] = '\n';    block[i     * maxcolumn + maxcolumn - 1] = '\n';    i++;    linelist = linelist->nline;  }  /* rm the file */  sprintf(cmd, "rm -f %s", fname);  system(cmd);  /* new a file -- app_call_tree.txt */  ftree = fopen(fname,"wt");  if(ftree <= 0) exit(1);  /*fwrite the file with mem */  fwrite(block, sizeof(char), blocksize, ftree);  /*fclose file  & free mem*/  fclose(ftree);    memset(cmd, 0x00, 256*sizeof(char));  sprintf(cmd, "cat %s", fname);  system(cmd);  DeleteLinelist(linehead);  free(block);  return (OKAY);}/*-------------------------------------------------------*/ /*extern interface for other file.c*/int open_wiretap(char *appname){    Status x = DONT;    if(appname != NULL)    x  = wiretapinit(appname);    return (x == OKAY)?(1):(0);}void close_wiretap(){  wiretapkill();}void exe_wiretap(unsigned int lastia,                   unsigned int currentia){    cycle ++;    wiretap(&calltree, lastia, currentia);}void babble_wiretap(char *appname){    printf("____________________________________________________________________ \n");    PreOrderTraverse(rootcall, AccessCaller);    printf("\n____________________________________________________________________ \n");    DirectoryOutPut(rootcall, appname);    printf("____________________________________________________________________ \n");    #if (!RELEASE)    //LevelTraverse(rootcall);    //printf("\n~~~~~~~~~~~~~~~~~~The Beutiful 0~~~~~~~~~~~~~~~~\n");    //EmergeBeautifulTree(rootcall);    //printf("\n~~~~~~~~~~~~~~~~~~The Beutiful 1~~~~~~~~~~~~\n");    //printf("\n");    #endif}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费观看高清完整版在线| 久久精品国内一区二区三区| 视频一区欧美精品| 国产久卡久卡久卡久卡视频精品| 97se亚洲国产综合自在线不卡| 欧美一区二区三区视频在线 | 欧美视频一区二区| 国产日韩欧美电影| 老司机免费视频一区二区三区| 91在线观看下载| 久久奇米777| 日本成人超碰在线观看| 欧美视频一区二| 亚洲欧洲av色图| 成人蜜臀av电影| 精品99久久久久久| 秋霞影院一区二区| 欧美四级电影网| 亚洲人成网站在线| 盗摄精品av一区二区三区| 日韩精品一区二区三区三区免费 | 色婷婷av一区二区三区gif| 久久噜噜亚洲综合| 久久国产福利国产秒拍| 欧美男人的天堂一二区| 亚洲一区二区成人在线观看| 91色九色蝌蚪| 一区二区三区在线视频播放| 成人国产亚洲欧美成人综合网| 26uuu亚洲综合色| 精品亚洲国内自在自线福利| 7777精品伊人久久久大香线蕉经典版下载 | 中文字幕在线播放不卡一区| 国产麻豆欧美日韩一区| 欧美精品一区二区在线观看| 久久国产尿小便嘘嘘尿| 在线电影一区二区三区| 亚洲国产欧美日韩另类综合| 在线亚洲免费视频| 亚洲一区影音先锋| 精品视频色一区| 日韩福利电影在线| 精品国产欧美一区二区| 国产成人午夜高潮毛片| 国产精品美女久久久久久久久| 成人黄色在线网站| 一区二区在线观看免费| 在线精品视频小说1| 亚洲成va人在线观看| 欧美电影一区二区| 国产乱码字幕精品高清av| 日本一二三四高清不卡| 成人伦理片在线| 综合分类小说区另类春色亚洲小说欧美| 成人h版在线观看| 一区二区三区欧美亚洲| 欧美久久一区二区| 国产一区视频导航| 日韩伦理电影网| 欧美午夜免费电影| 极品少妇xxxx偷拍精品少妇| 欧美国产日韩亚洲一区| 91久久精品一区二区三| 日韩中文字幕不卡| 久久久三级国产网站| 不卡一区中文字幕| 亚洲国产成人91porn| 亚洲精品一线二线三线| av亚洲精华国产精华精华| 亚洲成a人v欧美综合天堂| 精品国产免费久久| 色婷婷av久久久久久久| 免费在线观看精品| 亚洲少妇最新在线视频| 91精品免费在线观看| 99国产精品久久久久久久久久久 | 久久久久久亚洲综合| 91在线视频在线| 久久国产日韩欧美精品| 亚洲黄色小说网站| 久久夜色精品一区| 欧美三级视频在线| 国产成人精品三级| 日本成人在线一区| 亚洲综合小说图片| 亚洲精品日产精品乱码不卡| 亚洲国产精品激情在线观看| 成人性色生活片免费看爆迷你毛片| 亚洲精品大片www| 久久免费美女视频| 欧美午夜精品一区二区三区| 国产精品一卡二| 日韩高清不卡在线| 一区二区免费视频| 欧美激情在线观看视频免费| 91精品国产综合久久精品麻豆| 91在线国产福利| 成人av手机在线观看| 国产麻豆视频一区二区| 久久国产精品一区二区| 亚洲第一综合色| 亚洲精品成人少妇| 国产精品久久久久精k8| 国产亚洲精品中文字幕| 日韩一区二区在线看| 欧美日韩国产免费| 91黄色免费版| 91激情五月电影| 色香蕉成人二区免费| 成人美女在线观看| 国产成人精品综合在线观看| 国内精品写真在线观看| 久久成人麻豆午夜电影| 美女网站色91| 久久99九九99精品| 久久黄色级2电影| 九九在线精品视频| 国内精品视频666| 国内精品伊人久久久久av一坑 | 久久伊人中文字幕| 91精品国产高清一区二区三区蜜臀| 欧美三级中文字幕| 欧美日韩精品一区二区| 欧美区视频在线观看| 欧美天堂亚洲电影院在线播放| 99久久精品国产麻豆演员表| 不卡av在线免费观看| 91在线观看免费视频| 91天堂素人约啪| 91黄色免费看| 日韩欧美在线网站| 日韩女优毛片在线| 欧美精品一区二区三区蜜臀 | 日本一区二区成人在线| 国产精品理论片| 一区二区三区欧美在线观看| 性做久久久久久免费观看欧美| 天天爽夜夜爽夜夜爽精品视频| 青青草97国产精品免费观看| 免费成人在线视频观看| 国产自产2019最新不卡| 不卡区在线中文字幕| 欧美天堂一区二区三区| 精品国产一区二区三区av性色| 国产精品乱人伦中文| 亚洲宅男天堂在线观看无病毒| 日本在线不卡一区| 国产精品资源在线看| 在线亚洲+欧美+日本专区| 日韩精品一区二区三区四区| 中文字幕精品综合| 午夜亚洲福利老司机| 国产成人亚洲综合a∨猫咪| 99这里都是精品| 欧美一级在线观看| 国产精品国产三级国产a| 日韩精品福利网| av一区二区久久| 日韩欧美中文字幕精品| 亚洲欧美日韩精品久久久久| 美国av一区二区| 91蜜桃视频在线| 久久综合久久鬼色| 亚洲自拍偷拍九九九| 高清不卡一区二区| 日韩一区二区影院| 一区二区三区国产精华| 国产精品一线二线三线| 正在播放一区二区| 亚洲日本va在线观看| 国模冰冰炮一区二区| 欧美日韩欧美一区二区| 国产精品网站导航| 激情综合网最新| 欧美一区二区在线免费播放| 综合欧美一区二区三区| 国产成a人无v码亚洲福利| 91精品国产美女浴室洗澡无遮挡| 18成人在线观看| 国产v综合v亚洲欧| 久久美女高清视频| 老鸭窝一区二区久久精品| 欧美久久久久中文字幕| 亚洲欧美区自拍先锋| www.爱久久.com| 国产日韩三级在线| 国产一区二区三区香蕉| 日韩视频一区二区| 天天影视网天天综合色在线播放 | 欧美日韩一区二区欧美激情| 一区在线观看视频| 99久久免费国产| 中文字幕亚洲一区二区va在线| 国产盗摄一区二区| 久久蜜桃一区二区| 国产99精品在线观看| 久久伊人蜜桃av一区二区| 国产在线精品国自产拍免费| 日韩免费看网站| 精品一二三四区|