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

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

?? pathutil.c

?? BCAST Implementation for NS2
?? C
?? 第 1 頁 / 共 2 頁
字號:
  } else {    memcpy(path->name, string, slen);  };  return path->name;}/*....................................................................... * If needed reallocate a given pathname buffer to allow a string of * a given length to be stored in it. * * Input: *  path     PathName *  The pathname container object. *  length     size_t    The required length of the pathname buffer, *                       not including the terminating '\0'. * Output: *  return       char *  The pathname buffer, or NULL if there was *                       insufficient memory (this isn't reported *                       to stderr). */char *_pn_resize_path(PathName *path, size_t length){/* * Check the arguments. */  if(!path) {    fprintf(stderr, "_pn_resize_path: NULL argument(s).\n");    return NULL;  };/* * If the pathname buffer isn't large enough to accomodate a string * of the specified length, attempt to reallocate it with the new * size, plus space for a terminating '\0'. Also add a bit of * head room to prevent too many reallocations if the initial length * turned out to be very optimistic. */  if(length + 1 > path->dim) {    size_t dim =  length + 1 + PN_PATHNAME_INC;    char *name = (char *) realloc(path->name, dim);    if(!name)      return NULL;    path->name = name;    path->dim = dim;  };  return path->name;}/*....................................................................... * Estimate the largest amount of space needed to store a pathname. * * Output: *  return size_t   The number of bytes needed, including space for the *                  terminating '\0'. */size_t _pu_pathname_dim(void){  int maxlen;   /* The return value excluding space for the '\0' *//* * If the POSIX PATH_MAX macro is defined in limits.h, use it. */#ifdef PATH_MAX  maxlen = PATH_MAX;/* * If we have pathconf, use it. */#elif defined(_PC_PATH_MAX)  maxlen = pathconf(FS_ROOT_DIR, _PC_PATH_MAX);  if(maxlen < 0) {    if(errno) {      fprintf(stderr, "pathconf error: %s\n", strerror(errno));      return 0;    };/* * If errno wasn't set then pathconf is telling us that the * pathlength is effectively infinite. We will thus have to * substitute a reasonable guess. */    maxlen = MAX_PATHLEN_FALLBACK;  };/* * None of the above approaches worked, so substitute our fallback * guess. */#else    maxlen = MAX_PATHLEN_FALLBACK;#endif/* * Return the amount of space needed to accomodate a pathname plus * a terminating '\0'. */  return maxlen + 1;}/*....................................................................... * Return non-zero if the specified path name refers to a directory. * * Input: *  pathname  const char *  The path to test. * Output: *  return           int    0 - Not a directory. *                          1 - pathname[] refers to a directory. */int _pu_path_is_dir(const char *pathname){  struct stat statbuf;    /* The file-statistics return buffer *//* * Look up the file attributes. */  if(stat(pathname, &statbuf) < 0)    return 0;/* * Is the file a directory? */  return S_ISDIR(statbuf.st_mode) != 0;}/*....................................................................... * Return non-zero if the specified path name refers to a regular file. * * Input: *  pathname  const char *  The path to test. * Output: *  return           int    0 - Not a regular file. *                          1 - pathname[] refers to a regular file. */int _pu_path_is_file(const char *pathname){  struct stat statbuf;    /* The file-statistics return buffer *//* * Look up the file attributes. */  if(stat(pathname, &statbuf) < 0)    return 0;/* * Is the file a regular file? */  return S_ISREG(statbuf.st_mode) != 0;}/*....................................................................... * Return non-zero if the specified path name refers to an executable. * * Input: *  pathname  const char *  The path to test. * Output: *  return           int    0 - Not an executable file. *                          1 - pathname[] refers to an executable file. */int _pu_path_is_exe(const char *pathname){  struct stat statbuf;    /* The file-statistics return buffer *//* * Look up the file attributes. */  if(stat(pathname, &statbuf) < 0)    return 0;/* * Is the file a regular file which is executable by the current user. */  return S_ISREG(statbuf.st_mode) != 0 &&    (statbuf.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)) &&    access(pathname, X_OK) == 0;}/*....................................................................... * Search backwards for the potential start of a filename. This * looks backwards from the specified index in a given string, * stopping at the first unescaped space or the start of the line. * * Input: *  string  const char *  The string to search backwards in. *  back_from      int    The index of the first character in string[] *                        that follows the pathname. * Output: *  return        char *  The pointer to the first character of *                        the potential pathname, or NULL on error. */char *_pu_start_of_path(const char *string, int back_from){  int i, j;/* * Check the arguments. */  if(!string || back_from < 0) {    fprintf(stderr, "_pu_start_path: Invalid argument(s).\n");    return NULL;  };/* * Search backwards from the specified index. */  for(i=back_from-1; i>=0; i--) {    int c = string[i];/* * Stop on unescaped spaces. */    if(isspace((int)(unsigned char)c)) {/* * The space can't be escaped if we are at the start of the line. */      if(i==0)        break;/* * Find the extent of the escape characters which precedes the space. */      for(j=i-1; j>=0 && string[j]=='\\'; j--)	;/* * If there isn't an odd number of escape characters before the space, * then the space isn't escaped. */      if((i - 1 - j) % 2 == 0)	break;    };  };  return (char *)string + i + 1;}/*....................................................................... * Find the length of a potential filename starting from a given * point. This looks forwards from the specified index in a given string, * stopping at the first unescaped space or the end of the line. * * Input: *  string   const char *  The string to search backwards in. *  start_from      int    The index of the first character of the pathname *                         in string[]. * Output: *  return         char *  The pointer to the character that follows *                         the potential pathname, or NULL on error. */char *_pu_end_of_path(const char *string, int start_from){  int c;             /* The character being examined */  int escaped = 0;   /* True when the next character is escaped */  int i;/* * Check the arguments. */  if(!string || start_from < 0) {    fprintf(stderr, "_pu_end_path: Invalid argument(s).\n");    return NULL;  };/* * Search forwards from the specified index. */  for(i=start_from; (c=string[i]) != '\0'; i++) {    if(escaped) {      escaped = 0;    } else if(isspace((int)(unsigned char) c)) {      break;    } else if(c == '\\') {      escaped = 1;    };  };  return (char *)string + i;}/*....................................................................... * Return non-zero if the specified path name refers to an existing file. * * Input: *  pathname   const char *  The path to test. * Output: *  return            int    0 - The file doesn't exist. *                           1 - The file does exist. */int _pu_file_exists(const char *pathname){  struct stat statbuf;  return stat(pathname, &statbuf) == 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99国内精品| 日本午夜一本久久久综合| 精品国产乱码久久久久久老虎| 在线观看日韩电影| 精品视频在线视频| 欧美午夜精品久久久久久超碰| 欧美在线观看视频一区二区| 色噜噜久久综合| 3d成人动漫网站| 欧美精品一区视频| 国产精品第一页第二页第三页| 中文字幕在线观看不卡视频| 综合中文字幕亚洲| 亚洲一二三四区| 久久精品噜噜噜成人av农村| 韩国精品主播一区二区在线观看 | 国产一区二区三区电影在线观看 | 免费欧美日韩国产三级电影| 午夜一区二区三区在线观看| 日韩vs国产vs欧美| 国产精品 欧美精品| 91美女在线看| 精品蜜桃在线看| 亚洲免费在线看| 久久成人av少妇免费| 国产91精品免费| 欧美日韩在线亚洲一区蜜芽| 精品国产91久久久久久久妲己 | 久久久精品欧美丰满| 中文字幕在线不卡一区| 天天综合天天综合色| 久久不见久久见免费视频1| 成人毛片在线观看| 日韩欧美电影在线| 亚洲男人的天堂一区二区| 蜜臀av亚洲一区中文字幕| 成人国产亚洲欧美成人综合网| 欧美日韩国产经典色站一区二区三区| 26uuu亚洲综合色| 一区二区三区欧美视频| 国产精品 日产精品 欧美精品| 欧美日韩精品一区二区天天拍小说| 久久久综合网站| 免费视频一区二区| 欧美日韩一区二区三区免费看| 中文字幕不卡的av| 精品一区二区在线看| 欧美亚一区二区| 综合久久国产九一剧情麻豆| 九九九久久久精品| 欧美猛男超大videosgay| 国产精品看片你懂得| 国产尤物一区二区在线| 欧美亚洲精品一区| 一区二区三区中文字幕精品精品| 国产精品一卡二卡在线观看| 51精品秘密在线观看| 亚洲国产精品一区二区久久恐怖片| 国产成人亚洲精品青草天美| 欧美一区二区二区| 日韩在线观看一区二区| 99精品视频一区二区三区| 国产欧美精品一区aⅴ影院| 久久99精品久久只有精品| 欧美日韩免费不卡视频一区二区三区| 日韩一区欧美小说| 91网站在线播放| 综合中文字幕亚洲| 色成年激情久久综合| 亚洲欧洲av色图| 成人激情免费电影网址| 国产精品日韩成人| 成人黄色免费短视频| 国产精品女同一区二区三区| 成人黄色大片在线观看| 国产精品乱码久久久久久| 成人丝袜视频网| 中文字幕日韩一区| 日本国产一区二区| 一区二区三区美女| 欧美精品黑人性xxxx| 天使萌一区二区三区免费观看| 欧美日韩成人一区| 毛片基地黄久久久久久天堂| 精品免费一区二区三区| 国产精品888| 亚洲品质自拍视频网站| 欧美性大战久久久久久久蜜臀| 亚洲成人综合网站| 日韩精品一区二区三区老鸭窝| 美国av一区二区| 国产精品狼人久久影院观看方式| 99精品黄色片免费大全| 亚洲福利视频导航| 精品国产乱子伦一区| 成人免费观看男女羞羞视频| 亚洲美女在线一区| 日韩欧美国产电影| 大白屁股一区二区视频| 一区二区高清在线| 精品日韩一区二区三区免费视频| 高清国产一区二区三区| 亚洲一区二区在线播放相泽| 日韩精品最新网址| 91麻豆精品一区二区三区| 婷婷开心激情综合| 日本一区二区三区四区| 欧美专区亚洲专区| 国产精品一区二区在线观看不卡| 亚洲欧美成人一区二区三区| 欧美一区二区黄色| 91啪九色porn原创视频在线观看| 三级欧美在线一区| 中文字幕中文字幕一区二区| 3atv在线一区二区三区| 99re亚洲国产精品| 久久国产剧场电影| 亚洲va欧美va人人爽| 久久精品日产第一区二区三区高清版 | 麻豆精品久久久| 自拍偷拍国产亚洲| 久久久久国产精品麻豆| 欧美日韩一级片在线观看| 成人一区二区三区| 麻豆91在线播放| 亚洲bt欧美bt精品| 一级精品视频在线观看宜春院| www国产亚洲精品久久麻豆| 欧美日韩一区高清| 96av麻豆蜜桃一区二区| 国产在线国偷精品免费看| 午夜精品久久久久| 亚洲精品日韩综合观看成人91| xvideos.蜜桃一区二区| 欧美一级电影网站| 欧美日韩亚洲综合在线| 色综合天天综合网天天狠天天 | 伊人性伊人情综合网| 国产情人综合久久777777| 日韩一区二区在线观看| 欧美日本在线一区| 欧美日韩一区久久| 在线看不卡av| 91成人在线观看喷潮| 91视频在线观看| 91丨九色porny丨蝌蚪| 成人精品gif动图一区| 国产xxx精品视频大全| 国产一区二区免费视频| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲综合成人在线| 依依成人精品视频| 亚洲成人第一页| 日韩福利视频导航| 另类小说欧美激情| 国产综合久久久久久鬼色 | 中文字幕一区二区三区不卡| 激情都市一区二区| 91在线视频播放地址| 日本欧美一区二区在线观看| 亚洲五月六月丁香激情| 亚洲一区日韩精品中文字幕| 亚洲午夜在线电影| 首页国产欧美日韩丝袜| 日韩亚洲欧美高清| 天天综合网天天综合色| 亚洲一区二区三区美女| 亚洲五月六月丁香激情| 日本一不卡视频| 国产精品1024| 色呦呦一区二区三区| 欧美自拍丝袜亚洲| 欧美大片在线观看| 久久精品人人爽人人爽| ...xxx性欧美| 日韩国产在线观看一区| 国内偷窥港台综合视频在线播放| 成人黄色网址在线观看| 欧美日韩电影在线| 久久久久久久久久久久久女国产乱 | 蜜桃av一区二区| 国产经典欧美精品| 欧洲在线/亚洲| 欧美精品一区二区三区在线| 中文字幕中文字幕中文字幕亚洲无线| 亚洲一区二区不卡免费| 国产露脸91国语对白| 91色乱码一区二区三区| 日韩情涩欧美日韩视频| 一区在线中文字幕| 久久精工是国产品牌吗| a亚洲天堂av| 日韩精品专区在线| 一区2区3区在线看| 国产成人av网站| 4438亚洲最大| 亚洲精品中文字幕乱码三区| 久久99国产精品麻豆| 欧美婷婷六月丁香综合色| 国产三级精品三级|