PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|Code_Examples|C|grep-2.5|src|system.h =

page 1 of 3



/* Portability cruft.  Include after config.h and sys/types.h.
   Copyright 1996, 1998, 1999, 2000 Free Software Foundation, Inc.

   This program 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 2, or (at your option)
   any later version.

   This program 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 this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.  */

#undef PARAMS
#if defined (__STDC__) && __STDC__
# ifndef _PTR_T
# define _PTR_T
  typedef void * ptr_t;
# endif
# define PARAMS(x) x
#else
# ifndef _PTR_T
# define _PTR_T
  typedef char * ptr_t;
# endif
# define PARAMS(x) ()
#endif

#ifdef HAVE_UNISTD_H
# include <fcntl.h>
# include <unistd.h>
#else
# define O_RDONLY 0
# define SEEK_SET 0
# define SEEK_CUR 1
int open(), read(), close();
#endif

#include <errno.h>
#ifndef errno
extern int errno;
#endif

#ifndef HAVE_STRERROR
extern int sys_nerr;
extern char *sys_errlist[];
# define strerror(E) (0 <= (E) && (E) < sys_nerr ? _(sys_errlist[E]) : _("Unknown system error"))
#endif

/* Some operating systems treat text and binary files differently.  */
#ifdef __BEOS__
# undef O_BINARY /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
#endif
#ifdef HAVE_DOS_FILE_CONTENTS
# include <io.h>
# ifdef HAVE_SETMODE
#  define SET_BINARY(fd)  setmode (fd, O_BINARY)
# else
#  define SET_BINARY(fd)  _setmode (fd, O_BINARY)
# endif
#endif

#ifdef HAVE_DOS_FILE_NAMES
# define IS_SLASH(c) ((c) == '/' || (c) == '\\')
# define FILESYSTEM_PREFIX_LEN(f) ((f)[0] && (f)[1] == ':' ? 2 : 0)
#endif

#ifndef IS_SLASH
# define IS_SLASH(c) ((c) == '/')
#endif

#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(f) 0
#endif

int isdir PARAMS ((char const *));

#ifdef HAVE_DIR_EACCES_BUG
# ifdef EISDIR
#  define is_EISDIR(e, f) \
     ((e) == EISDIR \
      || ((e) == EACCES && isdir (f) && ((e) = EISDIR, 1)))
# else
#  define is_EISDIR(e, f) ((e) == EACCES && isdir (f))
# endif
#endif

#ifndef is_EISDIR
# ifdef EISDIR
#  define is_EISDIR(e, f) ((e) == EISDIR)
# else
#  define is_EISDIR(e, f) 0
# endif
#endif

=1=

= PAGE 1 = NEXT > |2|3

UP TO ROOT | UP TO DIR

Google
 


E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.0215042 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU)