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

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

?? general.c

?? android-w.song.android.widget
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* general.c -- Stuff that is used by all files. *//* Copyright (C) 1987-2009 Free Software Foundation, Inc.   This file is part of GNU Bash, the Bourne Again SHell.   Bash is free software: you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation, either version 3 of the License, or   (at your option) any later version.   Bash is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with Bash.  If not, see <http://www.gnu.org/licenses/>.*/#include "config.h"#include "bashtypes.h"#ifndef _MINIX#  include <sys/param.h>#endif#include "posixstat.h"#if defined (HAVE_UNISTD_H)#  include <unistd.h>#endif#include "filecntl.h"#include "bashansi.h"#include <stdio.h>#include "chartypes.h"#include <errno.h>#include "bashintl.h"#include "shell.h"#include "test.h"#include <tilde/tilde.h>#if !defined (errno)extern int errno;#endif /* !errno */extern int expand_aliases;extern int interactive_comments;extern int check_hashed_filenames;extern int source_uses_path;extern int source_searches_cwd;static char *bash_special_tilde_expansions __P((char *));static int unquoted_tilde_word __P((const char *));static void initialize_group_array __P((void));/* A standard error message to use when getcwd() returns NULL. */const char * const bash_getcwd_errstr = N_("getcwd: cannot access parent directories");/* Do whatever is necessary to initialize `Posix mode'. */voidposix_initialize (on)     int on;{  /* Things that should be turned on when posix mode is enabled. */  if (on != 0)    {      interactive_comments = source_uses_path = expand_aliases = 1;      source_searches_cwd = 0;    }  /* Things that should be turned on when posix mode is disabled. */  if (on == 0)    {      source_searches_cwd = 1;      expand_aliases = interactive_shell;    }}/* **************************************************************** *//*								    *//*  Functions to convert to and from and display non-standard types *//*								    *//* **************************************************************** */#if defined (RLIMTYPE)RLIMTYPEstring_to_rlimtype (s)     char *s;{  RLIMTYPE ret;  int neg;  ret = 0;  neg = 0;  while (s && *s && whitespace (*s))    s++;  if (s && (*s == '-' || *s == '+'))    {      neg = *s == '-';      s++;    }  for ( ; s && *s && DIGIT (*s); s++)    ret = (ret * 10) + TODIGIT (*s);  return (neg ? -ret : ret);}voidprint_rlimtype (n, addnl)     RLIMTYPE n;     int addnl;{  char s[INT_STRLEN_BOUND (RLIMTYPE) + 1], *p;  p = s + sizeof(s);  *--p = '\0';  if (n < 0)    {      do	*--p = '0' - n % 10;      while ((n /= 10) != 0);      *--p = '-';    }  else    {      do	*--p = '0' + n % 10;      while ((n /= 10) != 0);    }  printf ("%s%s", p, addnl ? "\n" : "");}#endif /* RLIMTYPE *//* **************************************************************** *//*								    *//*		       Input Validation Functions		    *//*								    *//* **************************************************************** *//* Return non-zero if all of the characters in STRING are digits. */intall_digits (string)     char *string;{  register char *s;  for (s = string; *s; s++)    if (DIGIT (*s) == 0)      return (0);  return (1);}/* Return non-zero if the characters pointed to by STRING constitute a   valid number.  Stuff the converted number into RESULT if RESULT is   not null. */intlegal_number (string, result)     const char *string;     intmax_t *result;{  intmax_t value;  char *ep;  if (result)    *result = 0;  errno = 0;  value = strtoimax (string, &ep, 10);  if (errno || ep == string)    return 0;	/* errno is set on overflow or underflow */  /* Skip any trailing whitespace, since strtoimax does not. */  while (whitespace (*ep))    ep++;  /* If *string is not '\0' but *ep is '\0' on return, the entire string     is valid. */  if (string && *string && *ep == '\0')    {      if (result)	*result = value;      /* The SunOS4 implementation of strtol() will happily ignore	 overflow conditions, so this cannot do overflow correctly	 on those systems. */      return 1;    }      return (0);}/* Return 1 if this token is a legal shell `identifier'; that is, it consists   solely of letters, digits, and underscores, and does not begin with a   digit. */intlegal_identifier (name)     char *name;{  register char *s;  unsigned char c;  if (!name || !(c = *name) || (legal_variable_starter (c) == 0))    return (0);  for (s = name + 1; (c = *s) != 0; s++)    {      if (legal_variable_char (c) == 0)	return (0);    }  return (1);}/* Make sure that WORD is a valid shell identifier, i.e.   does not contain a dollar sign, nor is quoted in any way.  Nor   does it consist of all digits.  If CHECK_WORD is non-zero,   the word is checked to ensure that it consists of only letters,   digits, and underscores. */intcheck_identifier (word, check_word)     WORD_DESC *word;     int check_word;{  if ((word->flags & (W_HASDOLLAR|W_QUOTED)) || all_digits (word->word))    {      internal_error (_("`%s': not a valid identifier"), word->word);      return (0);    }  else if (check_word && legal_identifier (word->word) == 0)    {      internal_error (_("`%s': not a valid identifier"), word->word);      return (0);    }  else    return (1);}/* Return 1 if STRING comprises a valid alias name.  The shell accepts   essentially all characters except those which must be quoted to the   parser (which disqualifies them from alias expansion anyway) and `/'. */intlegal_alias_name (string, flags)     char *string;     int flags;{  register char *s;  for (s = string; *s; s++)    if (shellbreak (*s) || shellxquote (*s) || shellexp (*s) || (*s == '/'))      return 0;  return 1;}/* Returns non-zero if STRING is an assignment statement.  The returned value   is the index of the `=' sign. */intassignment (string, flags)     const char *string;     int flags;{  register unsigned char c;  register int newi, indx;  c = string[indx = 0];#if defined (ARRAY_VARS)  if ((legal_variable_starter (c) == 0) && (flags == 0 || c != '[')) /* ] */#else  if (legal_variable_starter (c) == 0)#endif    return (0);  while (c = string[indx])    {      /* The following is safe.  Note that '=' at the start of a word	 is not an assignment statement. */      if (c == '=')	return (indx);#if defined (ARRAY_VARS)      if (c == '[')	{	  newi = skipsubscript (string, indx, 0);	  if (string[newi++] != ']')	    return (0);	  if (string[newi] == '+' && string[newi+1] == '=')	    return (newi + 1);	  return ((string[newi] == '=') ? newi : 0);	}#endif /* ARRAY_VARS */      /* Check for `+=' */      if (c == '+' && string[indx+1] == '=')	return (indx + 1);      /* Variable names in assignment statements may contain only letters,	 digits, and `_'. */      if (legal_variable_char (c) == 0)	return (0);      indx++;    }  return (0);}/* **************************************************************** *//*								    *//*	     Functions to manage files and file descriptors	    *//*								    *//* **************************************************************** *//* A function to unset no-delay mode on a file descriptor.  Used in shell.c   to unset it on the fd passed as stdin.  Should be called on stdin if   readline gets an EAGAIN or EWOULDBLOCK when trying to read input. */#if !defined (O_NDELAY)#  if defined (FNDELAY)#    define O_NDELAY FNDELAY#  endif#endif /* O_NDELAY *//* Make sure no-delay mode is not set on file descriptor FD. */intsh_unset_nodelay_mode (fd)     int fd;{  int flags, bflags;  if ((flags = fcntl (fd, F_GETFL, 0)) < 0)    return -1;  bflags = 0;  /* This is defined to O_NDELAY in filecntl.h if O_NONBLOCK is not present     and O_NDELAY is defined. */#ifdef O_NONBLOCK  bflags |= O_NONBLOCK;#endif#ifdef O_NDELAY  bflags |= O_NDELAY;#endif  if (flags & bflags)    {      flags &= ~bflags;      return (fcntl (fd, F_SETFL, flags));    }  return 0;}/* Return 1 if file descriptor FD is valid; 0 otherwise. */intsh_validfd (fd)     int fd;{  return (fcntl (fd, F_GETFD, 0) >= 0);}intfd_ispipe (fd)     int fd;{  errno = 0;  if (lseek ((fd), 0L, SEEK_CUR) < 0)    return (errno == ESPIPE);  return 0;}/* There is a bug in the NeXT 2.1 rlogind that causes opens   of /dev/tty to fail. */#if defined (__BEOS__)/* On BeOS, opening in non-blocking mode exposes a bug in BeOS, so turn it   into a no-op.  This should probably go away in the future. */#  undef O_NONBLOCK#  define O_NONBLOCK 0#endif /* __BEOS__ */voidcheck_dev_tty (){  int tty_fd;  char *tty;  tty_fd = open ("/dev/tty", O_RDWR|O_NONBLOCK);  if (tty_fd < 0)    {      tty = (char *)ttyname (fileno (stdin));      if (tty == 0)	return;      tty_fd = open (tty, O_RDWR|O_NONBLOCK);    }  close (tty_fd);}/* Return 1 if PATH1 and PATH2 are the same file.  This is kind of   expensive.  If non-NULL STP1 and STP2 point to stat structures   corresponding to PATH1 and PATH2, respectively. */intsame_file (path1, path2, stp1, stp2)     char *path1, *path2;     struct stat *stp1, *stp2;{  struct stat st1, st2;  if (stp1 == NULL)    {      if (stat (path1, &st1) != 0)	return (0);      stp1 = &st1;    }  if (stp2 == NULL)    {      if (stat (path2, &st2) != 0)	return (0);      stp2 = &st2;    }  return ((stp1->st_dev == stp2->st_dev) && (stp1->st_ino == stp2->st_ino));}/* Move FD to a number close to the maximum number of file descriptors   allowed in the shell process, to avoid the user stepping on it with   redirection and causing us extra work.  If CHECK_NEW is non-zero,   we check whether or not the file descriptors are in use before   duplicating FD onto them.  MAXFD says where to start checking the   file descriptors.  If it's less than 20, we get the maximum value   available from getdtablesize(2). */intmove_to_high_fd (fd, check_new, maxfd)     int fd, check_new, maxfd;{  int script_fd, nfds, ignore;  if (maxfd < 20)    {      nfds = getdtablesize ();      if (nfds <= 0)	nfds = 20;      if (nfds > HIGH_FD_MAX)	nfds = HIGH_FD_MAX;		/* reasonable maximum */    }  else    nfds = maxfd;  for (nfds--; check_new && nfds > 3; nfds--)    if (fcntl (nfds, F_GETFD, &ignore) == -1)      break;  if (nfds > 3 && fd != nfds && (script_fd = dup2 (fd, nfds)) != -1)    {      if (check_new == 0 || fd != fileno (stderr))	/* don't close stderr */	close (fd);      return (script_fd);    }  /* OK, we didn't find one less than our artificial maximum; return the     original file descriptor. */  return (fd);} /* Return non-zero if the characters from SAMPLE are not all valid   characters to be found in the first line of a shell script.  We   check up to the first newline, or SAMPLE_LEN, whichever comes first.   All of the characters must be printable or whitespace. */intcheck_binary_file (sample, sample_len)     char *sample;     int sample_len;{  register int i;  unsigned char c;  for (i = 0; i < sample_len; i++)    {      c = sample[i];      if (c == '\n')	return (0);      if (c == '\0')	return (1);    }  return (0);}/* **************************************************************** *//*								    *//*		    Functions to manipulate pipes		    *//*								    *//* **************************************************************** */intsh_openpipe (pv)     int *pv;{  int r;  if ((r = pipe (pv)) < 0)    return r;  pv[0] = move_to_high_fd (pv[0], 1, 64);  pv[1] = move_to_high_fd (pv[1], 1, 64);  return 0;  }intsh_closepipe (pv)     int *pv;{  if (pv[0] >= 0)    close (pv[0]);  if (pv[1] >= 0)    close (pv[1]);  pv[0] = pv[1] = -1;  return 0;}/* **************************************************************** *//*								    *//*		    Functions to inspect pathnames		    *//*								    *//* **************************************************************** */intfile_exists (fn)     char *fn;{  struct stat sb;  return (stat (fn, &sb) == 0);}intfile_isdir (fn)     char *fn;{  struct stat sb;  return ((stat (fn, &sb) == 0) && S_ISDIR (sb.st_mode));}intfile_iswdir (fn)     char *fn;{  return (file_isdir (fn) && sh_eaccess (fn, W_OK) == 0);}/* Return 1 if STRING is "." or "..", optionally followed by a directory   separator */intdot_or_dotdot (string)     const char *string;{  if (string == 0 || *string == '\0' || *string != '.')    return (0);  /* string[0] == '.' */  if (PATHSEP(string[1]) || (string[1] == '.' && PATHSEP(string[2])))    return (1);  return (0);}/* Return 1 if STRING contains an absolute pathname, else 0.  Used by `cd'   to decide whether or not to look up a directory name in $CDPATH. */intabsolute_pathname (string)     const char *string;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级专区免费大片| 国产一区二区三区在线观看免费视频 | 中文字幕一区二区三中文字幕| 国产精品99久久久久久似苏梦涵| 欧美精品一区二区在线播放| 国产一区三区三区| 国产精品视频一二三区| 7777精品伊人久久久大香线蕉的| 午夜电影网一区| 精品日韩在线一区| 亚洲婷婷在线视频| 在线日韩一区二区| 日本三级亚洲精品| 国产色一区二区| 色婷婷久久久久swag精品 | 一本色道久久综合狠狠躁的推荐| 伊人一区二区三区| 欧美高清激情brazzers| 国内不卡的二区三区中文字幕| 国产日韩欧美精品电影三级在线| 91免费观看视频| 三级不卡在线观看| 国产欧美综合在线观看第十页| 色综合久久久久综合体桃花网| 天天影视涩香欲综合网 | 91精品国产综合久久精品app | 久久久一区二区三区| 久久精品国产亚洲5555| 国产精品每日更新在线播放网址 | 成人黄色电影在线 | 精品少妇一区二区三区在线播放| 国产精品一区二区你懂的| 亚洲裸体在线观看| 精品久久99ma| 色94色欧美sute亚洲13| 精品系列免费在线观看| 亚洲精品美腿丝袜| 久久午夜电影网| 欧美色视频在线观看| 国产精品18久久久久久vr| 亚洲最大成人网4388xx| 久久综合久久综合九色| 精品视频123区在线观看| 成人午夜视频在线观看| 奇米一区二区三区av| 亚洲免费观看在线观看| 久久精品亚洲乱码伦伦中文| 欧美久久婷婷综合色| 不卡在线观看av| 国产在线视视频有精品| 日韩avvvv在线播放| 亚洲精品伦理在线| 国产网站一区二区| 日韩欧美成人激情| 欧美日韩免费观看一区二区三区| 成人白浆超碰人人人人| 激情综合网av| 日韩综合小视频| 亚洲视频你懂的| 国产精品伦一区| 国产亚洲欧美一区在线观看| 成人一区二区三区中文字幕| 国产精品色婷婷| 成人精品高清在线| 久久精品亚洲精品国产欧美kt∨ | 欧美日韩亚洲综合在线| 91免费在线看| 97久久人人超碰| 成人午夜在线播放| 高清视频一区二区| 国产一区二区中文字幕| 久久精品av麻豆的观看方式| 亚洲成人综合网站| 亚洲国产一区二区三区青草影视 | 欧美三级蜜桃2在线观看| 91网站黄www| 色悠久久久久综合欧美99| 91色在线porny| 色综合久久综合| 色偷偷成人一区二区三区91| 93久久精品日日躁夜夜躁欧美| 国产一区二区日韩精品| 蜜桃久久久久久久| 国产亚洲一区二区在线观看| 国产精品1区二区.| 精品国产亚洲在线| 懂色av一区二区三区免费观看| 亚洲色欲色欲www| 国产精品麻豆一区二区| 中文字幕欧美一区| 亚洲视频精选在线| 一区二区三区资源| 亚洲一卡二卡三卡四卡五卡| 亚洲一级二级三级在线免费观看| 洋洋av久久久久久久一区| 夜夜嗨av一区二区三区四季av| 亚洲电影一级黄| 欧美96一区二区免费视频| 精品亚洲欧美一区| 国产电影一区在线| 色婷婷综合久久久中文一区二区| 欧美自拍偷拍午夜视频| 欧美一级片在线看| 久久久精品日韩欧美| 亚洲天堂福利av| 在线电影国产精品| 亚洲乱码国产乱码精品精可以看| 亚洲激情图片小说视频| 天天综合网 天天综合色| 激情小说欧美图片| 岛国精品一区二区| 在线观看一区不卡| 日韩欧美国产精品一区| 日本一区二区三区久久久久久久久不| 国产精品久99| 午夜精品久久久久久久| 国产美女av一区二区三区| 97se狠狠狠综合亚洲狠狠| 91精品国产综合久久香蕉麻豆 | 日韩三级视频在线看| 欧美国产日韩一二三区| 亚洲最新视频在线播放| 国产揄拍国内精品对白| 在线观看av一区| 精品剧情在线观看| 一区二区三区在线视频播放| 激情文学综合丁香| 欧美日韩国产乱码电影| 亚洲国产精品黑人久久久| 午夜精品一区二区三区三上悠亚| 国产东北露脸精品视频| 欧美一区二区三区免费大片| 最新中文字幕一区二区三区| 老司机一区二区| 色婷婷激情综合| 欧美经典一区二区| 欧美a一区二区| 在线观看亚洲a| 亚洲国产精品国自产拍av| 久久精品久久综合| 欧美亚洲另类激情小说| 欧美精品一区二区三区四区| 亚洲图片自拍偷拍| 成人av网址在线| 欧美精品一区二区精品网| 午夜免费久久看| 欧美在线999| 中文字幕字幕中文在线中不卡视频| 久久av老司机精品网站导航| 精品1区2区3区| 亚洲自拍都市欧美小说| av男人天堂一区| 久久久www成人免费无遮挡大片| 视频一区中文字幕国产| 日本韩国欧美一区二区三区| 中文字幕一区二区三区在线观看| 国产精选一区二区三区| 精品国免费一区二区三区| 天天操天天色综合| 欧美在线影院一区二区| 亚洲主播在线观看| 在线观看欧美日本| 伊人色综合久久天天人手人婷| av在线一区二区| 中文字幕日本不卡| k8久久久一区二区三区| **欧美大码日韩| 色噜噜狠狠成人网p站| 国产精品美女一区二区三区| 国产a视频精品免费观看| 久久久久久久久久久黄色| 国内精品免费**视频| 精品国产91亚洲一区二区三区婷婷| 美女被吸乳得到大胸91| 精品久久国产字幕高潮| 国产成人在线视频免费播放| 欧美国产精品劲爆| 91一区二区在线| 一区二区三区欧美亚洲| 欧美色图12p| 免费看精品久久片| 久久亚洲一区二区三区四区| 国产美女精品在线| |精品福利一区二区三区| 在线观看视频一区二区| 婷婷六月综合网| 欧美大片顶级少妇| 丁香网亚洲国际| 亚洲欧美日韩国产一区二区三区| 91在线一区二区三区| 亚洲一区二区三区视频在线播放| 欧美日韩国产bt| 毛片av一区二区| 欧美电影免费观看高清完整版| 久久久综合精品| 国产精品视频一二| 欧美主播一区二区三区美女| 青娱乐精品视频| 国产精品久久久久影视| 欧美在线免费视屏|