Public feed #600786

Something

public text v1 · immutable
Raw Edit
·published 2007-07-03 02:47 UTC
rendered paste body
# 1 "main.c"
# 1 "<inbyggd>"
# 1 "<kommandorad>"
# 1 "main.c"
# 26 "main.c"
# 1 "/usr/include/sys/types.h" 1 3 4
# 27 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/features.h" 1 3 4
# 323 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 313 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 314 "/usr/include/sys/cdefs.h" 2 3 4
# 324 "/usr/include/features.h" 2 3 4
# 346 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4



# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 5 "/usr/include/gnu/stubs.h" 2 3 4


# 1 "/usr/include/gnu/stubs-32.h" 1 3 4
# 8 "/usr/include/gnu/stubs.h" 2 3 4
# 347 "/usr/include/features.h" 2 3 4
# 28 "/usr/include/sys/types.h" 2 3 4



# 1 "/usr/include/bits/types.h" 1 3 4
# 28 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/types.h" 2 3 4


# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 214 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 3 4
typedef unsigned int size_t;
# 32 "/usr/include/bits/types.h" 2 3 4


typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;


typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;




__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;







__extension__ typedef long long int __quad_t;
__extension__ typedef unsigned long long int __u_quad_t;
# 134 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 135 "/usr/include/bits/types.h" 2 3 4


__extension__ typedef __u_quad_t __dev_t;
__extension__ typedef unsigned int __uid_t;
__extension__ typedef unsigned int __gid_t;
__extension__ typedef unsigned long int __ino_t;
__extension__ typedef __u_quad_t __ino64_t;
__extension__ typedef unsigned int __mode_t;
__extension__ typedef unsigned int __nlink_t;
__extension__ typedef long int __off_t;
__extension__ typedef __quad_t __off64_t;
__extension__ typedef int __pid_t;
__extension__ typedef struct { int __val[2]; } __fsid_t;
__extension__ typedef long int __clock_t;
__extension__ typedef unsigned long int __rlim_t;
__extension__ typedef __u_quad_t __rlim64_t;
__extension__ typedef unsigned int __id_t;
__extension__ typedef long int __time_t;
__extension__ typedef unsigned int __useconds_t;
__extension__ typedef long int __suseconds_t;

__extension__ typedef int __daddr_t;
__extension__ typedef long int __swblk_t;
__extension__ typedef int __key_t;


__extension__ typedef int __clockid_t;


__extension__ typedef void * __timer_t;


__extension__ typedef long int __blksize_t;




__extension__ typedef long int __blkcnt_t;
__extension__ typedef __quad_t __blkcnt64_t;


__extension__ typedef unsigned long int __fsblkcnt_t;
__extension__ typedef __u_quad_t __fsblkcnt64_t;


__extension__ typedef unsigned long int __fsfilcnt_t;
__extension__ typedef __u_quad_t __fsfilcnt64_t;

__extension__ typedef int __ssize_t;



typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;


__extension__ typedef int __intptr_t;


__extension__ typedef unsigned int __socklen_t;
# 32 "/usr/include/sys/types.h" 2 3 4



typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;




typedef __loff_t loff_t;



typedef __ino_t ino_t;
# 62 "/usr/include/sys/types.h" 3 4
typedef __dev_t dev_t;




typedef __gid_t gid_t;




typedef __mode_t mode_t;




typedef __nlink_t nlink_t;




typedef __uid_t uid_t;





typedef __off_t off_t;
# 100 "/usr/include/sys/types.h" 3 4
typedef __pid_t pid_t;




typedef __id_t id_t;




typedef __ssize_t ssize_t;





typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;





typedef __key_t key_t;
# 133 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/time.h" 1 3 4
# 75 "/usr/include/time.h" 3 4


typedef __time_t time_t;



# 93 "/usr/include/time.h" 3 4
typedef __clockid_t clockid_t;
# 105 "/usr/include/time.h" 3 4
typedef __timer_t timer_t;
# 134 "/usr/include/sys/types.h" 2 3 4
# 147 "/usr/include/sys/types.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 148 "/usr/include/sys/types.h" 2 3 4



typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 195 "/usr/include/sys/types.h" 3 4
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));


typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef int register_t __attribute__ ((__mode__ (__word__)));
# 217 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 37 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/endian.h" 1 3 4
# 38 "/usr/include/endian.h" 2 3 4
# 218 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/select.h" 1 3 4
# 31 "/usr/include/sys/select.h" 3 4
# 1 "/usr/include/bits/select.h" 1 3 4
# 32 "/usr/include/sys/select.h" 2 3 4


# 1 "/usr/include/bits/sigset.h" 1 3 4
# 23 "/usr/include/bits/sigset.h" 3 4
typedef int __sig_atomic_t;




typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3 4



typedef __sigset_t sigset_t;





# 1 "/usr/include/time.h" 1 3 4
# 121 "/usr/include/time.h" 3 4
struct timespec
  {
    __time_t tv_sec;
    long int tv_nsec;
  };
# 45 "/usr/include/sys/select.h" 2 3 4

# 1 "/usr/include/bits/time.h" 1 3 4
# 69 "/usr/include/bits/time.h" 3 4
struct timeval
  {
    __time_t tv_sec;
    __suseconds_t tv_usec;
  };
# 47 "/usr/include/sys/select.h" 2 3 4


typedef __suseconds_t suseconds_t;





typedef long int __fd_mask;
# 67 "/usr/include/sys/select.h" 3 4
typedef struct
  {






    __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];


  } fd_set;






typedef __fd_mask fd_mask;
# 99 "/usr/include/sys/select.h" 3 4

# 109 "/usr/include/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
     fd_set *__restrict __writefds,
     fd_set *__restrict __exceptfds,
     struct timeval *__restrict __timeout);
# 121 "/usr/include/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
      fd_set *__restrict __writefds,
      fd_set *__restrict __exceptfds,
      const struct timespec *__restrict __timeout,
      const __sigset_t *__restrict __sigmask);



# 221 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/sysmacros.h" 1 3 4
# 29 "/usr/include/sys/sysmacros.h" 3 4
__extension__
extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
       unsigned int __minor)
     __attribute__ ((__nothrow__));


__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
{
  return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}

__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
{
  return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}

__extension__ extern __inline unsigned long long int
__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
{
  return ((__minor & 0xff) | ((__major & 0xfff) << 8)
   | (((unsigned long long int) (__minor & ~0xff)) << 12)
   | (((unsigned long long int) (__major & ~0xfff)) << 32));
}
# 224 "/usr/include/sys/types.h" 2 3 4
# 235 "/usr/include/sys/types.h" 3 4
typedef __blkcnt_t blkcnt_t;



typedef __fsblkcnt_t fsblkcnt_t;



typedef __fsfilcnt_t fsfilcnt_t;
# 270 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
# 36 "/usr/include/bits/pthreadtypes.h" 3 4
typedef unsigned long int pthread_t;


typedef union
{
  char __size[36];
  long int __align;
} pthread_attr_t;


typedef struct __pthread_internal_slist
{
  struct __pthread_internal_slist *__next;
} __pthread_slist_t;




typedef union
{
  struct __pthread_mutex_s
  {
    int __lock;
    unsigned int __count;
    int __owner;


    int __kind;
    unsigned int __nusers;
    __extension__ union
    {
      int __spins;
      __pthread_slist_t __list;
    };
  } __data;
  char __size[24];
  long int __align;
} pthread_mutex_t;

typedef union
{
  char __size[4];
  long int __align;
} pthread_mutexattr_t;




typedef union
{
  struct
  {
    int __lock;
    unsigned int __futex;
    __extension__ unsigned long long int __total_seq;
    __extension__ unsigned long long int __wakeup_seq;
    __extension__ unsigned long long int __woken_seq;
    void *__mutex;
    unsigned int __nwaiters;
    unsigned int __broadcast_seq;
  } __data;
  char __size[48];
  __extension__ long long int __align;
} pthread_cond_t;

typedef union
{
  char __size[4];
  long int __align;
} pthread_condattr_t;



typedef unsigned int pthread_key_t;



typedef int pthread_once_t;





typedef union
{
  struct
  {
    int __lock;
    unsigned int __nr_readers;
    unsigned int __readers_wakeup;
    unsigned int __writer_wakeup;
    unsigned int __nr_readers_queued;
    unsigned int __nr_writers_queued;


    unsigned int __flags;
    int __writer;
  } __data;
  char __size[32];
  long int __align;
} pthread_rwlock_t;

typedef union
{
  char __size[8];
  long int __align;
} pthread_rwlockattr_t;





typedef volatile int pthread_spinlock_t;




typedef union
{
  char __size[20];
  long int __align;
} pthread_barrier_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_barrierattr_t;
# 271 "/usr/include/sys/types.h" 2 3 4



# 27 "main.c" 2
# 1 "/usr/include/sys/time.h" 1 3 4
# 27 "/usr/include/sys/time.h" 3 4
# 1 "/usr/include/time.h" 1 3 4
# 28 "/usr/include/sys/time.h" 2 3 4

# 1 "/usr/include/bits/time.h" 1 3 4
# 30 "/usr/include/sys/time.h" 2 3 4
# 39 "/usr/include/sys/time.h" 3 4

# 57 "/usr/include/sys/time.h" 3 4
struct timezone
  {
    int tz_minuteswest;
    int tz_dsttime;
  };

typedef struct timezone *__restrict __timezone_ptr_t;
# 73 "/usr/include/sys/time.h" 3 4
extern int gettimeofday (struct timeval *__restrict __tv,
    __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));




extern int settimeofday (__const struct timeval *__tv,
    __const struct timezone *__tz)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int adjtime (__const struct timeval *__delta,
      struct timeval *__olddelta) __attribute__ ((__nothrow__));




enum __itimer_which
  {

    ITIMER_REAL = 0,


    ITIMER_VIRTUAL = 1,



    ITIMER_PROF = 2

  };



struct itimerval
  {

    struct timeval it_interval;

    struct timeval it_value;
  };






typedef int __itimer_which_t;




extern int getitimer (__itimer_which_t __which,
        struct itimerval *__value) __attribute__ ((__nothrow__));




extern int setitimer (__itimer_which_t __which,
        __const struct itimerval *__restrict __new,
        struct itimerval *__restrict __old) __attribute__ ((__nothrow__));




extern int utimes (__const char *__file, __const struct timeval __tvp[2])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
# 191 "/usr/include/sys/time.h" 3 4

# 28 "main.c" 2
# 1 "/usr/include/sys/wait.h" 1 3 4
# 29 "/usr/include/sys/wait.h" 3 4


# 1 "/usr/include/signal.h" 1 3 4
# 31 "/usr/include/signal.h" 3 4


# 1 "/usr/include/bits/sigset.h" 1 3 4
# 103 "/usr/include/bits/sigset.h" 3 4
extern int __sigismember (__const __sigset_t *, int);
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
# 34 "/usr/include/signal.h" 2 3 4







typedef __sig_atomic_t sig_atomic_t;

# 58 "/usr/include/signal.h" 3 4
# 1 "/usr/include/bits/signum.h" 1 3 4
# 59 "/usr/include/signal.h" 2 3 4
# 75 "/usr/include/signal.h" 3 4
typedef void (*__sighandler_t) (int);




extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
     __attribute__ ((__nothrow__));
# 90 "/usr/include/signal.h" 3 4


extern __sighandler_t signal (int __sig, __sighandler_t __handler)
     __attribute__ ((__nothrow__));
# 104 "/usr/include/signal.h" 3 4

# 117 "/usr/include/signal.h" 3 4
extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__));






extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__));




extern int raise (int __sig) __attribute__ ((__nothrow__));




extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
     __attribute__ ((__nothrow__));
extern int gsignal (int __sig) __attribute__ ((__nothrow__));




extern void psignal (int __sig, __const char *__s);
# 153 "/usr/include/signal.h" 3 4
extern int __sigpause (int __sig_or_mask, int __is_sig);
# 181 "/usr/include/signal.h" 3 4
extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));


extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));


extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
# 201 "/usr/include/signal.h" 3 4
typedef __sighandler_t sig_t;







# 1 "/usr/include/time.h" 1 3 4
# 210 "/usr/include/signal.h" 2 3 4


# 1 "/usr/include/bits/siginfo.h" 1 3 4
# 25 "/usr/include/bits/siginfo.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 26 "/usr/include/bits/siginfo.h" 2 3 4







typedef union sigval
  {
    int sival_int;
    void *sival_ptr;
  } sigval_t;
# 51 "/usr/include/bits/siginfo.h" 3 4
typedef struct siginfo
  {
    int si_signo;
    int si_errno;

    int si_code;

    union
      {
 int _pad[((128 / sizeof (int)) - 3)];


 struct
   {
     __pid_t si_pid;
     __uid_t si_uid;
   } _kill;


 struct
   {
     int si_tid;
     int si_overrun;
     sigval_t si_sigval;
   } _timer;


 struct
   {
     __pid_t si_pid;
     __uid_t si_uid;
     sigval_t si_sigval;
   } _rt;


 struct
   {
     __pid_t si_pid;
     __uid_t si_uid;
     int si_status;
     __clock_t si_utime;
     __clock_t si_stime;
   } _sigchld;


 struct
   {
     void *si_addr;
   } _sigfault;


 struct
   {
     long int si_band;
     int si_fd;
   } _sigpoll;
      } _sifields;
  } siginfo_t;
# 129 "/usr/include/bits/siginfo.h" 3 4
enum
{
  SI_ASYNCNL = -60,

  SI_TKILL = -6,

  SI_SIGIO,

  SI_ASYNCIO,

  SI_MESGQ,

  SI_TIMER,

  SI_QUEUE,

  SI_USER,

  SI_KERNEL = 0x80

};



enum
{
  ILL_ILLOPC = 1,

  ILL_ILLOPN,

  ILL_ILLADR,

  ILL_ILLTRP,

  ILL_PRVOPC,

  ILL_PRVREG,

  ILL_COPROC,

  ILL_BADSTK

};


enum
{
  FPE_INTDIV = 1,

  FPE_INTOVF,

  FPE_FLTDIV,

  FPE_FLTOVF,

  FPE_FLTUND,

  FPE_FLTRES,

  FPE_FLTINV,

  FPE_FLTSUB

};


enum
{
  SEGV_MAPERR = 1,

  SEGV_ACCERR

};


enum
{
  BUS_ADRALN = 1,

  BUS_ADRERR,

  BUS_OBJERR

};


enum
{
  TRAP_BRKPT = 1,

  TRAP_TRACE

};


enum
{
  CLD_EXITED = 1,

  CLD_KILLED,

  CLD_DUMPED,

  CLD_TRAPPED,

  CLD_STOPPED,

  CLD_CONTINUED

};


enum
{
  POLL_IN = 1,

  POLL_OUT,

  POLL_MSG,

  POLL_ERR,

  POLL_PRI,

  POLL_HUP

};
# 273 "/usr/include/bits/siginfo.h" 3 4
typedef struct sigevent
  {
    sigval_t sigev_value;
    int sigev_signo;
    int sigev_notify;

    union
      {
 int _pad[((64 / sizeof (int)) - 3)];



 __pid_t _tid;

 struct
   {
     void (*_function) (sigval_t);
     void *_attribute;
   } _sigev_thread;
      } _sigev_un;
  } sigevent_t;






enum
{
  SIGEV_SIGNAL = 0,

  SIGEV_NONE,

  SIGEV_THREAD,


  SIGEV_THREAD_ID = 4

};
# 213 "/usr/include/signal.h" 2 3 4



extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigismember (__const sigset_t *__set, int __signo)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 246 "/usr/include/signal.h" 3 4
# 1 "/usr/include/bits/sigaction.h" 1 3 4
# 25 "/usr/include/bits/sigaction.h" 3 4
struct sigaction
  {


    union
      {

 __sighandler_t sa_handler;

 void (*sa_sigaction) (int, siginfo_t *, void *);
      }
    __sigaction_handler;







    __sigset_t sa_mask;


    int sa_flags;


    void (*sa_restorer) (void);
  };
# 247 "/usr/include/signal.h" 2 3 4


extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
   sigset_t *__restrict __oset) __attribute__ ((__nothrow__));






extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1)));


extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
        struct sigaction *__restrict __oact) __attribute__ ((__nothrow__));


extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
     __attribute__ ((__nonnull__ (1, 2)));






extern int sigwaitinfo (__const sigset_t *__restrict __set,
   siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));






extern int sigtimedwait (__const sigset_t *__restrict __set,
    siginfo_t *__restrict __info,
    __const struct timespec *__restrict __timeout)
     __attribute__ ((__nonnull__ (1)));



extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
     __attribute__ ((__nothrow__));
# 304 "/usr/include/signal.h" 3 4
extern __const char *__const _sys_siglist[65];
extern __const char *__const sys_siglist[65];


struct sigvec
  {
    __sighandler_t sv_handler;
    int sv_mask;

    int sv_flags;

  };
# 328 "/usr/include/signal.h" 3 4
extern int sigvec (int __sig, __const struct sigvec *__vec,
     struct sigvec *__ovec) __attribute__ ((__nothrow__));



# 1 "/usr/include/bits/sigcontext.h" 1 3 4
# 28 "/usr/include/bits/sigcontext.h" 3 4
# 1 "/usr/include/asm/sigcontext.h" 1 3 4






# 1 "/usr/include/asm-i386/sigcontext.h" 1 3 4
# 19 "/usr/include/asm-i386/sigcontext.h" 3 4
struct _fpreg {
 unsigned short significand[4];
 unsigned short exponent;
};

struct _fpxreg {
 unsigned short significand[4];
 unsigned short exponent;
 unsigned short padding[3];
};

struct _xmmreg {
 unsigned long element[4];
};

struct _fpstate {

 unsigned long cw;
 unsigned long sw;
 unsigned long tag;
 unsigned long ipoff;
 unsigned long cssel;
 unsigned long dataoff;
 unsigned long datasel;
 struct _fpreg _st[8];
 unsigned short status;
 unsigned short magic;


 unsigned long _fxsr_env[6];
 unsigned long mxcsr;
 unsigned long reserved;
 struct _fpxreg _fxsr_st[8];
 struct _xmmreg _xmm[8];
 unsigned long padding[56];
};



struct sigcontext {
 unsigned short gs, __gsh;
 unsigned short fs, __fsh;
 unsigned short es, __esh;
 unsigned short ds, __dsh;
 unsigned long edi;
 unsigned long esi;
 unsigned long ebp;
 unsigned long esp;
 unsigned long ebx;
 unsigned long edx;
 unsigned long ecx;
 unsigned long eax;
 unsigned long trapno;
 unsigned long err;
 unsigned long eip;
 unsigned short cs, __csh;
 unsigned long eflags;
 unsigned long esp_at_signal;
 unsigned short ss, __ssh;
 struct _fpstate * fpstate;
 unsigned long oldmask;
 unsigned long cr2;
};
# 8 "/usr/include/asm/sigcontext.h" 2 3 4
# 29 "/usr/include/bits/sigcontext.h" 2 3 4
# 334 "/usr/include/signal.h" 2 3 4


extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__));
# 346 "/usr/include/signal.h" 3 4
extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__));

# 1 "/usr/include/bits/sigstack.h" 1 3 4
# 26 "/usr/include/bits/sigstack.h" 3 4
struct sigstack
  {
    void *ss_sp;
    int ss_onstack;
  };



enum
{
  SS_ONSTACK = 1,

  SS_DISABLE

};
# 50 "/usr/include/bits/sigstack.h" 3 4
typedef struct sigaltstack
  {
    void *ss_sp;
    int ss_flags;
    size_t ss_size;
  } stack_t;
# 349 "/usr/include/signal.h" 2 3 4
# 357 "/usr/include/signal.h" 3 4
extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
     __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));



extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
   struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__));
# 387 "/usr/include/signal.h" 3 4
# 1 "/usr/include/bits/sigthread.h" 1 3 4
# 31 "/usr/include/bits/sigthread.h" 3 4
extern int pthread_sigmask (int __how,
       __const __sigset_t *__restrict __newmask,
       __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__));


extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__));
# 388 "/usr/include/signal.h" 2 3 4






extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__));

extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__));




# 32 "/usr/include/sys/wait.h" 2 3 4
# 1 "/usr/include/sys/resource.h" 1 3 4
# 25 "/usr/include/sys/resource.h" 3 4
# 1 "/usr/include/bits/resource.h" 1 3 4
# 33 "/usr/include/bits/resource.h" 3 4
enum __rlimit_resource
{

  RLIMIT_CPU = 0,



  RLIMIT_FSIZE = 1,



  RLIMIT_DATA = 2,



  RLIMIT_STACK = 3,



  RLIMIT_CORE = 4,






  __RLIMIT_RSS = 5,



  RLIMIT_NOFILE = 7,
  __RLIMIT_OFILE = RLIMIT_NOFILE,




  RLIMIT_AS = 9,



  __RLIMIT_NPROC = 6,



  __RLIMIT_MEMLOCK = 8,



  __RLIMIT_LOCKS = 10,



  __RLIMIT_SIGPENDING = 11,



  __RLIMIT_MSGQUEUE = 12,





  __RLIMIT_NICE = 13,




  __RLIMIT_RTPRIO = 14,


  __RLIMIT_NLIMITS = 15,
  __RLIM_NLIMITS = __RLIMIT_NLIMITS


};
# 127 "/usr/include/bits/resource.h" 3 4
typedef __rlim_t rlim_t;







struct rlimit
  {

    rlim_t rlim_cur;

    rlim_t rlim_max;
  };
# 154 "/usr/include/bits/resource.h" 3 4
enum __rusage_who
{

  RUSAGE_SELF = 0,



  RUSAGE_CHILDREN = -1

};


# 1 "/usr/include/bits/time.h" 1 3 4
# 167 "/usr/include/bits/resource.h" 2 3 4


struct rusage
  {

    struct timeval ru_utime;

    struct timeval ru_stime;

    long int ru_maxrss;


    long int ru_ixrss;

    long int ru_idrss;

    long int ru_isrss;


    long int ru_minflt;

    long int ru_majflt;

    long int ru_nswap;


    long int ru_inblock;

    long int ru_oublock;

    long int ru_msgsnd;

    long int ru_msgrcv;

    long int ru_nsignals;



    long int ru_nvcsw;


    long int ru_nivcsw;
  };







enum __priority_which
{
  PRIO_PROCESS = 0,

  PRIO_PGRP = 1,

  PRIO_USER = 2

};
# 26 "/usr/include/sys/resource.h" 2 3 4







# 43 "/usr/include/sys/resource.h" 3 4
typedef int __rlimit_resource_t;
typedef int __rusage_who_t;
typedef int __priority_which_t;





extern int getrlimit (__rlimit_resource_t __resource,
        struct rlimit *__rlimits) __attribute__ ((__nothrow__));
# 70 "/usr/include/sys/resource.h" 3 4
extern int setrlimit (__rlimit_resource_t __resource,
        __const struct rlimit *__rlimits) __attribute__ ((__nothrow__));
# 88 "/usr/include/sys/resource.h" 3 4
extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__));





extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__));



extern int setpriority (__priority_which_t __which, id_t __who, int __prio)
     __attribute__ ((__nothrow__));


# 33 "/usr/include/sys/wait.h" 2 3 4





# 1 "/usr/include/bits/waitflags.h" 1 3 4
# 39 "/usr/include/sys/wait.h" 2 3 4
# 63 "/usr/include/sys/wait.h" 3 4
typedef union
  {
    union wait *__uptr;
    int *__iptr;
  } __WAIT_STATUS __attribute__ ((__transparent_union__));
# 80 "/usr/include/sys/wait.h" 3 4
# 1 "/usr/include/bits/waitstatus.h" 1 3 4
# 67 "/usr/include/bits/waitstatus.h" 3 4
union wait
  {
    int w_status;
    struct
      {

 unsigned int __w_termsig:7;
 unsigned int __w_coredump:1;
 unsigned int __w_retcode:8;
 unsigned int:16;







      } __wait_terminated;
    struct
      {

 unsigned int __w_stopval:8;
 unsigned int __w_stopsig:8;
 unsigned int:16;






      } __wait_stopped;
  };
# 81 "/usr/include/sys/wait.h" 2 3 4
# 102 "/usr/include/sys/wait.h" 3 4
typedef enum
{
  P_ALL,
  P_PID,
  P_PGID
} idtype_t;
# 116 "/usr/include/sys/wait.h" 3 4
extern __pid_t wait (__WAIT_STATUS __stat_loc);
# 139 "/usr/include/sys/wait.h" 3 4
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);



# 1 "/usr/include/bits/siginfo.h" 1 3 4
# 25 "/usr/include/bits/siginfo.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 26 "/usr/include/bits/siginfo.h" 2 3 4
# 144 "/usr/include/sys/wait.h" 2 3 4
# 155 "/usr/include/sys/wait.h" 3 4
extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
     int __options);





struct rusage;






extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,
        struct rusage * __usage) __attribute__ ((__nothrow__));





struct rusage;


extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,
        struct rusage *__usage) __attribute__ ((__nothrow__));




# 29 "main.c" 2
# 1 "/usr/include/sys/ioctl.h" 1 3 4
# 24 "/usr/include/sys/ioctl.h" 3 4



# 1 "/usr/include/bits/ioctls.h" 1 3 4
# 24 "/usr/include/bits/ioctls.h" 3 4
# 1 "/usr/include/asm/ioctls.h" 1 3 4






# 1 "/usr/include/asm-i386/ioctls.h" 1 3 4



# 1 "/usr/include/asm/ioctl.h" 1 3 4






# 1 "/usr/include/asm-i386/ioctl.h" 1 3 4
# 1 "/usr/include/asm-generic/ioctl.h" 1 3 4
# 51 "/usr/include/asm-generic/ioctl.h" 3 4
extern unsigned int __invalid_size_argument_for_IOC;
# 1 "/usr/include/asm-i386/ioctl.h" 2 3 4
# 8 "/usr/include/asm/ioctl.h" 2 3 4
# 5 "/usr/include/asm-i386/ioctls.h" 2 3 4
# 8 "/usr/include/asm/ioctls.h" 2 3 4
# 25 "/usr/include/bits/ioctls.h" 2 3 4
# 28 "/usr/include/sys/ioctl.h" 2 3 4


# 1 "/usr/include/bits/ioctl-types.h" 1 3 4
# 28 "/usr/include/bits/ioctl-types.h" 3 4
struct winsize
  {
    unsigned short int ws_row;
    unsigned short int ws_col;
    unsigned short int ws_xpixel;
    unsigned short int ws_ypixel;
  };


struct termio
  {
    unsigned short int c_iflag;
    unsigned short int c_oflag;
    unsigned short int c_cflag;
    unsigned short int c_lflag;
    unsigned char c_line;
    unsigned char c_cc[8];
};
# 31 "/usr/include/sys/ioctl.h" 2 3 4






# 1 "/usr/include/sys/ttydefaults.h" 1 3 4
# 38 "/usr/include/sys/ioctl.h" 2 3 4




extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__));


# 30 "main.c" 2
# 1 "/usr/include/sys/reboot.h" 1 3 4
# 42 "/usr/include/sys/reboot.h" 3 4



extern int reboot (int __howto) __attribute__ ((__nothrow__));


# 31 "main.c" 2


# 1 "/usr/include/errno.h" 1 3 4
# 32 "/usr/include/errno.h" 3 4




# 1 "/usr/include/bits/errno.h" 1 3 4
# 25 "/usr/include/bits/errno.h" 3 4
# 1 "/usr/include/linux/errno.h" 1 3 4



# 1 "/usr/include/asm/errno.h" 1 3 4






# 1 "/usr/include/asm-i386/errno.h" 1 3 4



# 1 "/usr/include/asm-generic/errno.h" 1 3 4



# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
# 5 "/usr/include/asm-generic/errno.h" 2 3 4
# 5 "/usr/include/asm-i386/errno.h" 2 3 4
# 8 "/usr/include/asm/errno.h" 2 3 4
# 5 "/usr/include/linux/errno.h" 2 3 4
# 26 "/usr/include/bits/errno.h" 2 3 4
# 43 "/usr/include/bits/errno.h" 3 4
extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
# 37 "/usr/include/errno.h" 2 3 4
# 59 "/usr/include/errno.h" 3 4

# 34 "main.c" 2
# 1 "/usr/include/stdio.h" 1 3 4
# 30 "/usr/include/stdio.h" 3 4




# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 35 "/usr/include/stdio.h" 2 3 4
# 44 "/usr/include/stdio.h" 3 4


typedef struct _IO_FILE FILE;





# 62 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 72 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 32 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 14 "/usr/include/_G_config.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 326 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 3 4
typedef int wchar_t;
# 355 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 3 4
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3 4
# 24 "/usr/include/_G_config.h" 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4

# 1 "/usr/include/bits/wchar.h" 1 3 4
# 51 "/usr/include/wchar.h" 2 3 4
# 76 "/usr/include/wchar.h" 3 4
typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    char __wchb[4];
  } __value;
} __mbstate_t;
# 25 "/usr/include/_G_config.h" 2 3 4

typedef struct
{
  __off_t __pos;
  __mbstate_t __state;
} _G_fpos_t;
typedef struct
{
  __off64_t __pos;
  __mbstate_t __state;
} _G_fpos64_t;
# 44 "/usr/include/_G_config.h" 3 4
# 1 "/usr/include/gconv.h" 1 3 4
# 28 "/usr/include/gconv.h" 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4
# 29 "/usr/include/gconv.h" 2 3 4


# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 32 "/usr/include/gconv.h" 2 3 4





enum
{
  __GCONV_OK = 0,
  __GCONV_NOCONV,
  __GCONV_NODB,
  __GCONV_NOMEM,

  __GCONV_EMPTY_INPUT,
  __GCONV_FULL_OUTPUT,
  __GCONV_ILLEGAL_INPUT,
  __GCONV_INCOMPLETE_INPUT,

  __GCONV_ILLEGAL_DESCRIPTOR,
  __GCONV_INTERNAL_ERROR
};



enum
{
  __GCONV_IS_LAST = 0x0001,
  __GCONV_IGNORE_ERRORS = 0x0002
};



struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
struct __gconv_trans_data;



typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
       __const unsigned char **, __const unsigned char *,
       unsigned char **, size_t *, int, int);


typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);


typedef int (*__gconv_init_fct) (struct __gconv_step *);
typedef void (*__gconv_end_fct) (struct __gconv_step *);



typedef int (*__gconv_trans_fct) (struct __gconv_step *,
      struct __gconv_step_data *, void *,
      __const unsigned char *,
      __const unsigned char **,
      __const unsigned char *, unsigned char **,
      size_t *);


typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
       __const unsigned char *,
       unsigned char *, unsigned char *);


typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
     size_t *);


typedef int (*__gconv_trans_init_fct) (void **, const char *);
typedef void (*__gconv_trans_end_fct) (void *);

struct __gconv_trans_data
{

  __gconv_trans_fct __trans_fct;
  __gconv_trans_context_fct __trans_context_fct;
  __gconv_trans_end_fct __trans_end_fct;
  void *__data;
  struct __gconv_trans_data *__next;
};



struct __gconv_step
{
  struct __gconv_loaded_object *__shlib_handle;
  __const char *__modname;

  int __counter;

  char *__from_name;
  char *__to_name;

  __gconv_fct __fct;
  __gconv_btowc_fct __btowc_fct;
  __gconv_init_fct __init_fct;
  __gconv_end_fct __end_fct;



  int __min_needed_from;
  int __max_needed_from;
  int __min_needed_to;
  int __max_needed_to;


  int __stateful;

  void *__data;
};



struct __gconv_step_data
{
  unsigned char *__outbuf;
  unsigned char *__outbufend;



  int __flags;



  int __invocation_counter;



  int __internal_use;

  __mbstate_t *__statep;
  __mbstate_t __state;



  struct __gconv_trans_data *__trans;
};



typedef struct __gconv_info
{
  size_t __nsteps;
  struct __gconv_step *__steps;
  __extension__ struct __gconv_step_data __data [];
} *__gconv_t;
# 45 "/usr/include/_G_config.h" 2 3 4
typedef union
{
  struct __gconv_info __cd;
  struct
  {
    struct __gconv_info __cd;
    struct __gconv_step_data __data;
  } __combined;
} _G_iconv_t;

typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3 4
# 53 "/usr/include/libio.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 1 3 4
# 43 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4
# 166 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
# 176 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;





struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;



  int _pos;
# 199 "/usr/include/libio.h" 3 4
};


enum __codecvt_result
{
  __codecvt_ok,
  __codecvt_partial,
  __codecvt_error,
  __codecvt_noconv
};
# 267 "/usr/include/libio.h" 3 4
struct _IO_FILE {
  int _flags;




  char* _IO_read_ptr;
  char* _IO_read_end;
  char* _IO_read_base;
  char* _IO_write_base;
  char* _IO_write_ptr;
  char* _IO_write_end;
  char* _IO_buf_base;
  char* _IO_buf_end;

  char *_IO_save_base;
  char *_IO_backup_base;
  char *_IO_save_end;

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;



  int _flags2;

  __off_t _old_offset;



  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];



  _IO_lock_t *_lock;
# 315 "/usr/include/libio.h" 3 4
  __off64_t _offset;
# 324 "/usr/include/libio.h" 3 4
  void *__pad1;
  void *__pad2;
  void *__pad3;
  void *__pad4;
  size_t __pad5;

  int _mode;

  char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];

};


typedef struct _IO_FILE _IO_FILE;


struct _IO_FILE_plus;

extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 360 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);







typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
     size_t __n);







typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);


typedef int __io_close_fn (void *__cookie);
# 412 "/usr/include/libio.h" 3 4
extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__));
extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__));
extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__));
# 450 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));

extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__));





extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
# 480 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
   __gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
    __gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__));
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__));

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__));
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__));

extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
# 73 "/usr/include/stdio.h" 2 3 4
# 86 "/usr/include/stdio.h" 3 4


typedef _G_fpos_t fpos_t;




# 138 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 139 "/usr/include/stdio.h" 2 3 4



extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;







extern int remove (__const char *__filename) __attribute__ ((__nothrow__));

extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));














extern FILE *tmpfile (void);
# 183 "/usr/include/stdio.h" 3 4
extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));





extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
# 201 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));








extern int fclose (FILE *__stream);




extern int fflush (FILE *__stream);

# 226 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 240 "/usr/include/stdio.h" 3 4






extern FILE *fopen (__const char *__restrict __filename,
      __const char *__restrict __modes);




extern FILE *freopen (__const char *__restrict __filename,
        __const char *__restrict __modes,
        FILE *__restrict __stream);
# 267 "/usr/include/stdio.h" 3 4

# 278 "/usr/include/stdio.h" 3 4
extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));
# 298 "/usr/include/stdio.h" 3 4



extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));



extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
      int __modes, size_t __n) __attribute__ ((__nothrow__));





extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
         size_t __size) __attribute__ ((__nothrow__));


extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));








extern int fprintf (FILE *__restrict __stream,
      __const char *__restrict __format, ...);




extern int printf (__const char *__restrict __format, ...);

extern int sprintf (char *__restrict __s,
      __const char *__restrict __format, ...) __attribute__ ((__nothrow__));





extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg);




extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);

extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg) __attribute__ ((__nothrow__));





extern int snprintf (char *__restrict __s, size_t __maxlen,
       __const char *__restrict __format, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
        __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));

# 392 "/usr/include/stdio.h" 3 4





extern int fscanf (FILE *__restrict __stream,
     __const char *__restrict __format, ...) ;




extern int scanf (__const char *__restrict __format, ...) ;

extern int sscanf (__const char *__restrict __s,
     __const char *__restrict __format, ...) __attribute__ ((__nothrow__));

# 434 "/usr/include/stdio.h" 3 4





extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);





extern int getchar (void);

# 458 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 469 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);











extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);





extern int putchar (int __c);

# 502 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);







extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);






extern int getw (FILE *__stream);


extern int putw (int __w, FILE *__stream);








extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
     ;






extern char *gets (char *__s) ;

# 583 "/usr/include/stdio.h" 3 4





extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);





extern int puts (__const char *__s);






extern int ungetc (int __c, FILE *__stream);






extern size_t fread (void *__restrict __ptr, size_t __size,
       size_t __n, FILE *__restrict __stream) ;




extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
        size_t __n, FILE *__restrict __s) ;

# 636 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
         size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
          size_t __n, FILE *__restrict __stream) ;








extern int fseek (FILE *__stream, long int __off, int __whence);




extern long int ftell (FILE *__stream) ;




extern void rewind (FILE *__stream);

# 672 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off_t __off, int __whence);




extern __off_t ftello (FILE *__stream) ;
# 691 "/usr/include/stdio.h" 3 4






extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);




extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
# 714 "/usr/include/stdio.h" 3 4

# 723 "/usr/include/stdio.h" 3 4


extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));

extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;

extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;








extern void perror (__const char *__s);






# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];
# 753 "/usr/include/stdio.h" 2 3 4




extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
# 772 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes) ;





extern int pclose (FILE *__stream);





extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
# 812 "/usr/include/stdio.h" 3 4
extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));



extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;


extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
# 842 "/usr/include/stdio.h" 3 4

# 35 "main.c" 2

# 1 "/usr/include/stdlib.h" 1 3 4
# 33 "/usr/include/stdlib.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 34 "/usr/include/stdlib.h" 2 3 4


# 96 "/usr/include/stdlib.h" 3 4


typedef struct
  {
    int quot;
    int rem;
  } div_t;



typedef struct
  {
    long int quot;
    long int rem;
  } ldiv_t;



# 140 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ;




extern double atof (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern int atoi (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern long int atol (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





__extension__ extern long long int atoll (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





extern double strtod (__const char *__restrict __nptr,
        char **__restrict __endptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

# 182 "/usr/include/stdlib.h" 3 4


extern long int strtol (__const char *__restrict __nptr,
   char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern unsigned long int strtoul (__const char *__restrict __nptr,
      char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




__extension__
extern long long int strtoq (__const char *__restrict __nptr,
        char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
           char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





__extension__
extern long long int strtoll (__const char *__restrict __nptr,
         char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
     char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

# 279 "/usr/include/stdlib.h" 3 4
extern double __strtod_internal (__const char *__restrict __nptr,
     char **__restrict __endptr, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
extern float __strtof_internal (__const char *__restrict __nptr,
    char **__restrict __endptr, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
extern long double __strtold_internal (__const char *__restrict __nptr,
           char **__restrict __endptr,
           int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern long int __strtol_internal (__const char *__restrict __nptr,
       char **__restrict __endptr,
       int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
          char **__restrict __endptr,
          int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




__extension__
extern long long int __strtoll_internal (__const char *__restrict __nptr,
      char **__restrict __endptr,
      int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



__extension__
extern unsigned long long int __strtoull_internal (__const char *
         __restrict __nptr,
         char **__restrict __endptr,
         int __base, int __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 429 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ;


extern long int a64l (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
# 445 "/usr/include/stdlib.h" 3 4
extern long int random (void) __attribute__ ((__nothrow__));


extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));





extern char *initstate (unsigned int __seed, char *__statebuf,
   size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));



extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







struct random_data
  {
    int32_t *fptr;
    int32_t *rptr;
    int32_t *state;
    int rand_type;
    int rand_deg;
    int rand_sep;
    int32_t *end_ptr;
  };

extern int random_r (struct random_data *__restrict __buf,
       int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int srandom_r (unsigned int __seed, struct random_data *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
   size_t __statelen,
   struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));

extern int setstate_r (char *__restrict __statebuf,
         struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern int rand (void) __attribute__ ((__nothrow__));

extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));




extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));







extern double drand48 (void) __attribute__ ((__nothrow__));
extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int lrand48 (void) __attribute__ ((__nothrow__));
extern long int nrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int mrand48 (void) __attribute__ ((__nothrow__));
extern long int jrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





struct drand48_data
  {
    unsigned short int __x[3];
    unsigned short int __old_x[3];
    unsigned short int __c;
    unsigned short int __init;
    unsigned long long int __a;
  };


extern int drand48_r (struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int lrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int mrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int seed48_r (unsigned short int __seed16v[3],
       struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int lcong48_r (unsigned short int __param[7],
        struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));









extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;

extern void *calloc (size_t __nmemb, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;







extern void *realloc (void *__ptr, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));

extern void free (void *__ptr) __attribute__ ((__nothrow__));




extern void cfree (void *__ptr) __attribute__ ((__nothrow__));



# 1 "/usr/include/alloca.h" 1 3 4
# 25 "/usr/include/alloca.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 26 "/usr/include/alloca.h" 2 3 4







extern void *alloca (size_t __size) __attribute__ ((__nothrow__));






# 613 "/usr/include/stdlib.h" 2 3 4




extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;




extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));



extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));

# 658 "/usr/include/stdlib.h" 3 4


extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern char *__secure_getenv (__const char *__name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int setenv (__const char *__name, __const char *__value, int __replace)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));


extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));






extern int clearenv (void) __attribute__ ((__nothrow__));
# 698 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 709 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 729 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;








extern int system (__const char *__command) ;

# 757 "/usr/include/stdlib.h" 3 4
extern char *realpath (__const char *__restrict __name,
         char *__restrict __resolved) __attribute__ ((__nothrow__)) ;






typedef int (*__compar_fn_t) (__const void *, __const void *);









extern void *bsearch (__const void *__key, __const void *__base,
        size_t __nmemb, size_t __size, __compar_fn_t __compar)
     __attribute__ ((__nonnull__ (1, 2, 5))) ;



extern void qsort (void *__base, size_t __nmemb, size_t __size,
     __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));



extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;












extern div_t div (int __numer, int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;

# 822 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *gcvt (double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern char *qecvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));

extern int qecvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));







extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int mbtowc (wchar_t *__restrict __pwc,
     __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ;



extern size_t mbstowcs (wchar_t *__restrict __pwcs,
   __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));

extern size_t wcstombs (char *__restrict __s,
   __const wchar_t *__restrict __pwcs, size_t __n)
     __attribute__ ((__nothrow__));








extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 927 "/usr/include/stdlib.h" 3 4
extern int posix_openpt (int __oflag) ;
# 962 "/usr/include/stdlib.h" 3 4
extern int getloadavg (double __loadavg[], int __nelem)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 978 "/usr/include/stdlib.h" 3 4

# 37 "main.c" 2
# 1 "/usr/include/string.h" 1 3 4
# 28 "/usr/include/string.h" 3 4





# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 34 "/usr/include/string.h" 2 3 4




extern void *memcpy (void *__restrict __dest,
       __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void *memmove (void *__dest, __const void *__src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
        int __c, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));





extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern void *memchr (__const void *__s, int __c, size_t __n)
      __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

# 82 "/usr/include/string.h" 3 4


extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
        size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcoll (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern size_t strxfrm (char *__restrict __dest,
         __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

# 130 "/usr/include/string.h" 3 4
extern char *strdup (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
# 165 "/usr/include/string.h" 3 4


extern char *strchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

extern char *strrchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

# 181 "/usr/include/string.h" 3 4



extern size_t strcspn (__const char *__s, __const char *__reject)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern size_t strspn (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strpbrk (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strstr (__const char *__haystack, __const char *__needle)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));



extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));




extern char *__strtok_r (char *__restrict __s,
    __const char *__restrict __delim,
    char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));

extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
         char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
# 240 "/usr/include/string.h" 3 4


extern size_t strlen (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));

# 254 "/usr/include/string.h" 3 4


extern char *strerror (int __errnum) __attribute__ ((__nothrow__));

# 270 "/usr/include/string.h" 3 4
extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
# 288 "/usr/include/string.h" 3 4
extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern void bcopy (__const void *__src, void *__dest, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *index (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));


extern char *rindex (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));



extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
# 325 "/usr/include/string.h" 3 4
extern int strcasecmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 348 "/usr/include/string.h" 3 4
extern char *strsep (char **__restrict __stringp,
       __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
# 426 "/usr/include/string.h" 3 4

# 38 "main.c" 2
# 1 "/usr/include/syslog.h" 1 3 4
# 1 "/usr/include/sys/syslog.h" 1 3 4
# 37 "/usr/include/sys/syslog.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 1 3 4
# 38 "/usr/include/sys/syslog.h" 2 3 4


# 1 "/usr/include/bits/syslog-path.h" 1 3 4
# 41 "/usr/include/sys/syslog.h" 2 3 4
# 169 "/usr/include/sys/syslog.h" 3 4






extern void closelog (void);





extern void openlog (__const char *__ident, int __option, int __facility);


extern int setlogmask (int __mask) __attribute__ ((__nothrow__));





extern void syslog (int __pri, __const char *__fmt, ...)
     __attribute__ ((__format__ (__printf__, 2, 3)));
# 200 "/usr/include/sys/syslog.h" 3 4
extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap)
     __attribute__ ((__format__ (__printf__, 2, 0)));
# 213 "/usr/include/sys/syslog.h" 3 4

# 1 "/usr/include/syslog.h" 2 3 4
# 39 "main.c" 2
# 1 "/usr/include/unistd.h" 1 3 4
# 28 "/usr/include/unistd.h" 3 4

# 171 "/usr/include/unistd.h" 3 4
# 1 "/usr/include/bits/posix_opt.h" 1 3 4
# 172 "/usr/include/unistd.h" 2 3 4
# 195 "/usr/include/unistd.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 196 "/usr/include/unistd.h" 2 3 4
# 224 "/usr/include/unistd.h" 3 4
typedef __useconds_t useconds_t;
# 236 "/usr/include/unistd.h" 3 4
typedef __intptr_t intptr_t;






typedef __socklen_t socklen_t;
# 256 "/usr/include/unistd.h" 3 4
extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 299 "/usr/include/unistd.h" 3 4
extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__));
# 318 "/usr/include/unistd.h" 3 4
extern int close (int __fd);






extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;





extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
# 382 "/usr/include/unistd.h" 3 4
extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__)) ;
# 391 "/usr/include/unistd.h" 3 4
extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__));
# 403 "/usr/include/unistd.h" 3 4
extern unsigned int sleep (unsigned int __seconds);






extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
     __attribute__ ((__nothrow__));






extern int usleep (__useconds_t __useconds);
# 427 "/usr/include/unistd.h" 3 4
extern int pause (void);



extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) ;




extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 455 "/usr/include/unistd.h" 3 4
extern int chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern int fchdir (int __fd) __attribute__ ((__nothrow__)) ;
# 469 "/usr/include/unistd.h" 3 4
extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__)) ;
# 482 "/usr/include/unistd.h" 3 4
extern char *getwd (char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;




extern int dup (int __fd) __attribute__ ((__nothrow__)) ;


extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__));


extern char **__environ;







extern int execve (__const char *__path, char *__const __argv[],
     char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 514 "/usr/include/unistd.h" 3 4
extern int execv (__const char *__path, char *__const __argv[])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern int execle (__const char *__path, __const char *__arg, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern int execl (__const char *__path, __const char *__arg, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern int execvp (__const char *__file, char *__const __argv[])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));




extern int execlp (__const char *__file, __const char *__arg, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));




extern int nice (int __inc) __attribute__ ((__nothrow__)) ;




extern void _exit (int __status) __attribute__ ((__noreturn__));





# 1 "/usr/include/bits/confname.h" 1 3 4
# 26 "/usr/include/bits/confname.h" 3 4
enum
  {
    _PC_LINK_MAX,

    _PC_MAX_CANON,

    _PC_MAX_INPUT,

    _PC_NAME_MAX,

    _PC_PATH_MAX,

    _PC_PIPE_BUF,

    _PC_CHOWN_RESTRICTED,

    _PC_NO_TRUNC,

    _PC_VDISABLE,

    _PC_SYNC_IO,

    _PC_ASYNC_IO,

    _PC_PRIO_IO,

    _PC_SOCK_MAXBUF,

    _PC_FILESIZEBITS,

    _PC_REC_INCR_XFER_SIZE,

    _PC_REC_MAX_XFER_SIZE,

    _PC_REC_MIN_XFER_SIZE,

    _PC_REC_XFER_ALIGN,

    _PC_ALLOC_SIZE_MIN,

    _PC_SYMLINK_MAX,

    _PC_2_SYMLINKS

  };


enum
  {
    _SC_ARG_MAX,

    _SC_CHILD_MAX,

    _SC_CLK_TCK,

    _SC_NGROUPS_MAX,

    _SC_OPEN_MAX,

    _SC_STREAM_MAX,

    _SC_TZNAME_MAX,

    _SC_JOB_CONTROL,

    _SC_SAVED_IDS,

    _SC_REALTIME_SIGNALS,

    _SC_PRIORITY_SCHEDULING,

    _SC_TIMERS,

    _SC_ASYNCHRONOUS_IO,

    _SC_PRIORITIZED_IO,

    _SC_SYNCHRONIZED_IO,

    _SC_FSYNC,

    _SC_MAPPED_FILES,

    _SC_MEMLOCK,

    _SC_MEMLOCK_RANGE,

    _SC_MEMORY_PROTECTION,

    _SC_MESSAGE_PASSING,

    _SC_SEMAPHORES,

    _SC_SHARED_MEMORY_OBJECTS,

    _SC_AIO_LISTIO_MAX,

    _SC_AIO_MAX,

    _SC_AIO_PRIO_DELTA_MAX,

    _SC_DELAYTIMER_MAX,

    _SC_MQ_OPEN_MAX,

    _SC_MQ_PRIO_MAX,

    _SC_VERSION,

    _SC_PAGESIZE,


    _SC_RTSIG_MAX,

    _SC_SEM_NSEMS_MAX,

    _SC_SEM_VALUE_MAX,

    _SC_SIGQUEUE_MAX,

    _SC_TIMER_MAX,




    _SC_BC_BASE_MAX,

    _SC_BC_DIM_MAX,

    _SC_BC_SCALE_MAX,

    _SC_BC_STRING_MAX,

    _SC_COLL_WEIGHTS_MAX,

    _SC_EQUIV_CLASS_MAX,

    _SC_EXPR_NEST_MAX,

    _SC_LINE_MAX,

    _SC_RE_DUP_MAX,

    _SC_CHARCLASS_NAME_MAX,


    _SC_2_VERSION,

    _SC_2_C_BIND,

    _SC_2_C_DEV,

    _SC_2_FORT_DEV,

    _SC_2_FORT_RUN,

    _SC_2_SW_DEV,

    _SC_2_LOCALEDEF,


    _SC_PII,

    _SC_PII_XTI,

    _SC_PII_SOCKET,

    _SC_PII_INTERNET,

    _SC_PII_OSI,

    _SC_POLL,

    _SC_SELECT,

    _SC_UIO_MAXIOV,

    _SC_IOV_MAX = _SC_UIO_MAXIOV,

    _SC_PII_INTERNET_STREAM,

    _SC_PII_INTERNET_DGRAM,

    _SC_PII_OSI_COTS,

    _SC_PII_OSI_CLTS,

    _SC_PII_OSI_M,

    _SC_T_IOV_MAX,



    _SC_THREADS,

    _SC_THREAD_SAFE_FUNCTIONS,

    _SC_GETGR_R_SIZE_MAX,

    _SC_GETPW_R_SIZE_MAX,

    _SC_LOGIN_NAME_MAX,

    _SC_TTY_NAME_MAX,

    _SC_THREAD_DESTRUCTOR_ITERATIONS,

    _SC_THREAD_KEYS_MAX,

    _SC_THREAD_STACK_MIN,

    _SC_THREAD_THREADS_MAX,

    _SC_THREAD_ATTR_STACKADDR,

    _SC_THREAD_ATTR_STACKSIZE,

    _SC_THREAD_PRIORITY_SCHEDULING,

    _SC_THREAD_PRIO_INHERIT,

    _SC_THREAD_PRIO_PROTECT,

    _SC_THREAD_PROCESS_SHARED,


    _SC_NPROCESSORS_CONF,

    _SC_NPROCESSORS_ONLN,

    _SC_PHYS_PAGES,

    _SC_AVPHYS_PAGES,

    _SC_ATEXIT_MAX,

    _SC_PASS_MAX,


    _SC_XOPEN_VERSION,

    _SC_XOPEN_XCU_VERSION,

    _SC_XOPEN_UNIX,

    _SC_XOPEN_CRYPT,

    _SC_XOPEN_ENH_I18N,

    _SC_XOPEN_SHM,


    _SC_2_CHAR_TERM,

    _SC_2_C_VERSION,

    _SC_2_UPE,


    _SC_XOPEN_XPG2,

    _SC_XOPEN_XPG3,

    _SC_XOPEN_XPG4,


    _SC_CHAR_BIT,

    _SC_CHAR_MAX,

    _SC_CHAR_MIN,

    _SC_INT_MAX,

    _SC_INT_MIN,

    _SC_LONG_BIT,

    _SC_WORD_BIT,

    _SC_MB_LEN_MAX,

    _SC_NZERO,

    _SC_SSIZE_MAX,

    _SC_SCHAR_MAX,

    _SC_SCHAR_MIN,

    _SC_SHRT_MAX,

    _SC_SHRT_MIN,

    _SC_UCHAR_MAX,

    _SC_UINT_MAX,

    _SC_ULONG_MAX,

    _SC_USHRT_MAX,


    _SC_NL_ARGMAX,

    _SC_NL_LANGMAX,

    _SC_NL_MSGMAX,

    _SC_NL_NMAX,

    _SC_NL_SETMAX,

    _SC_NL_TEXTMAX,


    _SC_XBS5_ILP32_OFF32,

    _SC_XBS5_ILP32_OFFBIG,

    _SC_XBS5_LP64_OFF64,

    _SC_XBS5_LPBIG_OFFBIG,


    _SC_XOPEN_LEGACY,

    _SC_XOPEN_REALTIME,

    _SC_XOPEN_REALTIME_THREADS,


    _SC_ADVISORY_INFO,

    _SC_BARRIERS,

    _SC_BASE,

    _SC_C_LANG_SUPPORT,

    _SC_C_LANG_SUPPORT_R,

    _SC_CLOCK_SELECTION,

    _SC_CPUTIME,

    _SC_THREAD_CPUTIME,

    _SC_DEVICE_IO,

    _SC_DEVICE_SPECIFIC,

    _SC_DEVICE_SPECIFIC_R,

    _SC_FD_MGMT,

    _SC_FIFO,

    _SC_PIPE,

    _SC_FILE_ATTRIBUTES,

    _SC_FILE_LOCKING,

    _SC_FILE_SYSTEM,

    _SC_MONOTONIC_CLOCK,

    _SC_MULTI_PROCESS,

    _SC_SINGLE_PROCESS,

    _SC_NETWORKING,

    _SC_READER_WRITER_LOCKS,

    _SC_SPIN_LOCKS,

    _SC_REGEXP,

    _SC_REGEX_VERSION,

    _SC_SHELL,

    _SC_SIGNALS,

    _SC_SPAWN,

    _SC_SPORADIC_SERVER,

    _SC_THREAD_SPORADIC_SERVER,

    _SC_SYSTEM_DATABASE,

    _SC_SYSTEM_DATABASE_R,

    _SC_TIMEOUTS,

    _SC_TYPED_MEMORY_OBJECTS,

    _SC_USER_GROUPS,

    _SC_USER_GROUPS_R,

    _SC_2_PBS,

    _SC_2_PBS_ACCOUNTING,

    _SC_2_PBS_LOCATE,

    _SC_2_PBS_MESSAGE,

    _SC_2_PBS_TRACK,

    _SC_SYMLOOP_MAX,

    _SC_STREAMS,

    _SC_2_PBS_CHECKPOINT,


    _SC_V6_ILP32_OFF32,

    _SC_V6_ILP32_OFFBIG,

    _SC_V6_LP64_OFF64,

    _SC_V6_LPBIG_OFFBIG,


    _SC_HOST_NAME_MAX,

    _SC_TRACE,

    _SC_TRACE_EVENT_FILTER,

    _SC_TRACE_INHERIT,

    _SC_TRACE_LOG,


    _SC_LEVEL1_ICACHE_SIZE,

    _SC_LEVEL1_ICACHE_ASSOC,

    _SC_LEVEL1_ICACHE_LINESIZE,

    _SC_LEVEL1_DCACHE_SIZE,

    _SC_LEVEL1_DCACHE_ASSOC,

    _SC_LEVEL1_DCACHE_LINESIZE,

    _SC_LEVEL2_CACHE_SIZE,

    _SC_LEVEL2_CACHE_ASSOC,

    _SC_LEVEL2_CACHE_LINESIZE,

    _SC_LEVEL3_CACHE_SIZE,

    _SC_LEVEL3_CACHE_ASSOC,

    _SC_LEVEL3_CACHE_LINESIZE,

    _SC_LEVEL4_CACHE_SIZE,

    _SC_LEVEL4_CACHE_ASSOC,

    _SC_LEVEL4_CACHE_LINESIZE,



    _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,

    _SC_RAW_SOCKETS

  };


enum
  {
    _CS_PATH,


    _CS_V6_WIDTH_RESTRICTED_ENVS,


    _CS_GNU_LIBC_VERSION,

    _CS_GNU_LIBPTHREAD_VERSION,


    _CS_LFS_CFLAGS = 1000,

    _CS_LFS_LDFLAGS,

    _CS_LFS_LIBS,

    _CS_LFS_LINTFLAGS,

    _CS_LFS64_CFLAGS,

    _CS_LFS64_LDFLAGS,

    _CS_LFS64_LIBS,

    _CS_LFS64_LINTFLAGS,


    _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,

    _CS_XBS5_ILP32_OFF32_LDFLAGS,

    _CS_XBS5_ILP32_OFF32_LIBS,

    _CS_XBS5_ILP32_OFF32_LINTFLAGS,

    _CS_XBS5_ILP32_OFFBIG_CFLAGS,

    _CS_XBS5_ILP32_OFFBIG_LDFLAGS,

    _CS_XBS5_ILP32_OFFBIG_LIBS,

    _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,

    _CS_XBS5_LP64_OFF64_CFLAGS,

    _CS_XBS5_LP64_OFF64_LDFLAGS,

    _CS_XBS5_LP64_OFF64_LIBS,

    _CS_XBS5_LP64_OFF64_LINTFLAGS,

    _CS_XBS5_LPBIG_OFFBIG_CFLAGS,

    _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,

    _CS_XBS5_LPBIG_OFFBIG_LIBS,

    _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,


    _CS_POSIX_V6_ILP32_OFF32_CFLAGS,

    _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,

    _CS_POSIX_V6_ILP32_OFF32_LIBS,

    _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,

    _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,

    _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,

    _CS_POSIX_V6_ILP32_OFFBIG_LIBS,

    _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,

    _CS_POSIX_V6_LP64_OFF64_CFLAGS,

    _CS_POSIX_V6_LP64_OFF64_LDFLAGS,

    _CS_POSIX_V6_LP64_OFF64_LIBS,

    _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,

    _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,

    _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,

    _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,

    _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS

  };
# 553 "/usr/include/unistd.h" 2 3 4


extern long int pathconf (__const char *__path, int __name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__));


extern long int sysconf (int __name) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__));




extern __pid_t getpid (void) __attribute__ ((__nothrow__));


extern __pid_t getppid (void) __attribute__ ((__nothrow__));




extern __pid_t getpgrp (void) __attribute__ ((__nothrow__));
# 589 "/usr/include/unistd.h" 3 4
extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__));
# 598 "/usr/include/unistd.h" 3 4
extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__));
# 615 "/usr/include/unistd.h" 3 4
extern int setpgrp (void) __attribute__ ((__nothrow__));
# 632 "/usr/include/unistd.h" 3 4
extern __pid_t setsid (void) __attribute__ ((__nothrow__));







extern __uid_t getuid (void) __attribute__ ((__nothrow__));


extern __uid_t geteuid (void) __attribute__ ((__nothrow__));


extern __gid_t getgid (void) __attribute__ ((__nothrow__));


extern __gid_t getegid (void) __attribute__ ((__nothrow__));




extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__)) ;
# 665 "/usr/include/unistd.h" 3 4
extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__));




extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__));




extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__));






extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__));




extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__));




extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__));
# 721 "/usr/include/unistd.h" 3 4
extern __pid_t fork (void) __attribute__ ((__nothrow__));






extern __pid_t vfork (void) __attribute__ ((__nothrow__));





extern char *ttyname (int __fd) __attribute__ ((__nothrow__));



extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ;



extern int isatty (int __fd) __attribute__ ((__nothrow__));





extern int ttyslot (void) __attribute__ ((__nothrow__));




extern int link (__const char *__from, __const char *__to)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ;
# 767 "/usr/include/unistd.h" 3 4
extern int symlink (__const char *__from, __const char *__to)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ;




extern ssize_t readlink (__const char *__restrict __path,
    char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ;
# 790 "/usr/include/unistd.h" 3 4
extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 799 "/usr/include/unistd.h" 3 4
extern int rmdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__));


extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__));






extern char *getlogin (void);







extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));




extern int setlogin (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 835 "/usr/include/unistd.h" 3 4
# 1 "/usr/include/getopt.h" 1 3 4
# 59 "/usr/include/getopt.h" 3 4
extern char *optarg;
# 73 "/usr/include/getopt.h" 3 4
extern int optind;




extern int opterr;



extern int optopt;
# 152 "/usr/include/getopt.h" 3 4
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
       __attribute__ ((__nothrow__));
# 836 "/usr/include/unistd.h" 2 3 4







extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern int sethostname (__const char *__name, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern int sethostid (long int __id) __attribute__ ((__nothrow__)) ;





extern int getdomainname (char *__name, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
extern int setdomainname (__const char *__name, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern int vhangup (void) __attribute__ ((__nothrow__));


extern int revoke (__const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;







extern int profil (unsigned short int *__sample_buffer, size_t __size,
     size_t __offset, unsigned int __scale)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int acct (__const char *__name) __attribute__ ((__nothrow__));



extern char *getusershell (void) __attribute__ ((__nothrow__));
extern void endusershell (void) __attribute__ ((__nothrow__));
extern void setusershell (void) __attribute__ ((__nothrow__));





extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__)) ;






extern int chroot (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1)));
# 921 "/usr/include/unistd.h" 3 4
extern int fsync (int __fd);






extern long int gethostid (void);


extern void sync (void) __attribute__ ((__nothrow__));




extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern int getdtablesize (void) __attribute__ ((__nothrow__));




extern int truncate (__const char *__file, __off_t __length)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 968 "/usr/include/unistd.h" 3 4
extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__)) ;
# 988 "/usr/include/unistd.h" 3 4
extern int brk (void *__addr) __attribute__ ((__nothrow__)) ;





extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__));
# 1009 "/usr/include/unistd.h" 3 4
extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__));
# 1032 "/usr/include/unistd.h" 3 4
extern int lockf (int __fd, int __cmd, __off_t __len) ;
# 1063 "/usr/include/unistd.h" 3 4
extern int fdatasync (int __fildes) __attribute__ ((__nothrow__));
# 1101 "/usr/include/unistd.h" 3 4

# 40 "main.c" 2
# 1 "/usr/include/termios.h" 1 3 4
# 36 "/usr/include/termios.h" 3 4




# 1 "/usr/include/bits/termios.h" 1 3 4
# 25 "/usr/include/bits/termios.h" 3 4
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;


struct termios
  {
    tcflag_t c_iflag;
    tcflag_t c_oflag;
    tcflag_t c_cflag;
    tcflag_t c_lflag;
    cc_t c_line;
    cc_t c_cc[32];
    speed_t c_ispeed;
    speed_t c_ospeed;


  };
# 41 "/usr/include/termios.h" 2 3 4
# 49 "/usr/include/termios.h" 3 4
extern speed_t cfgetospeed (__const struct termios *__termios_p) __attribute__ ((__nothrow__));


extern speed_t cfgetispeed (__const struct termios *__termios_p) __attribute__ ((__nothrow__));


extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__));


extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__));



extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__));




extern int tcgetattr (int __fd, struct termios *__termios_p) __attribute__ ((__nothrow__));



extern int tcsetattr (int __fd, int __optional_actions,
        __const struct termios *__termios_p) __attribute__ ((__nothrow__));




extern void cfmakeraw (struct termios *__termios_p) __attribute__ ((__nothrow__));



extern int tcsendbreak (int __fd, int __duration) __attribute__ ((__nothrow__));





extern int tcdrain (int __fd);



extern int tcflush (int __fd, int __queue_selector) __attribute__ ((__nothrow__));



extern int tcflow (int __fd, int __action) __attribute__ ((__nothrow__));
# 105 "/usr/include/termios.h" 3 4
# 1 "/usr/include/sys/ttydefaults.h" 1 3 4
# 106 "/usr/include/termios.h" 2 3 4



# 41 "main.c" 2

# 1 "/usr/include/linux/kd.h" 1 3 4


# 1 "/usr/include/linux/types.h" 1 3 4




# 1 "/usr/include/linux/posix_types.h" 1 3 4



# 1 "/usr/include/linux/stddef.h" 1 3 4
# 5 "/usr/include/linux/posix_types.h" 2 3 4
# 36 "/usr/include/linux/posix_types.h" 3 4
typedef struct {
 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
} __kernel_fd_set;


typedef void (*__kernel_sighandler_t)(int);


typedef int __kernel_key_t;
typedef int __kernel_mqd_t;

# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/asm/posix_types.h" 1 3 4
# 14 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/asm/posix_types.h" 3 4
# 1 "/usr/include/asm/posix_types.h" 1 3 4






# 1 "/usr/include/asm-i386/posix_types.h" 1 3 4
# 10 "/usr/include/asm-i386/posix_types.h" 3 4
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
typedef long __kernel_off_t;
typedef int __kernel_pid_t;
typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;

typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
typedef unsigned short __kernel_old_dev_t;


typedef long long __kernel_loff_t;


typedef struct {



 int __val[2];

} __kernel_fsid_t;
# 8 "/usr/include/asm/posix_types.h" 2 3 4
# 15 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/asm/posix_types.h" 2 3 4
# 48 "/usr/include/linux/posix_types.h" 2 3 4
# 6 "/usr/include/linux/types.h" 2 3 4
# 1 "/usr/include/asm/types.h" 1 3 4






# 1 "/usr/include/asm-i386/types.h" 1 3 4





typedef unsigned short umode_t;






typedef __signed__ char __s8;
typedef unsigned char __u8;

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;


typedef __signed__ long long __s64;
typedef unsigned long long __u64;
# 8 "/usr/include/asm/types.h" 2 3 4
# 7 "/usr/include/linux/types.h" 2 3 4
# 153 "/usr/include/linux/types.h" 3 4
typedef __u16 __le16;
typedef __u16 __be16;
typedef __u32 __le32;
typedef __u32 __be32;

typedef __u64 __le64;
typedef __u64 __be64;

typedef __u16 __sum16;
typedef __u32 __wsum;


struct ustat {
 __kernel_daddr_t f_tfree;
 __kernel_ino_t f_tinode;
 char f_fname[6];
 char f_fpack[6];
};
# 4 "/usr/include/linux/kd.h" 2 3 4
# 12 "/usr/include/linux/kd.h" 3 4
struct consolefontdesc {
 unsigned short charcount;
 unsigned short charheight;
 char *chardata;
};
# 52 "/usr/include/linux/kd.h" 3 4
typedef char scrnmap_t;







struct unipair {
 unsigned short unicode;
 unsigned short fontpos;
};
struct unimapdesc {
 unsigned short entry_ct;
 struct unipair *entries;
};


struct unimapinit {
 unsigned short advised_hashsize;
 unsigned short advised_hashstep;
 unsigned short advised_hashlevel;
};
# 97 "/usr/include/linux/kd.h" 3 4
struct kbentry {
 unsigned char kb_table;
 unsigned char kb_index;
 unsigned short kb_value;
};
# 110 "/usr/include/linux/kd.h" 3 4
struct kbsentry {
 unsigned char kb_func;
 unsigned char kb_string[512];
};



struct kbdiacr {
        unsigned char diacr, base, result;
};
struct kbdiacrs {
        unsigned int kb_cnt;
 struct kbdiacr kbdiacr[256];
};



struct kbkeycode {
 unsigned int scancode, keycode;
};





struct kbd_repeat {
 int delay;
 int period;

};






struct console_font_op {
 unsigned int op;
 unsigned int flags;
 unsigned int width, height;
 unsigned int charcount;
 unsigned char *data;
};

struct console_font {
 unsigned int width, height;
 unsigned int charcount;
 unsigned char *data;
};
# 43 "main.c" 2
# 55 "main.c"
# 1 "process.h" 1
# 28 "process.h"
# 1 "job.h" 1
# 27 "job.h"
# 1 "/usr/include/time.h" 1 3 4
# 31 "/usr/include/time.h" 3 4








# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 40 "/usr/include/time.h" 2 3 4



# 1 "/usr/include/bits/time.h" 1 3 4
# 44 "/usr/include/time.h" 2 3 4
# 59 "/usr/include/time.h" 3 4


typedef __clock_t clock_t;



# 132 "/usr/include/time.h" 3 4


struct tm
{
  int tm_sec;
  int tm_min;
  int tm_hour;
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_wday;
  int tm_yday;
  int tm_isdst;


  long int tm_gmtoff;
  __const char *tm_zone;




};








struct itimerspec
  {
    struct timespec it_interval;
    struct timespec it_value;
  };


struct sigevent;
# 181 "/usr/include/time.h" 3 4



extern clock_t clock (void) __attribute__ ((__nothrow__));


extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));


extern double difftime (time_t __time1, time_t __time0)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));





extern size_t strftime (char *__restrict __s, size_t __maxsize,
   __const char *__restrict __format,
   __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));

# 229 "/usr/include/time.h" 3 4



extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));



extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));





extern struct tm *gmtime_r (__const time_t *__restrict __timer,
       struct tm *__restrict __tp) __attribute__ ((__nothrow__));



extern struct tm *localtime_r (__const time_t *__restrict __timer,
          struct tm *__restrict __tp) __attribute__ ((__nothrow__));





extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));


extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));







extern char *asctime_r (__const struct tm *__restrict __tp,
   char *__restrict __buf) __attribute__ ((__nothrow__));


extern char *ctime_r (__const time_t *__restrict __timer,
        char *__restrict __buf) __attribute__ ((__nothrow__));




extern char *__tzname[2];
extern int __daylight;
extern long int __timezone;




extern char *tzname[2];



extern void tzset (void) __attribute__ ((__nothrow__));



extern int daylight;
extern long int timezone;





extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
# 312 "/usr/include/time.h" 3 4
extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));


extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));


extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
# 327 "/usr/include/time.h" 3 4
extern int nanosleep (__const struct timespec *__requested_time,
        struct timespec *__remaining);



extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));


extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));


extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
     __attribute__ ((__nothrow__));






extern int clock_nanosleep (clockid_t __clock_id, int __flags,
       __const struct timespec *__req,
       struct timespec *__rem);


extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__));




extern int timer_create (clockid_t __clock_id,
    struct sigevent *__restrict __evp,
    timer_t *__restrict __timerid) __attribute__ ((__nothrow__));


extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));


extern int timer_settime (timer_t __timerid, int __flags,
     __const struct itimerspec *__restrict __value,
     struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));


extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
     __attribute__ ((__nothrow__));


extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
# 416 "/usr/include/time.h" 3 4

# 28 "job.h" 2
# 38 "job.h"
# 1 "event.h" 1
# 38 "event.h"
typedef enum event_progress {
 EVENT_PENDING,
 EVENT_HANDLING,
 EVENT_FINISHED
} EventProgress;
# 61 "event.h"
typedef struct event {
 NihList entry;

 char *name;
 char **args;
 char **env;
} Event;
# 85 "event.h"
typedef struct event_emission {
 Event event;
 uint32_t id;
 EventProgress progress;

 int jobs;
 int failed;
} EventEmission;
# 172 "event.h"
NIH_BEGIN_EXTERN

int paused;
uint32_t emission_id;
int emission_id_wrapped;
NihList *events;


void event_init (void);

Event * event_new (const void *parent, const char *name)
 __attribute__ ((warn_unused_result, malloc));
Event * event_copy (const void *parent,
          const Event *old_event)
 __attribute__ ((warn_unused_result, malloc));

int event_match (Event *event1, Event *event2);

EventEmission *event_emit (const char *name,
          char **args, char **env)
 __attribute__ ((malloc));
EventEmission *event_emit_find_by_id (uint32_t id);
void event_emit_finished (EventEmission *emission);

void event_poll (void);

NIH_END_EXTERN
# 39 "job.h" 2
# 95 "job.h"
typedef struct job_process {
 int script;
 char *command;
 pid_t pid;
} JobProcess;
# 153 "job.h"
typedef struct job Job;
struct job {
 NihList entry;
 uint32_t id;

 char *name;
 char *description;
 char *author;
 char *version;

 Job *replacement;
 Job *replacement_for;
 Job *instance_of;

 JobGoal goal;
 JobState state;

 EventEmission *cause;
 EventEmission *blocked;

 int failed;
 ProcessType failed_process;
 int exit_status;

 NihList start_events;
 NihList stop_events;
 NihList emits;

 JobProcess **process;

 int *normalexit;
 size_t normalexit_len;

 time_t kill_timeout;
 NihTimer *kill_timer;

 int instance;
 int service;
 int respawn;
 int respawn_limit;
 time_t respawn_interval;
 int respawn_count;
 time_t respawn_time;

 int daemon;
 char *pid_file;
 char *pid_binary;
 time_t pid_timeout;
 NihTimer *pid_timer;

 ConsoleType console;
 char **env;

 mode_t umask;
 int nice;
 struct rlimit *limits[__RLIMIT_NLIMITS];
 char *chroot;
 char *chdir;
};


NIH_BEGIN_EXTERN

uint32_t job_id;
int job_id_wrapped;
NihHash *jobs;


void job_init (void);

JobProcess *job_process_new (const void *parent)
 __attribute__ ((warn_unused_result, malloc));
JobProcess *job_process_copy (const void *parent,
           const JobProcess *old_process)
 __attribute__ ((warn_unused_result, malloc));

Job * job_new (const void *parent, const char *name)
 __attribute__ ((warn_unused_result, malloc));
Job * job_copy (const void *parent, const Job *old_job)
 __attribute__ ((warn_unused_result, malloc));

Job * job_find_by_name (const char *name);
Job * job_find_by_pid (pid_t pid, ProcessType *process);
Job * job_find_by_id (uint32_t id);

Job * job_instance (Job *job);
void job_change_goal (Job *job, JobGoal goal,
           EventEmission *emission);

void job_change_state (Job *job, JobState state);
JobState job_next_state (Job *job);

int job_should_replace (Job *job);

void job_run_process (Job *job, ProcessType process);
void job_kill_process (Job *job, ProcessType process);

void job_child_reaper (void *ptr, pid_t pid, int
           killed, int status);

void job_handle_event (EventEmission *emission);
void job_handle_event_finished (EventEmission *emission);

void job_detect_stalled (void);
void job_free_deleted (void);

NIH_END_EXTERN
# 29 "process.h" 2


NIH_BEGIN_EXTERN

pid_t process_spawn (Job *job, char * const argv[])
 __attribute__ ((warn_unused_result));
int process_kill (Job *job, pid_t pid, int force)
 __attribute__ ((warn_unused_result));

int process_setup_console (Job *job, ConsoleType type)
 __attribute__ ((warn_unused_result));

NIH_END_EXTERN
# 56 "main.c" 2


# 1 "control.h" 1
# 28 "control.h"
NIH_BEGIN_EXTERN


NihIo *control_io;


NihIo *control_open (void)
 __attribute__ ((warn_unused_result, malloc));
void control_close (void);

void control_send_job_status (pid_t pid, Job *job);
void control_send_instance (pid_t pid, Job *job);

NIH_END_EXTERN
# 59 "main.c" 2
# 1 "cfgfile.h" 1
# 41 "cfgfile.h"
NIH_BEGIN_EXTERN

Job * cfg_read_job (const void *parent, const char *filename,
    const char *jobname)
 __attribute__ ((malloc));

NihWatch *cfg_watch_dir (const char *dirname, const char *prefix)
 __attribute__ ((malloc, warn_unused_result));

NIH_END_EXTERN
# 60 "main.c" 2
# 1 "paths.h" 1
# 61 "main.c" 2

# 1 "/usr/include/sys/mman.h" 1 3 4
# 26 "/usr/include/sys/mman.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 27 "/usr/include/sys/mman.h" 2 3 4
# 42 "/usr/include/sys/mman.h" 3 4
# 1 "/usr/include/bits/mman.h" 1 3 4
# 43 "/usr/include/sys/mman.h" 2 3 4





# 58 "/usr/include/sys/mman.h" 3 4
extern void *mmap (void *__addr, size_t __len, int __prot,
     int __flags, int __fd, __off_t __offset) __attribute__ ((__nothrow__));
# 77 "/usr/include/sys/mman.h" 3 4
extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__));




extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__));







extern int msync (void *__addr, size_t __len, int __flags);




extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__));



extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__));




extern int mlock (__const void *__addr, size_t __len) __attribute__ ((__nothrow__));


extern int munlock (__const void *__addr, size_t __len) __attribute__ ((__nothrow__));




extern int mlockall (int __flags) __attribute__ ((__nothrow__));



extern int munlockall (void) __attribute__ ((__nothrow__));







extern int mincore (void *__start, size_t __len, unsigned char *__vec)
     __attribute__ ((__nothrow__));
# 145 "/usr/include/sys/mman.h" 3 4
extern int shm_open (__const char *__name, int __oflag, mode_t __mode);


extern int shm_unlink (__const char *__name);


# 63 "main.c" 2
# 1 "/usr/include/selinux/selinux.h" 1 3 4




# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 1 3 4
# 105 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 6 "/usr/include/selinux/selinux.h" 2 3 4






 extern int is_selinux_enabled(void);

 extern int is_selinux_mls_enabled(void);

 typedef char *security_context_t;


 extern void freecon(security_context_t con);


 extern void freeconary(security_context_t * con);





 extern int getcon(security_context_t * con);
 extern int getcon_raw(security_context_t * con);
# 39 "/usr/include/selinux/selinux.h" 3 4
 extern int setcon(security_context_t con);
 extern int setcon_raw(security_context_t con);



 extern int getpidcon(pid_t pid, security_context_t * con);
 extern int getpidcon_raw(pid_t pid, security_context_t * con);



 extern int getprevcon(security_context_t * con);
 extern int getprevcon_raw(security_context_t * con);




 extern int getexeccon(security_context_t * con);
 extern int getexeccon_raw(security_context_t * con);



 extern int setexeccon(security_context_t con);
 extern int setexeccon_raw(security_context_t con);




 extern int getfscreatecon(security_context_t * con);
 extern int getfscreatecon_raw(security_context_t * con);



 extern int setfscreatecon(security_context_t context);
 extern int setfscreatecon_raw(security_context_t context);




 extern int getkeycreatecon(security_context_t * con);
 extern int getkeycreatecon_raw(security_context_t * con);



 extern int setkeycreatecon(security_context_t context);
 extern int setkeycreatecon_raw(security_context_t context);




 extern int getsockcreatecon(security_context_t * con);
 extern int getsockcreatecon_raw(security_context_t * con);



 extern int setsockcreatecon(security_context_t context);
 extern int setsockcreatecon_raw(security_context_t context);





 extern int getfilecon(const char *path, security_context_t * con);
 extern int getfilecon_raw(const char *path, security_context_t * con);
 extern int lgetfilecon(const char *path, security_context_t * con);
 extern int lgetfilecon_raw(const char *path, security_context_t * con);
 extern int fgetfilecon(int fd, security_context_t * con);
 extern int fgetfilecon_raw(int fd, security_context_t * con);


 extern int setfilecon(const char *path, security_context_t con);
 extern int setfilecon_raw(const char *path, security_context_t con);
 extern int lsetfilecon(const char *path, security_context_t con);
 extern int lsetfilecon_raw(const char *path, security_context_t con);
 extern int fsetfilecon(int fd, security_context_t con);
 extern int fsetfilecon_raw(int fd, security_context_t con);





 extern int getpeercon(int fd, security_context_t * con);
 extern int getpeercon_raw(int fd, security_context_t * con);



 typedef unsigned int access_vector_t;
 typedef unsigned short security_class_t;

 struct av_decision {
  access_vector_t allowed;
  access_vector_t decided;
  access_vector_t auditallow;
  access_vector_t auditdeny;
  unsigned int seqno;
 };


 extern int security_compute_av(security_context_t scon,
           security_context_t tcon,
           security_class_t tclass,
           access_vector_t requested,
           struct av_decision *avd);
 extern int security_compute_av_raw(security_context_t scon,
        security_context_t tcon,
        security_class_t tclass,
        access_vector_t requested,
        struct av_decision *avd);



 extern int security_compute_create(security_context_t scon,
        security_context_t tcon,
        security_class_t tclass,
        security_context_t * newcon);
 extern int security_compute_create_raw(security_context_t scon,
            security_context_t tcon,
            security_class_t tclass,
            security_context_t * newcon);



 extern int security_compute_relabel(security_context_t scon,
         security_context_t tcon,
         security_class_t tclass,
         security_context_t * newcon);
 extern int security_compute_relabel_raw(security_context_t scon,
      security_context_t tcon,
      security_class_t tclass,
      security_context_t * newcon);



 extern int security_compute_member(security_context_t scon,
        security_context_t tcon,
        security_class_t tclass,
        security_context_t * newcon);
 extern int security_compute_member_raw(security_context_t scon,
            security_context_t tcon,
            security_class_t tclass,
            security_context_t * newcon);



 extern int security_compute_user(security_context_t scon,
      const char *username,
      security_context_t ** con);
 extern int security_compute_user_raw(security_context_t scon,
          const char *username,
          security_context_t ** con);


 extern int security_load_policy(void *data, size_t len);
# 206 "/usr/include/selinux/selinux.h" 3 4
 extern int selinux_mkload_policy(int preservebools);
# 223 "/usr/include/selinux/selinux.h" 3 4
 extern int selinux_init_load_policy(int *enforce);


 typedef struct {
  char *name;
  int value;
 } SELboolean;

 extern int security_set_boolean_list(size_t boolcnt,
          SELboolean * boollist,
          int permanent);




 extern int security_load_booleans(char *path);


 extern int security_check_context(security_context_t con);
 extern int security_check_context_raw(security_context_t con);


 extern int security_canonicalize_context(security_context_t con,
       security_context_t * canoncon);
 extern int security_canonicalize_context_raw(security_context_t con,
           security_context_t *
           canoncon);


 extern int security_getenforce(void);


 extern int security_setenforce(int value);


 extern int security_disable(void);


 extern int security_policyvers(void);


 extern int security_get_boolean_names(char ***names, int *len);


 extern int security_get_boolean_pending(const char *name);


 extern int security_get_boolean_active(const char *name);


 extern int security_set_boolean(const char *name, int value);


 extern int security_commit_booleans(void);




 extern security_class_t string_to_security_class(const char *name);


 extern access_vector_t string_to_av_perm(security_class_t tclass,
       const char *name);


 extern void print_access_vector(security_class_t tclass,
     access_vector_t av);




 extern void set_matchpathcon_printf(void (*f) (const char *fmt, ...));






 extern void set_matchpathcon_invalidcon(int (*f) (const char *path,
         unsigned lineno,
         char *context));





 extern void set_matchpathcon_canoncon(int (*f) (const char *path,
       unsigned lineno,
       char **context));





 extern void set_matchpathcon_flags(unsigned int flags);
# 327 "/usr/include/selinux/selinux.h" 3 4
 extern int matchpathcon_init(const char *path);



 extern int matchpathcon_init_prefix(const char *path,
         const char *prefix);


 extern void matchpathcon_fini(void);







 extern int matchpathcon(const char *path,
    mode_t mode, security_context_t * con);



 extern int matchpathcon_index(const char *path,
          mode_t mode, security_context_t * con);






 extern int matchpathcon_filespec_add(ino_t ino, int specind,
          const char *file);



 extern void matchpathcon_filespec_destroy(void);


 extern void matchpathcon_filespec_eval(void);



 extern void matchpathcon_checkmatches(char *str);




 extern int matchmediacon(const char *media, security_context_t * con);






 extern int selinux_getenforcemode(int *enforce);






 extern int selinux_getpolicytype(char **policytype);






 extern const char *selinux_policy_root(void);



 extern const char *selinux_binary_policy_path(void);
 extern const char *selinux_failsafe_context_path(void);
 extern const char *selinux_removable_context_path(void);
 extern const char *selinux_default_context_path(void);
 extern const char *selinux_user_contexts_path(void);
 extern const char *selinux_file_context_path(void);
 extern const char *selinux_file_context_homedir_path(void);
 extern const char *selinux_file_context_local_path(void);
 extern const char *selinux_homedir_context_path(void);
 extern const char *selinux_media_context_path(void);
 extern const char *selinux_contexts_path(void);
 extern const char *selinux_booleans_path(void);
 extern const char *selinux_customizable_types_path(void);
 extern const char *selinux_users_path(void);
 extern const char *selinux_usersconf_path(void);
 extern const char *selinux_translations_path(void);
 extern const char *selinux_netfilter_context_path(void);
 extern const char *selinux_path(void);



 extern int selinux_check_passwd_access(access_vector_t requested);
 extern int checkPasswdAccess(access_vector_t requested);





 void set_selinuxmnt(char *mnt);


 extern int rpm_execcon(unsigned int verified,
          const char *filename,
          char *const argv[], char *const envp[]);



 extern int is_context_customizable(security_context_t scontext);






 extern int selinux_trans_to_raw_context(security_context_t trans,
      security_context_t * rawp);
 extern int selinux_raw_to_trans_context(security_context_t raw,
      security_context_t * transp);






 extern int getseuserbyname(const char *linuxuser, char **seuser,
       char **level);


 int selinux_file_context_cmp(const security_context_t a,
         const security_context_t b);





 int selinux_file_context_verify(const char *path, mode_t mode);


 int selinux_lsetfilecon_default(const char *path);
# 64 "main.c" 2
# 1 "/usr/include/sepol/sepol.h" 1 3 4



# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 152 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 3 4
typedef int ptrdiff_t;
# 5 "/usr/include/sepol/sepol.h" 2 3 4


# 1 "/usr/include/sepol/user_record.h" 1 3 4



# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 5 "/usr/include/sepol/user_record.h" 2 3 4
# 1 "/usr/include/sepol/handle.h" 1 3 4



struct sepol_handle;
typedef struct sepol_handle sepol_handle_t;


sepol_handle_t *sepol_handle_create(void);


void sepol_handle_destroy(sepol_handle_t *);
# 6 "/usr/include/sepol/user_record.h" 2 3 4

struct sepol_user;
struct sepol_user_key;
typedef struct sepol_user sepol_user_t;
typedef struct sepol_user_key sepol_user_key_t;


extern int sepol_user_key_create(sepol_handle_t * handle,
     const char *name, sepol_user_key_t ** key);

extern void sepol_user_key_unpack(const sepol_user_key_t * key,
      const char **name);

extern int sepol_user_key_extract(sepol_handle_t * handle,
      const sepol_user_t * user,
      sepol_user_key_t ** key_ptr);

extern void sepol_user_key_free(sepol_user_key_t * key);

extern int sepol_user_compare(const sepol_user_t * user,
         const sepol_user_key_t * key);

extern int sepol_user_compare2(const sepol_user_t * user,
          const sepol_user_t * user2);


extern const char *sepol_user_get_name(const sepol_user_t * user);

extern int sepol_user_set_name(sepol_handle_t * handle,
          sepol_user_t * user, const char *name);


extern const char *sepol_user_get_mlslevel(const sepol_user_t * user);

extern int sepol_user_set_mlslevel(sepol_handle_t * handle,
       sepol_user_t * user, const char *mls_level);

extern const char *sepol_user_get_mlsrange(const sepol_user_t * user);

extern int sepol_user_set_mlsrange(sepol_handle_t * handle,
       sepol_user_t * user, const char *mls_range);


extern int sepol_user_get_num_roles(const sepol_user_t * user);

extern int sepol_user_add_role(sepol_handle_t * handle,
          sepol_user_t * user, const char *role);

extern void sepol_user_del_role(sepol_user_t * user, const char *role);

extern int sepol_user_has_role(const sepol_user_t * user, const char *role);

extern int sepol_user_get_roles(sepol_handle_t * handle,
    const sepol_user_t * user,
    const char ***roles_arr,
    unsigned int *num_roles);

extern int sepol_user_set_roles(sepol_handle_t * handle,
    sepol_user_t * user,
    const char **roles_arr, unsigned int num_roles);


extern int sepol_user_create(sepol_handle_t * handle, sepol_user_t ** user_ptr);

extern int sepol_user_clone(sepol_handle_t * handle,
       const sepol_user_t * user,
       sepol_user_t ** user_ptr);

extern void sepol_user_free(sepol_user_t * user);
# 8 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/context_record.h" 1 3 4





struct sepol_context;
typedef struct sepol_context sepol_context_t;





extern const char *sepol_context_get_user(const sepol_context_t * con);

extern int sepol_context_set_user(sepol_handle_t * handle,
      sepol_context_t * con, const char *user);


extern const char *sepol_context_get_role(const sepol_context_t * con);

extern int sepol_context_set_role(sepol_handle_t * handle,
      sepol_context_t * con, const char *role);


extern const char *sepol_context_get_type(const sepol_context_t * con);

extern int sepol_context_set_type(sepol_handle_t * handle,
      sepol_context_t * con, const char *type);


extern const char *sepol_context_get_mls(const sepol_context_t * con);

extern int sepol_context_set_mls(sepol_handle_t * handle,
     sepol_context_t * con, const char *mls_range);


extern int sepol_context_create(sepol_handle_t * handle,
    sepol_context_t ** con_ptr);

extern int sepol_context_clone(sepol_handle_t * handle,
          const sepol_context_t * con,
          sepol_context_t ** con_ptr);

extern void sepol_context_free(sepol_context_t * con);


extern int sepol_context_from_string(sepol_handle_t * handle,
         const char *str, sepol_context_t ** con);

extern int sepol_context_to_string(sepol_handle_t * handle,
       const sepol_context_t * con, char **str_ptr);
# 9 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/iface_record.h" 1 3 4






struct sepol_iface;
struct sepol_iface_key;
typedef struct sepol_iface sepol_iface_t;
typedef struct sepol_iface_key sepol_iface_key_t;


extern int sepol_iface_compare(const sepol_iface_t * iface,
          const sepol_iface_key_t * key);

extern int sepol_iface_compare2(const sepol_iface_t * iface,
    const sepol_iface_t * iface2);

extern void sepol_iface_key_unpack(const sepol_iface_key_t * key,
       const char **name);

extern int sepol_iface_key_create(sepol_handle_t * handle,
      const char *name,
      sepol_iface_key_t ** key_ptr);

extern int sepol_iface_key_extract(sepol_handle_t * handle,
       const sepol_iface_t * iface,
       sepol_iface_key_t ** key_ptr);

extern void sepol_iface_key_free(sepol_iface_key_t * key);


extern const char *sepol_iface_get_name(const sepol_iface_t * iface);

extern int sepol_iface_set_name(sepol_handle_t * handle,
    sepol_iface_t * iface, const char *name);


extern sepol_context_t *sepol_iface_get_ifcon(const sepol_iface_t * iface);

extern int sepol_iface_set_ifcon(sepol_handle_t * handle,
     sepol_iface_t * iface, sepol_context_t * con);

extern sepol_context_t *sepol_iface_get_msgcon(const sepol_iface_t * iface);

extern int sepol_iface_set_msgcon(sepol_handle_t * handle,
      sepol_iface_t * iface, sepol_context_t * con);


extern int sepol_iface_create(sepol_handle_t * handle,
         sepol_iface_t ** iface_ptr);

extern int sepol_iface_clone(sepol_handle_t * handle,
        const sepol_iface_t * iface,
        sepol_iface_t ** iface_ptr);

extern void sepol_iface_free(sepol_iface_t * iface);
# 10 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/port_record.h" 1 3 4






struct sepol_port;
struct sepol_port_key;
typedef struct sepol_port sepol_port_t;
typedef struct sepol_port_key sepol_port_key_t;





extern int sepol_port_compare(const sepol_port_t * port,
         const sepol_port_key_t * key);

extern int sepol_port_compare2(const sepol_port_t * port,
          const sepol_port_t * port2);

extern int sepol_port_key_create(sepol_handle_t * handle,
     int low, int high, int proto,
     sepol_port_key_t ** key_ptr);

extern void sepol_port_key_unpack(const sepol_port_key_t * key,
      int *low, int *high, int *proto);

extern int sepol_port_key_extract(sepol_handle_t * handle,
      const sepol_port_t * port,
      sepol_port_key_t ** key_ptr);

extern void sepol_port_key_free(sepol_port_key_t * key);


extern int sepol_port_get_proto(const sepol_port_t * port);

extern void sepol_port_set_proto(sepol_port_t * port, int proto);

extern const char *sepol_port_get_proto_str(int proto);


extern int sepol_port_get_low(const sepol_port_t * port);

extern int sepol_port_get_high(const sepol_port_t * port);

extern void sepol_port_set_port(sepol_port_t * port, int port_num);

extern void sepol_port_set_range(sepol_port_t * port, int low, int high);


extern sepol_context_t *sepol_port_get_con(const sepol_port_t * port);

extern int sepol_port_set_con(sepol_handle_t * handle,
         sepol_port_t * port, sepol_context_t * con);


extern int sepol_port_create(sepol_handle_t * handle, sepol_port_t ** port_ptr);

extern int sepol_port_clone(sepol_handle_t * handle,
       const sepol_port_t * port,
       sepol_port_t ** port_ptr);

extern void sepol_port_free(sepol_port_t * port);
# 11 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/boolean_record.h" 1 3 4



# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 5 "/usr/include/sepol/boolean_record.h" 2 3 4


struct sepol_bool;
struct sepol_bool_key;
typedef struct sepol_bool sepol_bool_t;
typedef struct sepol_bool_key sepol_bool_key_t;


extern int sepol_bool_key_create(sepol_handle_t * handle,
     const char *name, sepol_bool_key_t ** key);

extern void sepol_bool_key_unpack(const sepol_bool_key_t * key,
      const char **name);

extern int sepol_bool_key_extract(sepol_handle_t * handle,
      const sepol_bool_t * boolean,
      sepol_bool_key_t ** key_ptr);

extern void sepol_bool_key_free(sepol_bool_key_t * key);

extern int sepol_bool_compare(const sepol_bool_t * boolean,
         const sepol_bool_key_t * key);

extern int sepol_bool_compare2(const sepol_bool_t * boolean,
          const sepol_bool_t * boolean2);


extern const char *sepol_bool_get_name(const sepol_bool_t * boolean);

extern int sepol_bool_set_name(sepol_handle_t * handle,
          sepol_bool_t * boolean, const char *name);


extern int sepol_bool_get_value(const sepol_bool_t * boolean);

extern void sepol_bool_set_value(sepol_bool_t * boolean, int value);


extern int sepol_bool_create(sepol_handle_t * handle, sepol_bool_t ** bool_ptr);

extern int sepol_bool_clone(sepol_handle_t * handle,
       const sepol_bool_t * boolean,
       sepol_bool_t ** bool_ptr);

extern void sepol_bool_free(sepol_bool_t * boolean);
# 12 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/node_record.h" 1 3 4



# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 5 "/usr/include/sepol/node_record.h" 2 3 4



struct sepol_node;
struct sepol_node_key;
typedef struct sepol_node sepol_node_t;
typedef struct sepol_node_key sepol_node_key_t;





extern int sepol_node_compare(const sepol_node_t * node,
         const sepol_node_key_t * key);

extern int sepol_node_compare2(const sepol_node_t * node,
          const sepol_node_t * node2);

extern int sepol_node_key_create(sepol_handle_t * handle,
     const char *addr,
     const char *mask,
     int proto, sepol_node_key_t ** key_ptr);

extern void sepol_node_key_unpack(const sepol_node_key_t * key,
      const char **addr,
      const char **mask, int *proto);

extern int sepol_node_key_extract(sepol_handle_t * handle,
      const sepol_node_t * node,
      sepol_node_key_t ** key_ptr);

extern void sepol_node_key_free(sepol_node_key_t * key);


extern int sepol_node_get_addr(sepol_handle_t * handle,
          const sepol_node_t * node, char **addr);

extern int sepol_node_get_addr_bytes(sepol_handle_t * handle,
         const sepol_node_t * node,
         char **addr, size_t * addr_sz);

extern int sepol_node_set_addr(sepol_handle_t * handle,
          sepol_node_t * node,
          int proto, const char *addr);

extern int sepol_node_set_addr_bytes(sepol_handle_t * handle,
         sepol_node_t * node,
         const char *addr, size_t addr_sz);


extern int sepol_node_get_mask(sepol_handle_t * handle,
          const sepol_node_t * node, char **mask);

extern int sepol_node_get_mask_bytes(sepol_handle_t * handle,
         const sepol_node_t * node,
         char **mask, size_t * mask_sz);

extern int sepol_node_set_mask(sepol_handle_t * handle,
          sepol_node_t * node,
          int proto, const char *mask);

extern int sepol_node_set_mask_bytes(sepol_handle_t * handle,
         sepol_node_t * node,
         const char *mask, size_t mask_sz);


extern int sepol_node_get_proto(const sepol_node_t * node);

extern void sepol_node_set_proto(sepol_node_t * node, int proto);

extern const char *sepol_node_get_proto_str(int proto);


extern sepol_context_t *sepol_node_get_con(const sepol_node_t * node);

extern int sepol_node_set_con(sepol_handle_t * handle,
         sepol_node_t * node, sepol_context_t * con);


extern int sepol_node_create(sepol_handle_t * handle, sepol_node_t ** node_ptr);

extern int sepol_node_clone(sepol_handle_t * handle,
       const sepol_node_t * node,
       sepol_node_t ** node_ptr);

extern void sepol_node_free(sepol_node_t * node);
# 13 "/usr/include/sepol/sepol.h" 2 3 4

# 1 "/usr/include/sepol/booleans.h" 1 3 4



# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 5 "/usr/include/sepol/booleans.h" 2 3 4
# 1 "/usr/include/sepol/policydb.h" 1 3 4



# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 5 "/usr/include/sepol/policydb.h" 2 3 4




struct sepol_policy_file;
typedef struct sepol_policy_file sepol_policy_file_t;

struct sepol_policydb;
typedef struct sepol_policydb sepol_policydb_t;




extern int sepol_policy_file_create(sepol_policy_file_t ** pf);
extern void sepol_policy_file_free(sepol_policy_file_t * pf);
# 29 "/usr/include/sepol/policydb.h" 3 4
extern void sepol_policy_file_set_mem(sepol_policy_file_t * pf,
          char *data, size_t len);





extern int sepol_policy_file_get_len(sepol_policy_file_t * pf, size_t * len);






extern void sepol_policy_file_set_fp(sepol_policy_file_t * pf, FILE * fp);






extern void sepol_policy_file_set_handle(sepol_policy_file_t * pf,
      sepol_handle_t * handle);




extern int sepol_policydb_create(sepol_policydb_t ** p);
extern void sepol_policydb_free(sepol_policydb_t * p);
# 68 "/usr/include/sepol/policydb.h" 3 4
extern int sepol_policy_kern_vers_min(void);
extern int sepol_policy_kern_vers_max(void);







extern int sepol_policydb_set_typevers(sepol_policydb_t * p, unsigned int type);






extern int sepol_policydb_set_vers(sepol_policydb_t * p, unsigned int vers);






extern int sepol_policydb_read(sepol_policydb_t * p, sepol_policy_file_t * pf);






extern int sepol_policydb_write(sepol_policydb_t * p, sepol_policy_file_t * pf);






extern int sepol_policydb_from_image(sepol_handle_t * handle,
         void *data, size_t len,
         sepol_policydb_t * p);
# 116 "/usr/include/sepol/policydb.h" 3 4
extern int sepol_policydb_to_image(sepol_handle_t * handle,
       sepol_policydb_t * p,
       void **newdata, size_t * newlen);




extern int sepol_policydb_mls_enabled(const sepol_policydb_t * p);





extern int sepol_policydb_compat_net(const sepol_policydb_t * p);
# 6 "/usr/include/sepol/booleans.h" 2 3 4
# 16 "/usr/include/sepol/booleans.h" 3 4
extern int sepol_genbools(void *data, size_t len, char *boolpath);






extern int sepol_genbools_array(void *data, size_t len,
    char **names, int *values, int nel);



extern int sepol_bool_set(sepol_handle_t * handle,
     sepol_policydb_t * policydb,
     const sepol_bool_key_t * key,
     const sepol_bool_t * data);


extern int sepol_bool_count(sepol_handle_t * handle,
       const sepol_policydb_t * p, unsigned int *response);


extern int sepol_bool_exists(sepol_handle_t * handle,
        const sepol_policydb_t * policydb,
        const sepol_bool_key_t * key, int *response);


extern int sepol_bool_query(sepol_handle_t * handle,
       const sepol_policydb_t * p,
       const sepol_bool_key_t * key,
       sepol_bool_t ** response);







extern int sepol_bool_iterate(sepol_handle_t * handle,
         const sepol_policydb_t * policydb,
         int (*fn) (const sepol_bool_t * boolean,
      void *fn_arg), void *arg);
# 15 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/interfaces.h" 1 3 4
# 9 "/usr/include/sepol/interfaces.h" 3 4
extern int sepol_iface_count(sepol_handle_t * handle,
        const sepol_policydb_t * policydb,
        unsigned int *response);


extern int sepol_iface_exists(sepol_handle_t * handle,
         const sepol_policydb_t * policydb,
         const sepol_iface_key_t * key, int *response);



extern int sepol_iface_query(sepol_handle_t * handle,
        const sepol_policydb_t * policydb,
        const sepol_iface_key_t * key,
        sepol_iface_t ** response);



extern int sepol_iface_modify(sepol_handle_t * handle,
         sepol_policydb_t * policydb,
         const sepol_iface_key_t * key,
         const sepol_iface_t * data);







extern int sepol_iface_iterate(sepol_handle_t * handle,
          const sepol_policydb_t * policydb,
          int (*fn) (const sepol_iface_t * iface,
       void *fn_arg), void *arg);
# 16 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/ports.h" 1 3 4
# 9 "/usr/include/sepol/ports.h" 3 4
extern int sepol_port_count(sepol_handle_t * handle,
       const sepol_policydb_t * p, unsigned int *response);


extern int sepol_port_exists(sepol_handle_t * handle,
        const sepol_policydb_t * policydb,
        const sepol_port_key_t * key, int *response);


extern int sepol_port_query(sepol_handle_t * handle,
       const sepol_policydb_t * policydb,
       const sepol_port_key_t * key,
       sepol_port_t ** response);


extern int sepol_port_modify(sepol_handle_t * handle,
        sepol_policydb_t * policydb,
        const sepol_port_key_t * key,
        const sepol_port_t * data);







extern int sepol_port_iterate(sepol_handle_t * handle,
         const sepol_policydb_t * policydb,
         int (*fn) (const sepol_port_t * port,
      void *fn_arg), void *arg);
# 17 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/nodes.h" 1 3 4
# 9 "/usr/include/sepol/nodes.h" 3 4
extern int sepol_node_count(sepol_handle_t * handle,
       const sepol_policydb_t * p, unsigned int *response);


extern int sepol_node_exists(sepol_handle_t * handle,
        const sepol_policydb_t * policydb,
        const sepol_node_key_t * key, int *response);


extern int sepol_node_query(sepol_handle_t * handle,
       const sepol_policydb_t * policydb,
       const sepol_node_key_t * key,
       sepol_node_t ** response);


extern int sepol_node_modify(sepol_handle_t * handle,
        sepol_policydb_t * policydb,
        const sepol_node_key_t * key,
        const sepol_node_t * data);







extern int sepol_node_iterate(sepol_handle_t * handle,
         const sepol_policydb_t * policydb,
         int (*fn) (const sepol_node_t * node,
      void *fn_arg), void *arg);
# 18 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/users.h" 1 3 4






# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 8 "/usr/include/sepol/users.h" 2 3 4







extern int sepol_genusers(void *data, size_t len,
     const char *usersdir,
     void **newdata, size_t * newlen);




extern void sepol_set_delusers(int on);




extern int sepol_user_modify(sepol_handle_t * handle,
        sepol_policydb_t * policydb,
        const sepol_user_key_t * key,
        const sepol_user_t * data);


extern int sepol_user_count(sepol_handle_t * handle,
       const sepol_policydb_t * p, unsigned int *response);


extern int sepol_user_exists(sepol_handle_t * handle,
        const sepol_policydb_t * policydb,
        const sepol_user_key_t * key, int *response);


extern int sepol_user_query(sepol_handle_t * handle,
       const sepol_policydb_t * p,
       const sepol_user_key_t * key,
       sepol_user_t ** response);






extern int sepol_user_iterate(sepol_handle_t * handle,
         const sepol_policydb_t * policydb,
         int (*fn) (const sepol_user_t * user,
      void *fn_arg), void *arg);
# 19 "/usr/include/sepol/sepol.h" 2 3 4

# 1 "/usr/include/sepol/debug.h" 1 3 4






extern void sepol_debug(int on);






extern int sepol_msg_get_level(sepol_handle_t * handle);

extern const char *sepol_msg_get_channel(sepol_handle_t * handle);

extern const char *sepol_msg_get_fname(sepol_handle_t * handle);






extern void sepol_msg_set_callback(sepol_handle_t * handle,

       __attribute__ ((format(printf, 3, 4)))

       void (*msg_callback) (void *varg,
        sepol_handle_t *
        handle,
        const char *fmt, ...),
       void *msg_callback_arg);
# 21 "/usr/include/sepol/sepol.h" 2 3 4

# 1 "/usr/include/sepol/module.h" 1 3 4



# 1 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h" 1 3 4
# 5 "/usr/include/sepol/module.h" 2 3 4

# 1 "/usr/include/stdint.h" 1 3 4
# 28 "/usr/include/stdint.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/stdint.h" 2 3 4
# 49 "/usr/include/stdint.h" 3 4
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;

typedef unsigned int uint32_t;





__extension__
typedef unsigned long long int uint64_t;






typedef signed char int_least8_t;
typedef short int int_least16_t;
typedef int int_least32_t;



__extension__
typedef long long int int_least64_t;



typedef unsigned char uint_least8_t;
typedef unsigned short int uint_least16_t;
typedef unsigned int uint_least32_t;



__extension__
typedef unsigned long long int uint_least64_t;






typedef signed char int_fast8_t;





typedef int int_fast16_t;
typedef int int_fast32_t;
__extension__
typedef long long int int_fast64_t;



typedef unsigned char uint_fast8_t;





typedef unsigned int uint_fast16_t;
typedef unsigned int uint_fast32_t;
__extension__
typedef unsigned long long int uint_fast64_t;
# 129 "/usr/include/stdint.h" 3 4
typedef unsigned int uintptr_t;
# 138 "/usr/include/stdint.h" 3 4
__extension__
typedef long long int intmax_t;
__extension__
typedef unsigned long long int uintmax_t;
# 7 "/usr/include/sepol/module.h" 2 3 4




struct sepol_module_package;
typedef struct sepol_module_package sepol_module_package_t;



extern int sepol_module_package_create(sepol_module_package_t ** p);

extern void sepol_module_package_free(sepol_module_package_t * p);

extern char *sepol_module_package_get_file_contexts(sepol_module_package_t * p);

extern size_t sepol_module_package_get_file_contexts_len(sepol_module_package_t
        * p);

extern int sepol_module_package_set_file_contexts(sepol_module_package_t * p,
        char *data, size_t len);

extern char *sepol_module_package_get_seusers(sepol_module_package_t * p);

extern size_t sepol_module_package_get_seusers_len(sepol_module_package_t * p);

extern int sepol_module_package_set_seusers(sepol_module_package_t * p,
         char *data, size_t len);

extern char *sepol_module_package_get_user_extra(sepol_module_package_t * p);

extern size_t sepol_module_package_get_user_extra_len(sepol_module_package_t *
            p);

extern int sepol_module_package_set_user_extra(sepol_module_package_t * p,
            char *data, size_t len);

extern char *sepol_module_package_get_netfilter_contexts(sepol_module_package_t
        * p);

extern size_t
sepol_module_package_get_netfilter_contexts_len(sepol_module_package_t * p);

extern int sepol_module_package_set_netfilter_contexts(sepol_module_package_t *
             p, char *data,
             size_t len);

extern sepol_policydb_t *sepol_module_package_get_policy(sepol_module_package_t
        * p);

extern int sepol_link_packages(sepol_handle_t * handle,
          sepol_module_package_t * base,
          sepol_module_package_t ** modules,
          int num_modules, int verbose);

extern int sepol_module_package_read(sepol_module_package_t * mod,
         struct sepol_policy_file *file,
         int verbose);

extern int sepol_module_package_info(struct sepol_policy_file *file,
         int *type, char **name, char **version);

extern int sepol_module_package_write(sepol_module_package_t * p,
          struct sepol_policy_file *file);



extern int sepol_link_modules(sepol_handle_t * handle,
         sepol_policydb_t * base,
         sepol_policydb_t ** modules,
         size_t len, int verbose);

extern int sepol_expand_module(sepol_handle_t * handle,
          sepol_policydb_t * base,
          sepol_policydb_t * out, int verbose, int check);
# 23 "/usr/include/sepol/sepol.h" 2 3 4
# 1 "/usr/include/sepol/context.h" 1 3 4
# 10 "/usr/include/sepol/context.h" 3 4
extern int sepol_check_context(const char *context);



extern int sepol_context_check(sepol_handle_t * handle,
          const sepol_policydb_t * policydb,
          const sepol_context_t * context);

extern int sepol_mls_contains(sepol_handle_t * handle,
         const sepol_policydb_t * policydb,
         const char *mls1,
         const char *mls2, int *response);

extern int sepol_mls_check(sepol_handle_t * handle,
      const sepol_policydb_t * policydb, const char *mls);
# 24 "/usr/include/sepol/sepol.h" 2 3 4


extern int sepol_set_policydb_from_file(FILE * fp);
# 65 "main.c" 2
# 1 "/usr/include/sys/mount.h" 1 3 4
# 34 "/usr/include/sys/mount.h" 3 4
enum
{
  MS_RDONLY = 1,

  MS_NOSUID = 2,

  MS_NODEV = 4,

  MS_NOEXEC = 8,

  MS_SYNCHRONOUS = 16,

  MS_REMOUNT = 32,

  MS_MANDLOCK = 64,

  S_WRITE = 128,

  S_APPEND = 256,

  S_IMMUTABLE = 512,

  MS_NOATIME = 1024,

  MS_NODIRATIME = 2048,

  MS_BIND = 4096,

};
# 97 "/usr/include/sys/mount.h" 3 4
enum
{
  MNT_FORCE = 1

};





extern int mount (__const char *__special_file, __const char *__dir,
    __const char *__fstype, unsigned long int __rwflag,
    __const void *__data) __attribute__ ((__nothrow__));


extern int umount (__const char *__special_file) __attribute__ ((__nothrow__));


extern int umount2 (__const char *__special_file, int __flags) __attribute__ ((__nothrow__));


# 66 "main.c" 2
# 1 "/usr/include/ctype.h" 1 3 4
# 30 "/usr/include/ctype.h" 3 4

# 48 "/usr/include/ctype.h" 3 4
enum
{
  _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
  _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
  _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
  _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
  _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
  _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
  _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
  _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
  _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
  _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
  _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
  _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
};
# 81 "/usr/include/ctype.h" 3 4
extern __const unsigned short int **__ctype_b_loc (void)
     __attribute__ ((__const));
extern __const __int32_t **__ctype_tolower_loc (void)
     __attribute__ ((__const));
extern __const __int32_t **__ctype_toupper_loc (void)
     __attribute__ ((__const));
# 96 "/usr/include/ctype.h" 3 4






extern int isalnum (int) __attribute__ ((__nothrow__));
extern int isalpha (int) __attribute__ ((__nothrow__));
extern int iscntrl (int) __attribute__ ((__nothrow__));
extern int isdigit (int) __attribute__ ((__nothrow__));
extern int islower (int) __attribute__ ((__nothrow__));
extern int isgraph (int) __attribute__ ((__nothrow__));
extern int isprint (int) __attribute__ ((__nothrow__));
extern int ispunct (int) __attribute__ ((__nothrow__));
extern int isspace (int) __attribute__ ((__nothrow__));
extern int isupper (int) __attribute__ ((__nothrow__));
extern int isxdigit (int) __attribute__ ((__nothrow__));



extern int tolower (int __c) __attribute__ ((__nothrow__));


extern int toupper (int __c) __attribute__ ((__nothrow__));


# 142 "/usr/include/ctype.h" 3 4
extern int isascii (int __c) __attribute__ ((__nothrow__));



extern int toascii (int __c) __attribute__ ((__nothrow__));



extern int _toupper (int) __attribute__ ((__nothrow__));
extern int _tolower (int) __attribute__ ((__nothrow__));
# 323 "/usr/include/ctype.h" 3 4

# 67 "main.c" 2



static void reset_console (void);
static void crash_handler (int signum);
static void cad_handler (void *data, NihSignal *signal);
static void kbd_handler (void *data, NihSignal *signal);
static void pwr_handler (void *data, NihSignal *signal);
static void stop_handler (void *data, NihSignal *signal);
static void term_handler (void *data, NihSignal *signal);
# 85 "main.c"
static const char *argv0 = ((void *)0);







static int restart = FALSE;







static int rescue = FALSE;







static NihOption options[] = {
 { 0, "restart", ((void *)0), ((void *)0), ((void *)0), &restart, ((void *)0) },
 { 0, "rescue", ((void *)0), ((void *)0), ((void *)0), &rescue, ((void *)0) },


 { '-', "--", ((void *)0), ((void *)0), ((void *)0), ((void *)0), ((void *)0) },

 NIH_OPTION_LAST
};






int enforcing = -1;

static int load_policy(int *enforce) {
  int fd=-1, ret=-1;
  int rc=0, orig_enforce;
  struct stat sb;
  void *map;
  char policy_file[PATH_MAX];
  int policy_version=0;
  extern char *selinux_mnt;
  FILE *cfg;
  char *buf;

  buf = malloc((size_t)4096 * sizeof(char));
  if (!buf)
   return -1;

  int seconfig = -2;
  selinux_getenforcemode(&seconfig);


  mount("none", "/proc", "proc", 0, 0);
  cfg = fopen("/proc/cmdline","r");
  if (cfg) {
   char *tmp;
   if (fgets(buf, (size_t)4096, cfg) && (tmp = strstr(buf, "enforcing="))) {
    if (tmp == buf || ((*__ctype_b_loc ())[(int) ((*(tmp-1)))] & (unsigned short int) _ISspace)) {
     enforcing=atoi(tmp+10);
    }
   }
   fclose(cfg);
  }


  umount2("/proc",2);

  if (enforcing >=0)
   *enforce = enforcing;
  else if (seconfig == 1)
   *enforce = 1;

  if (mount("none", "/selinux/", "selinuxfs", 0, 0) < 0) {
   if ((*__errno_location ()) == 19) {
    printf("SELinux not supported by kernel: %s\n",strerror((*__errno_location ())));
    *enforce = 0;
    snprintf(buf, (size_t)4096, "Warning: SELinux not supported by kernel: %s\n",strerror((*__errno_location ())));


    return ret;
   } else {
    snprintf(buf, (size_t)4096, "Failed to mount %s: %s\n","/selinux/",strerror((*__errno_location ())));


    return -1;
   }
  }

  free(buf);

  selinux_mnt = "/selinux/";

  policy_version=security_policyvers();
  if (policy_version < 0) {
   printf( "Can't get policy version: %s\n", strerror((*__errno_location ())));
   goto UMOUNT;
  }

  orig_enforce = rc = security_getenforce();
  if (rc < 0) {
   printf( "Can't get SELinux enforcement flag: %s\n", strerror((*__errno_location ())));
   goto UMOUNT;
  }
  if (enforcing >= 0) {
   *enforce = enforcing;
  } else if (seconfig == -1) {
   *enforce = 0;
   rc = security_disable();
   if (rc == 0) umount("/selinux/");
   if (rc < 0) {
    rc = security_setenforce(0);
    if (rc < 0) {
     printf("Can't disable SELinux: %s\n", strerror((*__errno_location ())));
     goto UMOUNT;
    }
   }
   ret = 0;
   goto UMOUNT;
  } else if (seconfig >= 0) {
   *enforce = seconfig;
   if (orig_enforce != *enforce) {
    rc = security_setenforce(seconfig);
    if (rc < 0) {
     printf("Can't set SELinux enforcement flag: %s\n", strerror((*__errno_location ())));
     goto UMOUNT;
    }
   }
  }

  snprintf(policy_file,sizeof(policy_file),"%s.%d",selinux_binary_policy_path(),policy_version);
  fd = open(policy_file, O_RDONLY);
  if (fd < 0) {

   snprintf(policy_file,sizeof(policy_file),"%s.%d",selinux_binary_policy_path(),policy_version-1);
   fd = open(policy_file, O_RDONLY);
   if (fd < 0) {
    printf( "Can't open '%s.%d':  %s\n",
      selinux_binary_policy_path(),policy_version,strerror((*__errno_location ())));
    goto UMOUNT;
   }
  }

  if (fstat(fd, &sb) < 0) {
   printf("Can't stat '%s':  %s\n",
     policy_file, strerror((*__errno_location ())));
   goto UMOUNT;
  }

  map = mmap(((void *)0), sb.st_size, 0x1 | 0x2, 0x02, fd, 0);
  if (map == ((void *) -1)) {
   printf( "Can't map '%s':  %s\n",
     policy_file, strerror((*__errno_location ())));
   goto UMOUNT;
  }


  ret = sepol_genbools(map, sb.st_size, selinux_booleans_path());
  if (ret < 0) {
   if ((*__errno_location ()) == 2 || (*__errno_location ()) == 22) {

    printf("Warning!  Error while setting booleans:  %s\n", strerror((*__errno_location ())));
   } else {
    printf("Error while setting booleans:  %s\n", strerror((*__errno_location ())));
    goto UMOUNT;
   }
  }

  printf("Loading security policy\n");
  ret=security_load_policy(map, sb.st_size);
  if (ret < 0) {
   printf("security_load_policy failed\n");
  }

  UMOUNT:

  if ( fd >= 0) {
   close(fd);
  }
  return(ret);
 }
}






int
main (int argc,
      char *argv[])
{
 char **args;
 int ret;




 int enforce = 0;

 if (getenv("SELINUX_INIT") == ((void *)0)) {
  putenv("SELINUX_INIT=YES");
  if (load_policy(&enforce) == 0 ) {
   execv(myname, argv);
  } else {
   if (enforce > 0) {


    fprintf(stderr,"Enforcing mode requested but no policy loaded. Halting now.\n");
    exit(1);
   }
  }
 }




 argv0 = argv[0];
 nih_main_init (argv0);

 nih_option_set_synopsis (_("Process management daemon."));
 nih_option_set_help (
  _("This daemon is normally executed by the kernel and given "
    "process id 1 to denote its special status.  When executed "
    "by a user process, it will actually run /sbin/telinit."));

 args = nih_option_parser (((void *)0), argc, argv, options, FALSE);
 if (! args)
  exit (1);


 if (getuid ()) {
  nih_fatal (_("Need to be root"));
  exit (1);
 }


 if (getpid () > 1) {
  execv ("/sbin/telinit", argv);


  nih_fatal (_("Not being executed as init"));
  exit (1);
 }


 if (! control_open ()) {
  NihError *err;

  err = nih_error_get ();
  nih_fatal ("%s: %s", _("Unable to open control socket"),
      err->message);
  nih_free (err);

  exit (1);
 }


 if (cfg_watch_dir ("/etc/event.d", ((void *)0)) == (void *)-1) {
  NihError *err;

  err = nih_error_get ();
  nih_fatal ("%s: %s", _("Error parsing configuration"),
      err->message);
  nih_free (err);

  exit (1);
 }
# 377 "main.c"
 if (argc > 1) {
  char *arg_end;

  arg_end = argv[argc-1] + strlen (argv[argc-1]);
  *arg_end = ' ';
 }




 setsid ();


 openlog (program_name, 0x02, (3<<3));
 nih_log_set_logger (nih_logger_syslog);





 for (int i = 0; i < 3; i++)
  close (i);

 if (process_setup_console (((void *)0), CONSOLE_OUTPUT) < 0)
  nih_free (nih_error_get ());
 if (! (restart || rescue))
  reset_console ();


 setenv ("PATH", "/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin", TRUE);






 if (! (restart || rescue))
  nih_signal_reset ();

 nih_signal_set_handler (17, nih_signal_handler);
 nih_signal_set_handler (14, nih_signal_handler);
 nih_signal_set_handler (1, nih_signal_handler);
 nih_signal_set_handler (20, nih_signal_handler);
 nih_signal_set_handler (18, nih_signal_handler);
 nih_signal_set_handler (15, nih_signal_handler);
 nih_signal_set_handler (2, nih_signal_handler);
 nih_signal_set_handler (28, nih_signal_handler);
 nih_signal_set_handler (30, nih_signal_handler);
 nih_signal_set_handler (11, crash_handler);
 nih_signal_set_handler (6, crash_handler);


 NIH_MUST (nih_signal_add_handler (((void *)0), 20, stop_handler, ((void *)0)));
 NIH_MUST (nih_signal_add_handler (((void *)0), 18, stop_handler, ((void *)0)));




 reboot (0);
 NIH_MUST (nih_signal_add_handler (((void *)0), 2, cad_handler, ((void *)0)));




 if (ioctl (0, 0x4B4E, 28) == 0)
  NIH_MUST (nih_signal_add_handler (((void *)0), 28,
        kbd_handler, ((void *)0)));


 NIH_MUST (nih_signal_add_handler (((void *)0), 30, pwr_handler, ((void *)0)));


 NIH_MUST (nih_signal_add_handler (((void *)0), 15,
       (NihSignalHandler)term_handler,
       ((void *)0)));


 NIH_MUST (nih_child_add_watch (((void *)0), -1, job_child_reaper, ((void *)0)));



 NIH_MUST (nih_main_loop_add_func (((void *)0), (NihMainLoopCb)event_poll,
       ((void *)0)));
 NIH_MUST (nih_main_loop_add_func (((void *)0), (NihMainLoopCb)job_detect_stalled,
       ((void *)0)));
 NIH_MUST (nih_main_loop_add_func (((void *)0), (NihMainLoopCb)job_free_deleted,
       ((void *)0)));






 if (!(restart || rescue)) {
  event_emit ("startup", ((void *)0), ((void *)0));
 } else {
  sigset_t mask;


  sigemptyset (&mask);
  sigprocmask (2, &mask, ((void *)0));
 }


 nih_main_loop_interrupt ();
 ret = nih_main_loop ();

 return ret;
}
# 494 "main.c"
static void
reset_console (void)
{
 struct termios tty;

 tcgetattr (0, &tty);

 tty.c_cflag &= (0010017 | 0010000 | 0000060 | 0000100 | 0000400 | 0001000);
 tty.c_cflag |= (0002000 | 0004000 | 0000200);


 tty.c_cc[0] = 3;
 tty.c_cc[1] = 28;
 tty.c_cc[2] = 127;
 tty.c_cc[3] = 24;
 tty.c_cc[4] = 4;
 tty.c_cc[5] = 0;
 tty.c_cc[6] = 1;
 tty.c_cc[8] = 17;
 tty.c_cc[9] = 19;
 tty.c_cc[10] = 26;


 tty.c_iflag = (0000004 | 0000400 | 0002000 | 0004000);
 tty.c_oflag = (0000001 | 0000004);
 tty.c_lflag = (0000001 | 0000002 | 0000010 | 0001000 | 0002000 | 0004000);


 tcsetattr (0, 0, &tty);
 tcflush (0, 2);
}
# 541 "main.c"
static void
crash_handler (int signum)
{
 NihError *err;
 const char *loglevel = ((void *)0);
 sigset_t mask, oldmask;
 pid_t pid;

 nih_assert (argv0 != ((void *)0));

 pid = fork ();
 if (pid == 0) {
  struct sigaction act;
  struct rlimit limit;
  sigset_t mask;


  sigfillset (&mask);
  sigprocmask (2, &mask, ((void *)0));


  act.__sigaction_handler.sa_handler = ((__sighandler_t) 0);
  act.sa_flags = 0;
  sigemptyset (&act.sa_mask);
  sigaction (signum, &act, ((void *)0));


  chdir ("/");


  limit.rlim_cur = ((unsigned long int)(~0UL));
  limit.rlim_max = ((unsigned long int)(~0UL));
  setrlimit (RLIMIT_CORE, &limit);


  raise (signum);


  sigdelset (&mask, signum);
  sigprocmask (2, &mask, ((void *)0));


  pause ();
  exit (0);
 } else if (pid > 0) {

  waitpid (pid, ((void *)0), 0);

  nih_fatal (_("Caught %s, core dumped"),
      (signum == 11
       ? "segmentation fault" : "abort"));
 } else {
  nih_fatal (_("Caught %s, unable to dump core"),
      (signum == 11
       ? "segmentation fault" : "abort"));
 }
# 607 "main.c"
 sigfillset (&mask);
 sigprocmask (0, &mask, &oldmask);


 if (nih_log_priority <= NIH_LOG_DEBUG) {
  loglevel = "--debug";
 } else if (nih_log_priority <= NIH_LOG_INFO) {
  loglevel = "--verbose";
 } else if (nih_log_priority >= NIH_LOG_ERROR) {
  loglevel = "--error";
 } else {
  loglevel = ((void *)0);
 }
 execl (argv0, argv0, "--rescue", loglevel, ((void *)0));
 nih_error_raise_system ();

 err = nih_error_get ();
 nih_fatal (_("Failed to re-execute %s: %s"),
     "/sbin/init", err->message);
 nih_free (err);

 sigprocmask (2, &oldmask, ((void *)0));


 exit (1);
}
# 643 "main.c"
static void
cad_handler (void *data,
      NihSignal *signal)
{
 event_emit ("control-alt-delete", ((void *)0), ((void *)0));
}
# 659 "main.c"
static void
kbd_handler (void *data,
      NihSignal *signal)
{
 event_emit ("kbdrequest", ((void *)0), ((void *)0));
}
# 675 "main.c"
static void
pwr_handler (void *data,
      NihSignal *signal)
{
 event_emit ("power-status-changed", ((void *)0), ((void *)0));
}
# 691 "main.c"
static void
stop_handler (void *data,
       NihSignal *signal)
{
 nih_assert (signal != ((void *)0));

 if (signal->signum == 18) {
  nih_info (_("Event queue resumed"));
  paused = FALSE;
 } else {
  nih_info (_("Event queue paused"));
  paused = TRUE;
 }
}
# 715 "main.c"
static void
term_handler (void *data,
       NihSignal *signal)
{
 NihError *err;
 const char *loglevel;
 sigset_t mask, oldmask;

 nih_assert (argv0 != ((void *)0));
 nih_assert (signal != ((void *)0));

 nih_warn (_("Re-executing %s"), argv0);







 sigfillset (&mask);
 sigprocmask (0, &mask, &oldmask);


 if (nih_log_priority <= NIH_LOG_DEBUG) {
  loglevel = "--debug";
 } else if (nih_log_priority <= NIH_LOG_INFO) {
  loglevel = "--verbose";
 } else if (nih_log_priority >= NIH_LOG_ERROR) {
  loglevel = "--error";
 } else {
  loglevel = ((void *)0);
 }
 execl (argv0, argv0, "--restart", loglevel, ((void *)0));
 nih_error_raise_system ();

 err = nih_error_get ();
 nih_error (_("Failed to re-execute %s: %s"), argv0, err->message);
 nih_free (err);

 sigprocmask (2, &oldmask, ((void *)0));
}