Back to index

lightning-sunbird  0.9+nobinonly
Defines | Typedefs | Functions
portable.h File Reference
#include <sys/select.h>
#include <stdio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define WAITSTATUSTYPE   int
#define WAIT_FLAGS   ( WNOHANG | WUNTRACED )
#define OPENLOG_OPTIONS   ( LOG_PID | LOG_NOWAIT )
#define LDAP_ASYNC_IO
#define NFDBITS   32
#define FD_SETSIZE   32
#define FD_SET(n, p)   ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p)   ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p)   ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
#define FD_ZERO(p)   bzero((char *)(p), sizeof(*(p)))
#define SIG_FN   void /* signal-catching functions return void */
#define TOUPPER(c)   (isascii(c) && islower(c) ? toupper(c) : c)
#define TOLOWER(c)   (isascii(c) && isupper(c) ? tolower(c) : c)
#define USE_TERMIOS
#define TERMIO_TYPE   struct termios
#define TERMFLAG_TYPE   tcflag_t
#define GETATTR(fd, tiop)   tcgetattr((fd), (tiop))
#define SETATTR(fd, tiop)   tcsetattr((fd), TCSANOW /* 0 */, (tiop))
#define GETFLAGS(tio)   (tio).c_lflag
#define SETFLAGS(tio, flags)   (tio).c_lflag = (flags)
#define HAVE_TIME_R
#define GETHOSTBYNAME_BUF_T   GETHOSTBYNAME_buf_t
#define GETHOSTBYNAME(n, r, b, l, e)   gethostbyname_r( n, r, b, l, e )
#define NSLDAPI_CTIME(c, b, l)   ctime_r( c, b, l )
#define HAVE_STRTOK_R
#define STRTOK(s1, s2, l)   (char *)strtok_r( s1, s2, l )
#define SAFEMEMCPY(d, s, n)   memmove( d, s, n )

Typedefs

typedef char GETHOSTBYNAME_buf_t [BUFSIZ]
typedef unsigned long nsldapi_in_addr_t

Functions

char * strtok_r (char *, const char *, char **)

Define Documentation

#define FD_CLR (   n,
  p 
)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))

Definition at line 192 of file portable.h.

#define FD_ISSET (   n,
  p 
)    ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))

Definition at line 193 of file portable.h.

#define FD_SET (   n,
  p 
)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))

Definition at line 191 of file portable.h.

#define FD_SETSIZE   32

Definition at line 190 of file portable.h.

#define FD_ZERO (   p)    bzero((char *)(p), sizeof(*(p)))

Definition at line 194 of file portable.h.

#define GETATTR (   fd,
  tiop 
)    tcgetattr((fd), (tiop))

Definition at line 254 of file portable.h.

#define GETFLAGS (   tio)    (tio).c_lflag

Definition at line 256 of file portable.h.

#define GETHOSTBYNAME (   n,
  r,
  b,
  l,
  e 
)    gethostbyname_r( n, r, b, l, e )

Definition at line 315 of file portable.h.

Definition at line 314 of file portable.h.

Definition at line 341 of file portable.h.

Definition at line 262 of file portable.h.

Definition at line 175 of file portable.h.

#define NFDBITS   32

Definition at line 189 of file portable.h.

#define NSLDAPI_CTIME (   c,
  b,
  l 
)    ctime_r( c, b, l )

Definition at line 334 of file portable.h.

#define OPENLOG_OPTIONS   ( LOG_PID | LOG_NOWAIT )

Definition at line 127 of file portable.h.

#define SAFEMEMCPY (   d,
  s,
  n 
)    memmove( d, s, n )

Definition at line 413 of file portable.h.

#define SETATTR (   fd,
  tiop 
)    tcsetattr((fd), TCSANOW /* 0 */, (tiop))

Definition at line 255 of file portable.h.

#define SETFLAGS (   tio,
  flags 
)    (tio).c_lflag = (flags)

Definition at line 257 of file portable.h.

#define SIG_FN   void /* signal-catching functions return void */

Definition at line 224 of file portable.h.

#define STRTOK (   s1,
  s2,
  l 
)    (char *)strtok_r( s1, s2, l )

Definition at line 343 of file portable.h.

#define TERMFLAG_TYPE   tcflag_t

Definition at line 253 of file portable.h.

#define TERMIO_TYPE   struct termios

Definition at line 252 of file portable.h.

#define TOLOWER (   c)    (isascii(c) && isupper(c) ? tolower(c) : c)

Definition at line 237 of file portable.h.

#define TOUPPER (   c)    (isascii(c) && islower(c) ? toupper(c) : c)

Definition at line 236 of file portable.h.

Definition at line 251 of file portable.h.

#define WAIT_FLAGS   ( WNOHANG | WUNTRACED )

Definition at line 118 of file portable.h.

Definition at line 109 of file portable.h.


Typedef Documentation

typedef char GETHOSTBYNAME_buf_t[BUFSIZ]

Definition at line 313 of file portable.h.

typedef unsigned long nsldapi_in_addr_t

Definition at line 372 of file portable.h.


Function Documentation

char* strtok_r ( char *  ,
const char *  ,
char **   
)

Definition at line 343 of file ncr.c.

{
        register char *spanp;
        register int c, sc;
        char *tok;


        if (s == NULL && (s = *last) == NULL)
                return (NULL);

        /*
         * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
         */
cont:

        c = *s++;
        for (spanp = (char *)delim; (sc = *spanp++) != 0;) {
                if (c == sc)
                        goto cont;
        }

        if (c == 0) {           /* no non-delimiter characters */
                *last = NULL;
                return (NULL);
        }
        tok = s - 1;

        /*
         * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
         * Note that delim must have one NUL; we stop if we see that, too.
         */
        for (;;) {
                c = *s++;
                spanp = (char *)delim;
                do {
                        if ((sc = *spanp++) == c) {
                                if (c == 0)
                                        s = NULL;

                                else
                                        s[-1] = 0;
                                *last = s;
                                return (tok);
                        }
                } while (sc != 0);
        }
        /* NOTREACHED */
}

Here is the caller graph for this function: