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

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

?? pathutil.c

?? BCAST Implementation for NS2
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright (c) 2000, 2001 by Martin C. Shepherd. *  * All rights reserved. *  * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, and/or sell copies of the Software, and to permit persons * to whom the Software is furnished to do so, provided that the above * copyright notice(s) and this permission notice appear in all copies of * the Software and that both the above copyright notice(s) and this * permission notice appear in supporting documentation. *  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *  * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, use * or other dealings in this Software without prior written authorization * of the copyright holder. */#include <stdio.h>#include <stdlib.h>#include <limits.h>#include <errno.h>#include <string.h>#include <ctype.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include "pathutil.h"/*....................................................................... * Create a new PathName object. * * Output: *  return  PathName *  The new object, or NULL on error. */PathName *_new_PathName(void){  PathName *path;  /* The object to be returned *//* * Allocate the container. */  path = (PathName *)malloc(sizeof(PathName));  if(!path) {    fprintf(stderr, "_new_PathName: Insufficient memory.\n");    return NULL;  };/* * Before attempting any operation that might fail, initialize the * container at least up to the point at which it can safely be passed * to _del_PathName(). */  path->name = NULL;  path->dim = 0;/* * Figure out the maximum length of an expanded pathname. */  path->dim = _pu_pathname_dim();  if(path->dim == 0)    return _del_PathName(path);/* * Allocate the pathname buffer. */  path->name = (char *)malloc(path->dim * sizeof(char));  if(!path->name) {    fprintf(stderr,	  "_new_PathName: Insufficient memory to allocate pathname buffer.\n");    return _del_PathName(path);  };  return path;}/*....................................................................... * Delete a PathName object. * * Input: *  path   PathName *  The object to be deleted. * Output: *  return PathName *  The deleted object (always NULL). */PathName *_del_PathName(PathName *path){  if(path) {    if(path->name)      free(path->name);    free(path);  };  return NULL;}/*....................................................................... * Return the pathname to a zero-length string. * * Input: *  path     PathName *  The pathname container. * Output: *  return       char *  The cleared pathname buffer, or NULL on error. */char *_pn_clear_path(PathName *path){/* * Check the arguments. */  if(!path) {    fprintf(stderr, "_pn_clear_path: NULL argument.\n");    return NULL;  };  path->name[0] = '\0';  return path->name;}/*....................................................................... * Append a string to a pathname, increasing the size of the pathname * buffer if needed. * * Input: *  path        PathName *  The pathname container. *  string    const char *  The string to be appended to the pathname. *                          Note that regardless of the slen argument, *                          this should be a '\0' terminated string. *  slen             int    The maximum number of characters to append *                          from string[], or -1 to append the whole *                          string. *  remove_escapes   int    If true, remove the backslashes that escape *                          spaces, tabs, backslashes etc.. * Output: *  return          char *  The pathname string path->name[], which may *                          have been reallocated, or NULL if there was *                          insufficient memory to extend the pathname. */char *_pn_append_to_path(PathName *path, const char *string, int slen,			int remove_escapes){  int pathlen;     /* The length of the pathname */  int i;/* * Check the arguments. */  if(!path || !string) {    fprintf(stderr, "_pn_append_to_path: NULL argument(s).\n");    return NULL;  };/* * Get the current length of the pathname. */  pathlen = strlen(path->name);/* * How many characters should be appended? */  if(slen < 0 || slen > strlen(string))    slen = strlen(string);/* * Resize the pathname if needed. */  if(!_pn_resize_path(path, pathlen + slen))    return NULL;/* * Append the string to the output pathname, removing any escape * characters found therein. */  if(remove_escapes) {    int is_escape = 0;    for(i=0; i<slen; i++) {      is_escape = !is_escape && string[i] == '\\';      if(!is_escape)	path->name[pathlen++] = string[i];    };/* * Terminate the string. */    path->name[pathlen] = '\0';  } else {/* * Append the string directly to the pathname. */    memcpy(path->name + pathlen, string, slen);    path->name[pathlen + slen] = '\0';  };  return path->name;}/*....................................................................... * Prepend a string to a pathname, increasing the size of the pathname * buffer if needed. * * Input: *  path        PathName *  The pathname container. *  string    const char *  The string to be prepended to the pathname. *                          Note that regardless of the slen argument, *                          this should be a '\0' terminated string. *  slen             int    The maximum number of characters to prepend *                          from string[], or -1 to append the whole *                          string. *  remove_escapes   int    If true, remove the backslashes that escape *                          spaces, tabs, backslashes etc.. * Output: *  return          char *  The pathname string path->name[], which may *                          have been reallocated, or NULL if there was *                          insufficient memory to extend the pathname. */char *_pn_prepend_to_path(PathName *path, const char *string, int slen,			  int remove_escapes){  int pathlen;     /* The length of the pathname */  int shift;       /* The number of characters to shift the suffix by */  int i,j;/* * Check the arguments. */  if(!path || !string) {    fprintf(stderr, "_pn_prepend_to_path: NULL argument(s).\n");    return NULL;  };/* * Get the current length of the pathname. */  pathlen = strlen(path->name);/* * How many characters should be appended? */  if(slen < 0 || slen > strlen(string))    slen = strlen(string);/* * Work out how far we need to shift the original path string to make * way for the new prefix. When removing escape characters, we need * final length of the new prefix, after unescaped backslashes have * been removed. */  if(remove_escapes) {    int is_escape = 0;    for(shift=0,i=0; i<slen; i++) {      is_escape = !is_escape && string[i] == '\\';      if(!is_escape)	shift++;    };  } else {    shift = slen;  };/* * Resize the pathname if needed. */  if(!_pn_resize_path(path, pathlen + shift))    return NULL;/* * Make room for the prefix at the beginning of the string. */  memmove(path->name + shift, path->name, pathlen+1);/* * Copy the new prefix into the vacated space at the beginning of the * output pathname, removing any escape characters if needed. */  if(remove_escapes) {    int is_escape = 0;    for(i=j=0; i<slen; i++) {      is_escape = !is_escape && string[i] == '\\';      if(!is_escape)	path->name[j++] = string[i];    };

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级电影一区| ww久久中文字幕| 精品一区二区在线看| 亚洲精品在线观看网站| 国产精品影音先锋| 亚洲国产一二三| 精品剧情v国产在线观看在线| 韩日av一区二区| 亚洲欧美日韩人成在线播放| 91精品国产福利| 日本大香伊一区二区三区| 看电视剧不卡顿的网站| 亚洲裸体xxx| 日本一区二区免费在线观看视频 | 在线成人免费视频| 色综合av在线| 97se狠狠狠综合亚洲狠狠| jiyouzz国产精品久久| 国产不卡在线视频| 免费在线观看不卡| 日韩成人伦理电影在线观看| 婷婷综合另类小说色区| 成人黄动漫网站免费app| 国产99久久久国产精品潘金 | 91丨porny丨最新| 91精品国产一区二区人妖| 精品久久久久99| 精品国产凹凸成av人网站| 91麻豆精品一区二区三区| 久久国产婷婷国产香蕉| 亚洲成人动漫在线观看| 亚洲欧美一区二区久久| 中文字幕欧美日本乱码一线二线 | 国产日韩av一区二区| 欧美xxxx老人做受| 色网站国产精品| 色综合天天性综合| 99re66热这里只有精品3直播 | 国产精品国产三级国产aⅴ入口| 欧美高清性hdvideosex| 久久久久久久av麻豆果冻| 亚洲欧美日韩一区二区三区在线观看 | 色8久久人人97超碰香蕉987| 欧美精品乱码久久久久久按摩| 欧美电视剧免费全集观看| 在线看不卡av| 午夜精品123| 99在线视频精品| 欧美成人综合网站| 五月婷婷激情综合网| 国产91对白在线观看九色| 欧美绝品在线观看成人午夜影视| 欧美xingq一区二区| 综合久久国产九一剧情麻豆| 久久精品国产精品青草| 欧美性感一区二区三区| 樱桃视频在线观看一区| 国产呦萝稀缺另类资源| 激情久久五月天| 国产午夜精品一区二区三区嫩草| 青青草视频一区| 国产亚洲综合色| 欧美日韩在线三级| 国产成人av电影在线| 国产亚洲精品精华液| 国产夫妻精品视频| 中文字幕一区在线| 91国模大尺度私拍在线视频| 亚洲视频一二三区| 欧美人妇做爰xxxⅹ性高电影 | 蜜臀av性久久久久蜜臀aⅴ流畅 | 中文字幕一区二区三区av| 一本到一区二区三区| 亚洲国产成人porn| 在线综合亚洲欧美在线视频| 夜夜嗨av一区二区三区| 欧美人牲a欧美精品| 国产福利一区二区三区在线视频| 666欧美在线视频| 精品亚洲porn| 一区二区三区在线观看国产| 欧美军同video69gay| 国产制服丝袜一区| 亚洲成国产人片在线观看| 欧美大度的电影原声| 一本色道久久加勒比精品| 美女国产一区二区| 国产精品超碰97尤物18| 精品久久久久久久久久久久久久久 | 中文字幕乱码久久午夜不卡 | 国产精品全国免费观看高清| 欧美电影一区二区| 成人国产精品免费观看视频| 久久国产精品第一页| 亚洲午夜久久久久久久久电影网| 国产欧美va欧美不卡在线| 欧美三级电影在线观看| 成人av免费在线播放| 国产美女在线精品| 经典一区二区三区| 国精产品一区一区三区mba视频| 日韩精品视频网| 免费成人美女在线观看.| 国内精品国产三级国产a久久| 另类欧美日韩国产在线| 九九视频精品免费| 色婷婷综合久久久中文一区二区 | 亚洲蜜臀av乱码久久精品 | 中文字幕精品一区二区精品绿巨人 | 久久精品日产第一区二区三区高清版| 欧美三级资源在线| 欧美日韩激情一区二区| 欧美午夜精品一区二区蜜桃| 91黄色在线观看| 在线免费观看日韩欧美| 欧美最新大片在线看| 欧美理论在线播放| 久久亚洲免费视频| 国产精品久久久久久久午夜片| 日本一区免费视频| 亚洲视频免费观看| 日韩国产精品久久久久久亚洲| 蜜臀av国产精品久久久久| 成人一级视频在线观看| 91黄视频在线观看| 精品国产污污免费网站入口 | 91蜜桃网址入口| 欧美一区二区精品久久911| 久久久激情视频| 亚洲国产精品一区二区久久 | 亚洲国产婷婷综合在线精品| 久久成人综合网| 在线观看视频欧美| 亚洲欧美影音先锋| 精品在线亚洲视频| 欧美日韩性生活| 一色屋精品亚洲香蕉网站| 国产真实乱对白精彩久久| 欧美日韩亚洲另类| 国产精品毛片高清在线完整版| 天天色图综合网| 欧美日本一道本| 亚洲超碰97人人做人人爱| 国产.欧美.日韩| 国产亚洲综合性久久久影院| 日韩av中文字幕一区二区| 欧美艳星brazzers| 亚洲成人1区2区| 欧美美女一区二区在线观看| 一区二区在线电影| 欧美午夜精品久久久久久孕妇| 亚洲精品一二三| 91丨九色丨蝌蚪丨老版| 中文字幕一区二区三区乱码在线 | 欧美日韩1234| 极品少妇xxxx精品少妇偷拍| 日韩欧美国产精品| 秋霞午夜av一区二区三区 | 国产精品久久久久毛片软件| 日本精品免费观看高清观看| 一区二区欧美视频| 日韩欧美中文字幕一区| 国产91清纯白嫩初高中在线观看| 国产视频不卡一区| 欧美性高清videossexo| 久国产精品韩国三级视频| 国产精品伦一区二区三级视频| 91丝袜美女网| 国产伦精品一区二区三区免费迷 | 成人深夜在线观看| 亚洲成av人影院在线观看网| 日本一区二区视频在线| 欧美日韩亚洲丝袜制服| 国产成人夜色高潮福利影视| 一区二区三区91| 中文字幕亚洲成人| 精品理论电影在线观看| 色婷婷久久久综合中文字幕| 国产一本一道久久香蕉| 男女男精品网站| 夜夜亚洲天天久久| 综合久久国产九一剧情麻豆| 精品99999| 欧美不卡在线视频| 欧美丰满一区二区免费视频 | 国产精品一卡二卡| 欧美aa在线视频| 亚洲高清免费视频| 亚洲制服丝袜av| 日韩av一区二区在线影视| 亚洲一区免费在线观看| 亚洲精品国产第一综合99久久 | 不卡一区二区三区四区| 国产精品88av| 成人免费福利片| 色域天天综合网| 欧美日韩一区二区在线观看| 色噜噜狠狠色综合欧洲selulu| 91久久人澡人人添人人爽欧美 | av动漫一区二区|