# 1 "devopen.c"
|
# 1 "devopen.c"
|
# 1 ""
|
# 1 ""
|
# 1 ""
|
# 1 ""
|
# 1 "devopen.c"
|
# 1 "devopen.c"
|
# 15 "devopen.c"
|
# 15 "devopen.c"
|
# 1 "/projects/or32-uclinux/include/stdio.h" 1
|
# 1 "/projects/or32-uclinux/include/stdio.h" 1
|
# 28 "/projects/or32-uclinux/include/stdio.h"
|
# 28 "/projects/or32-uclinux/include/stdio.h"
|
# 1 "/projects/or32-uclinux/include/features.h" 1
|
# 1 "/projects/or32-uclinux/include/features.h" 1
|
# 292 "/projects/or32-uclinux/include/features.h"
|
# 292 "/projects/or32-uclinux/include/features.h"
|
# 1 "/projects/or32-uclinux/include/sys/cdefs.h" 1
|
# 1 "/projects/or32-uclinux/include/sys/cdefs.h" 1
|
# 293 "/projects/or32-uclinux/include/features.h" 2
|
# 293 "/projects/or32-uclinux/include/features.h" 2
|
# 327 "/projects/or32-uclinux/include/features.h"
|
# 327 "/projects/or32-uclinux/include/features.h"
|
# 1 "/projects/or32-uclinux/include/bits/uClibc_config.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/uClibc_config.h" 1
|
# 328 "/projects/or32-uclinux/include/features.h" 2
|
# 328 "/projects/or32-uclinux/include/features.h" 2
|
# 29 "/projects/or32-uclinux/include/stdio.h" 2
|
# 29 "/projects/or32-uclinux/include/stdio.h" 2
|
|
|
|
|
|
|
|
|
|
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 201 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h"
|
# 201 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h"
|
typedef unsigned int size_t;
|
typedef unsigned int size_t;
|
# 35 "/projects/or32-uclinux/include/stdio.h" 2
|
# 35 "/projects/or32-uclinux/include/stdio.h" 2
|
|
|
# 1 "/projects/or32-uclinux/include/bits/types.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/types.h" 1
|
# 29 "/projects/or32-uclinux/include/bits/types.h"
|
# 29 "/projects/or32-uclinux/include/bits/types.h"
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 30 "/projects/or32-uclinux/include/bits/types.h" 2
|
# 30 "/projects/or32-uclinux/include/bits/types.h" 2
|
|
|
|
|
typedef unsigned char __u_char;
|
typedef unsigned char __u_char;
|
typedef unsigned short __u_short;
|
typedef unsigned short __u_short;
|
typedef unsigned int __u_int;
|
typedef unsigned int __u_int;
|
typedef unsigned long __u_long;
|
typedef unsigned long __u_long;
|
|
|
__extension__ typedef unsigned long long int __u_quad_t;
|
__extension__ typedef unsigned long long int __u_quad_t;
|
__extension__ typedef long long int __quad_t;
|
__extension__ typedef long long int __quad_t;
|
# 49 "/projects/or32-uclinux/include/bits/types.h"
|
# 49 "/projects/or32-uclinux/include/bits/types.h"
|
typedef signed char __int8_t;
|
typedef signed char __int8_t;
|
typedef unsigned char __uint8_t;
|
typedef unsigned char __uint8_t;
|
typedef signed short int __int16_t;
|
typedef signed short int __int16_t;
|
typedef unsigned short int __uint16_t;
|
typedef unsigned short int __uint16_t;
|
typedef signed int __int32_t;
|
typedef signed int __int32_t;
|
typedef unsigned int __uint32_t;
|
typedef unsigned int __uint32_t;
|
|
|
__extension__ typedef signed long long int __int64_t;
|
__extension__ typedef signed long long int __int64_t;
|
__extension__ typedef unsigned long long int __uint64_t;
|
__extension__ typedef unsigned long long int __uint64_t;
|
|
|
typedef __quad_t *__qaddr_t;
|
typedef __quad_t *__qaddr_t;
|
|
|
|
|
|
|
typedef __u_int __dev_t;
|
typedef __u_int __dev_t;
|
typedef __u_int __uid_t;
|
typedef __u_int __uid_t;
|
typedef __u_int __gid_t;
|
typedef __u_int __gid_t;
|
typedef __u_int __ino_t;
|
typedef __u_int __ino_t;
|
typedef __u_int __mode_t;
|
typedef __u_int __mode_t;
|
typedef __u_short __nlink_t;
|
typedef __u_short __nlink_t;
|
typedef long int __off_t;
|
typedef long int __off_t;
|
typedef __quad_t __loff_t;
|
typedef __quad_t __loff_t;
|
typedef int __pid_t;
|
typedef int __pid_t;
|
typedef int __ssize_t;
|
typedef int __ssize_t;
|
typedef __u_long __rlim_t;
|
typedef __u_long __rlim_t;
|
typedef __u_quad_t __rlim64_t;
|
typedef __u_quad_t __rlim64_t;
|
typedef __u_int __id_t;
|
typedef __u_int __id_t;
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
int __val[2];
|
int __val[2];
|
} __fsid_t;
|
} __fsid_t;
|
|
|
|
|
typedef int __daddr_t;
|
typedef int __daddr_t;
|
typedef char *__caddr_t;
|
typedef char *__caddr_t;
|
typedef long int __time_t;
|
typedef long int __time_t;
|
typedef unsigned int __useconds_t;
|
typedef unsigned int __useconds_t;
|
typedef long int __suseconds_t;
|
typedef long int __suseconds_t;
|
typedef long int __swblk_t;
|
typedef long int __swblk_t;
|
|
|
typedef long int __clock_t;
|
typedef long int __clock_t;
|
|
|
|
|
typedef int __clockid_t;
|
typedef int __clockid_t;
|
|
|
|
|
typedef int __timer_t;
|
typedef int __timer_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int __key_t;
|
typedef int __key_t;
|
|
|
|
|
typedef unsigned short int __ipc_pid_t;
|
typedef unsigned short int __ipc_pid_t;
|
|
|
|
|
|
|
typedef long int __blksize_t;
|
typedef long int __blksize_t;
|
|
|
|
|
|
|
|
|
typedef long int __blkcnt_t;
|
typedef long int __blkcnt_t;
|
typedef __quad_t __blkcnt64_t;
|
typedef __quad_t __blkcnt64_t;
|
|
|
|
|
typedef __u_long __fsblkcnt_t;
|
typedef __u_long __fsblkcnt_t;
|
typedef __u_quad_t __fsblkcnt64_t;
|
typedef __u_quad_t __fsblkcnt64_t;
|
|
|
|
|
typedef __u_long __fsfilcnt_t;
|
typedef __u_long __fsfilcnt_t;
|
typedef __u_quad_t __fsfilcnt64_t;
|
typedef __u_quad_t __fsfilcnt64_t;
|
|
|
|
|
typedef __u_quad_t __ino64_t;
|
typedef __u_quad_t __ino64_t;
|
|
|
|
|
typedef __loff_t __off64_t;
|
typedef __loff_t __off64_t;
|
|
|
|
|
typedef long int __t_scalar_t;
|
typedef long int __t_scalar_t;
|
typedef unsigned long int __t_uscalar_t;
|
typedef unsigned long int __t_uscalar_t;
|
|
|
|
|
typedef int __intptr_t;
|
typedef int __intptr_t;
|
|
|
|
|
typedef unsigned int __socklen_t;
|
typedef unsigned int __socklen_t;
|
|
|
|
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/bits/pthreadtypes.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/pthreadtypes.h" 1
|
# 23 "/projects/or32-uclinux/include/bits/pthreadtypes.h"
|
# 23 "/projects/or32-uclinux/include/bits/pthreadtypes.h"
|
# 1 "/projects/or32-uclinux/include/bits/sched.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/sched.h" 1
|
# 68 "/projects/or32-uclinux/include/bits/sched.h"
|
# 68 "/projects/or32-uclinux/include/bits/sched.h"
|
struct __sched_param
|
struct __sched_param
|
{
|
{
|
int __sched_priority;
|
int __sched_priority;
|
};
|
};
|
# 24 "/projects/or32-uclinux/include/bits/pthreadtypes.h" 2
|
# 24 "/projects/or32-uclinux/include/bits/pthreadtypes.h" 2
|
|
|
|
|
struct _pthread_fastlock
|
struct _pthread_fastlock
|
{
|
{
|
long int __status;
|
long int __status;
|
int __spinlock;
|
int __spinlock;
|
|
|
};
|
};
|
|
|
|
|
|
|
typedef struct _pthread_descr_struct *_pthread_descr;
|
typedef struct _pthread_descr_struct *_pthread_descr;
|
|
|
|
|
|
|
|
|
|
|
typedef struct __pthread_attr_s
|
typedef struct __pthread_attr_s
|
{
|
{
|
int __detachstate;
|
int __detachstate;
|
int __schedpolicy;
|
int __schedpolicy;
|
struct __sched_param __schedparam;
|
struct __sched_param __schedparam;
|
int __inheritsched;
|
int __inheritsched;
|
int __scope;
|
int __scope;
|
size_t __guardsize;
|
size_t __guardsize;
|
int __stackaddr_set;
|
int __stackaddr_set;
|
void *__stackaddr;
|
void *__stackaddr;
|
size_t __stacksize;
|
size_t __stacksize;
|
} pthread_attr_t;
|
} pthread_attr_t;
|
|
|
|
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
struct _pthread_fastlock __c_lock;
|
struct _pthread_fastlock __c_lock;
|
_pthread_descr __c_waiting;
|
_pthread_descr __c_waiting;
|
} pthread_cond_t;
|
} pthread_cond_t;
|
|
|
|
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
int __dummy;
|
int __dummy;
|
} pthread_condattr_t;
|
} pthread_condattr_t;
|
|
|
|
|
typedef unsigned int pthread_key_t;
|
typedef unsigned int pthread_key_t;
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
int __m_reserved;
|
int __m_reserved;
|
int __m_count;
|
int __m_count;
|
_pthread_descr __m_owner;
|
_pthread_descr __m_owner;
|
int __m_kind;
|
int __m_kind;
|
struct _pthread_fastlock __m_lock;
|
struct _pthread_fastlock __m_lock;
|
} pthread_mutex_t;
|
} pthread_mutex_t;
|
|
|
|
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
int __mutexkind;
|
int __mutexkind;
|
} pthread_mutexattr_t;
|
} pthread_mutexattr_t;
|
|
|
|
|
|
|
typedef int pthread_once_t;
|
typedef int pthread_once_t;
|
# 140 "/projects/or32-uclinux/include/bits/pthreadtypes.h"
|
# 140 "/projects/or32-uclinux/include/bits/pthreadtypes.h"
|
typedef unsigned long int pthread_t;
|
typedef unsigned long int pthread_t;
|
# 146 "/projects/or32-uclinux/include/bits/types.h" 2
|
# 146 "/projects/or32-uclinux/include/bits/types.h" 2
|
# 37 "/projects/or32-uclinux/include/stdio.h" 2
|
# 37 "/projects/or32-uclinux/include/stdio.h" 2
|
|
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/sys/types.h" 1
|
# 1 "/projects/or32-uclinux/include/sys/types.h" 1
|
# 28 "/projects/or32-uclinux/include/sys/types.h"
|
# 28 "/projects/or32-uclinux/include/sys/types.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef __u_char u_char;
|
typedef __u_char u_char;
|
typedef __u_short u_short;
|
typedef __u_short u_short;
|
typedef __u_int u_int;
|
typedef __u_int u_int;
|
typedef __u_long u_long;
|
typedef __u_long u_long;
|
typedef __quad_t quad_t;
|
typedef __quad_t quad_t;
|
typedef __u_quad_t u_quad_t;
|
typedef __u_quad_t u_quad_t;
|
typedef __fsid_t fsid_t;
|
typedef __fsid_t fsid_t;
|
|
|
|
|
|
|
|
|
typedef __loff_t loff_t;
|
typedef __loff_t loff_t;
|
|
|
|
|
|
|
typedef __ino_t ino_t;
|
typedef __ino_t ino_t;
|
# 61 "/projects/or32-uclinux/include/sys/types.h"
|
# 61 "/projects/or32-uclinux/include/sys/types.h"
|
typedef __dev_t dev_t;
|
typedef __dev_t dev_t;
|
|
|
|
|
|
|
|
|
typedef __gid_t gid_t;
|
typedef __gid_t gid_t;
|
|
|
|
|
|
|
|
|
typedef __mode_t mode_t;
|
typedef __mode_t mode_t;
|
|
|
|
|
|
|
|
|
typedef __nlink_t nlink_t;
|
typedef __nlink_t nlink_t;
|
|
|
|
|
|
|
|
|
typedef __uid_t uid_t;
|
typedef __uid_t uid_t;
|
|
|
|
|
|
|
|
|
|
|
typedef __off_t off_t;
|
typedef __off_t off_t;
|
# 99 "/projects/or32-uclinux/include/sys/types.h"
|
# 99 "/projects/or32-uclinux/include/sys/types.h"
|
typedef __pid_t pid_t;
|
typedef __pid_t pid_t;
|
|
|
|
|
|
|
|
|
typedef __id_t id_t;
|
typedef __id_t id_t;
|
|
|
|
|
|
|
|
|
typedef __ssize_t ssize_t;
|
typedef __ssize_t ssize_t;
|
|
|
|
|
|
|
|
|
|
|
typedef __daddr_t daddr_t;
|
typedef __daddr_t daddr_t;
|
typedef __caddr_t caddr_t;
|
typedef __caddr_t caddr_t;
|
|
|
|
|
|
|
|
|
|
|
typedef __key_t key_t;
|
typedef __key_t key_t;
|
# 132 "/projects/or32-uclinux/include/sys/types.h"
|
# 132 "/projects/or32-uclinux/include/sys/types.h"
|
# 1 "/projects/or32-uclinux/include/time.h" 1
|
# 1 "/projects/or32-uclinux/include/time.h" 1
|
# 70 "/projects/or32-uclinux/include/time.h"
|
# 70 "/projects/or32-uclinux/include/time.h"
|
typedef __time_t time_t;
|
typedef __time_t time_t;
|
# 82 "/projects/or32-uclinux/include/time.h"
|
# 82 "/projects/or32-uclinux/include/time.h"
|
typedef __clockid_t clockid_t;
|
typedef __clockid_t clockid_t;
|
# 94 "/projects/or32-uclinux/include/time.h"
|
# 94 "/projects/or32-uclinux/include/time.h"
|
typedef __timer_t timer_t;
|
typedef __timer_t timer_t;
|
# 133 "/projects/or32-uclinux/include/sys/types.h" 2
|
# 133 "/projects/or32-uclinux/include/sys/types.h" 2
|
# 146 "/projects/or32-uclinux/include/sys/types.h"
|
# 146 "/projects/or32-uclinux/include/sys/types.h"
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 147 "/projects/or32-uclinux/include/sys/types.h" 2
|
# 147 "/projects/or32-uclinux/include/sys/types.h" 2
|
|
|
|
|
|
|
typedef unsigned long int ulong;
|
typedef unsigned long int ulong;
|
typedef unsigned short int ushort;
|
typedef unsigned short int ushort;
|
typedef unsigned int uint;
|
typedef unsigned int uint;
|
# 190 "/projects/or32-uclinux/include/sys/types.h"
|
# 190 "/projects/or32-uclinux/include/sys/types.h"
|
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
|
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
|
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
|
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
|
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
|
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
|
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
|
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
|
|
|
|
|
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
|
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
|
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
|
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
|
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
|
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
|
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
|
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
|
|
|
typedef int register_t __attribute__ ((__mode__ (__word__)));
|
typedef int register_t __attribute__ ((__mode__ (__word__)));
|
# 212 "/projects/or32-uclinux/include/sys/types.h"
|
# 212 "/projects/or32-uclinux/include/sys/types.h"
|
# 1 "/projects/or32-uclinux/include/endian.h" 1
|
# 1 "/projects/or32-uclinux/include/endian.h" 1
|
# 37 "/projects/or32-uclinux/include/endian.h"
|
# 37 "/projects/or32-uclinux/include/endian.h"
|
# 1 "/projects/or32-uclinux/include/bits/endian.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/endian.h" 1
|
# 38 "/projects/or32-uclinux/include/endian.h" 2
|
# 38 "/projects/or32-uclinux/include/endian.h" 2
|
# 213 "/projects/or32-uclinux/include/sys/types.h" 2
|
# 213 "/projects/or32-uclinux/include/sys/types.h" 2
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/sys/select.h" 1
|
# 1 "/projects/or32-uclinux/include/sys/select.h" 1
|
# 31 "/projects/or32-uclinux/include/sys/select.h"
|
# 31 "/projects/or32-uclinux/include/sys/select.h"
|
# 1 "/projects/or32-uclinux/include/bits/select.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/select.h" 1
|
# 32 "/projects/or32-uclinux/include/sys/select.h" 2
|
# 32 "/projects/or32-uclinux/include/sys/select.h" 2
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/bits/sigset.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/sigset.h" 1
|
# 23 "/projects/or32-uclinux/include/bits/sigset.h"
|
# 23 "/projects/or32-uclinux/include/bits/sigset.h"
|
typedef int __sig_atomic_t;
|
typedef int __sig_atomic_t;
|
|
|
|
|
|
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
|
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
|
} __sigset_t;
|
} __sigset_t;
|
# 35 "/projects/or32-uclinux/include/sys/select.h" 2
|
# 35 "/projects/or32-uclinux/include/sys/select.h" 2
|
|
|
|
|
|
|
typedef __sigset_t sigset_t;
|
typedef __sigset_t sigset_t;
|
|
|
|
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/time.h" 1
|
# 1 "/projects/or32-uclinux/include/time.h" 1
|
# 106 "/projects/or32-uclinux/include/time.h"
|
# 106 "/projects/or32-uclinux/include/time.h"
|
struct timespec
|
struct timespec
|
{
|
{
|
long int tv_sec;
|
long int tv_sec;
|
long int tv_nsec;
|
long int tv_nsec;
|
};
|
};
|
# 44 "/projects/or32-uclinux/include/sys/select.h" 2
|
# 44 "/projects/or32-uclinux/include/sys/select.h" 2
|
|
|
# 1 "/projects/or32-uclinux/include/bits/time.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/time.h" 1
|
# 63 "/projects/or32-uclinux/include/bits/time.h"
|
# 63 "/projects/or32-uclinux/include/bits/time.h"
|
struct timeval
|
struct timeval
|
{
|
{
|
__time_t tv_sec;
|
__time_t tv_sec;
|
__suseconds_t tv_usec;
|
__suseconds_t tv_usec;
|
};
|
};
|
# 46 "/projects/or32-uclinux/include/sys/select.h" 2
|
# 46 "/projects/or32-uclinux/include/sys/select.h" 2
|
|
|
|
|
|
|
typedef long int __fd_mask;
|
typedef long int __fd_mask;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
__fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
|
__fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
|
|
|
|
|
} fd_set;
|
} fd_set;
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef __fd_mask fd_mask;
|
typedef __fd_mask fd_mask;
|
# 89 "/projects/or32-uclinux/include/sys/select.h"
|
# 89 "/projects/or32-uclinux/include/sys/select.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int select (int __nfds, fd_set *__restrict __readfds,
|
extern int select (int __nfds, fd_set *__restrict __readfds,
|
fd_set *__restrict __writefds,
|
fd_set *__restrict __writefds,
|
fd_set *__restrict __exceptfds,
|
fd_set *__restrict __exceptfds,
|
struct timeval *__restrict __timeout) ;
|
struct timeval *__restrict __timeout) ;
|
# 112 "/projects/or32-uclinux/include/sys/select.h"
|
# 112 "/projects/or32-uclinux/include/sys/select.h"
|
|
|
# 216 "/projects/or32-uclinux/include/sys/types.h" 2
|
# 216 "/projects/or32-uclinux/include/sys/types.h" 2
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/sys/sysmacros.h" 1
|
# 1 "/projects/or32-uclinux/include/sys/sysmacros.h" 1
|
# 219 "/projects/or32-uclinux/include/sys/types.h" 2
|
# 219 "/projects/or32-uclinux/include/sys/types.h" 2
|
# 230 "/projects/or32-uclinux/include/sys/types.h"
|
# 230 "/projects/or32-uclinux/include/sys/types.h"
|
typedef __blkcnt_t blkcnt_t;
|
typedef __blkcnt_t blkcnt_t;
|
|
|
|
|
|
|
typedef __fsblkcnt_t fsblkcnt_t;
|
typedef __fsblkcnt_t fsblkcnt_t;
|
|
|
|
|
|
|
typedef __fsfilcnt_t fsfilcnt_t;
|
typedef __fsfilcnt_t fsfilcnt_t;
|
# 262 "/projects/or32-uclinux/include/sys/types.h"
|
# 262 "/projects/or32-uclinux/include/sys/types.h"
|
|
|
# 41 "/projects/or32-uclinux/include/stdio.h" 2
|
# 41 "/projects/or32-uclinux/include/stdio.h" 2
|
# 50 "/projects/or32-uclinux/include/stdio.h"
|
# 50 "/projects/or32-uclinux/include/stdio.h"
|
struct _UC_FILE {
|
struct _UC_FILE {
|
unsigned char *bufpos;
|
unsigned char *bufpos;
|
unsigned char *bufread;
|
unsigned char *bufread;
|
unsigned char *bufwrite;
|
unsigned char *bufwrite;
|
unsigned char *bufstart;
|
unsigned char *bufstart;
|
unsigned char *bufend;
|
unsigned char *bufend;
|
|
|
struct _UC_FILE * next;
|
struct _UC_FILE * next;
|
|
|
int fd;
|
int fd;
|
|
|
unsigned char mode;
|
unsigned char mode;
|
unsigned char ungot;
|
unsigned char ungot;
|
char unbuf[2];
|
char unbuf[2];
|
};
|
};
|
|
|
typedef struct _UC_FILE FILE;
|
typedef struct _UC_FILE FILE;
|
# 76 "/projects/or32-uclinux/include/stdio.h"
|
# 76 "/projects/or32-uclinux/include/stdio.h"
|
typedef struct _UC_FILE __FILE;
|
typedef struct _UC_FILE __FILE;
|
# 88 "/projects/or32-uclinux/include/stdio.h"
|
# 88 "/projects/or32-uclinux/include/stdio.h"
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stdarg.h" 1
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stdarg.h" 1
|
# 43 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stdarg.h"
|
# 43 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stdarg.h"
|
typedef __builtin_va_list __gnuc_va_list;
|
typedef __builtin_va_list __gnuc_va_list;
|
# 89 "/projects/or32-uclinux/include/stdio.h" 2
|
# 89 "/projects/or32-uclinux/include/stdio.h" 2
|
|
|
|
|
|
|
|
|
typedef __off_t fpos_t;
|
typedef __off_t fpos_t;
|
# 151 "/projects/or32-uclinux/include/stdio.h"
|
# 151 "/projects/or32-uclinux/include/stdio.h"
|
# 1 "/projects/or32-uclinux/include/bits/stdio_lim.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/stdio_lim.h" 1
|
# 152 "/projects/or32-uclinux/include/stdio.h" 2
|
# 152 "/projects/or32-uclinux/include/stdio.h" 2
|
|
|
|
|
|
|
extern FILE *stdin;
|
extern FILE *stdin;
|
extern FILE *stdout;
|
extern FILE *stdout;
|
extern FILE *stderr;
|
extern FILE *stderr;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int remove (__const char *__filename) ;
|
extern int remove (__const char *__filename) ;
|
|
|
extern int rename (__const char *__old, __const char *__new) ;
|
extern int rename (__const char *__old, __const char *__new) ;
|
|
|
|
|
|
|
|
|
extern FILE *tmpfile (void) ;
|
extern FILE *tmpfile (void) ;
|
# 183 "/projects/or32-uclinux/include/stdio.h"
|
# 183 "/projects/or32-uclinux/include/stdio.h"
|
extern char *tmpnam (char *__s) ;
|
extern char *tmpnam (char *__s) ;
|
|
|
|
|
|
|
|
|
extern char *tmpnam_r (char *__s) ;
|
extern char *tmpnam_r (char *__s) ;
|
# 200 "/projects/or32-uclinux/include/stdio.h"
|
# 200 "/projects/or32-uclinux/include/stdio.h"
|
extern char *tempnam (__const char *__dir, __const char *__pfx)
|
extern char *tempnam (__const char *__dir, __const char *__pfx)
|
__attribute__ ((__malloc__));
|
__attribute__ ((__malloc__));
|
|
|
|
|
|
|
|
|
extern int fclose (FILE *__stream) ;
|
extern int fclose (FILE *__stream) ;
|
|
|
extern int fflush (FILE *__stream) ;
|
extern int fflush (FILE *__stream) ;
|
|
|
|
|
|
|
extern int fflush_unlocked (FILE *__stream) ;
|
extern int fflush_unlocked (FILE *__stream) ;
|
# 224 "/projects/or32-uclinux/include/stdio.h"
|
# 224 "/projects/or32-uclinux/include/stdio.h"
|
extern FILE *fopen (__const char *__restrict __filename,
|
extern FILE *fopen (__const char *__restrict __filename,
|
__const char *__restrict __modes) ;
|
__const char *__restrict __modes) ;
|
|
|
extern FILE *freopen (__const char *__restrict __filename,
|
extern FILE *freopen (__const char *__restrict __filename,
|
__const char *__restrict __modes,
|
__const char *__restrict __modes,
|
FILE *__restrict __stream) ;
|
FILE *__restrict __stream) ;
|
# 254 "/projects/or32-uclinux/include/stdio.h"
|
# 254 "/projects/or32-uclinux/include/stdio.h"
|
extern FILE *fdopen (int __fd, __const char *__modes) ;
|
extern FILE *fdopen (int __fd, __const char *__modes) ;
|
# 278 "/projects/or32-uclinux/include/stdio.h"
|
# 278 "/projects/or32-uclinux/include/stdio.h"
|
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) ;
|
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) ;
|
|
|
|
|
|
|
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
|
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
|
int __modes, size_t __n) ;
|
int __modes, size_t __n) ;
|
|
|
|
|
|
|
|
|
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
|
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
|
size_t __size) ;
|
size_t __size) ;
|
|
|
|
|
extern void setlinebuf (FILE *__stream) ;
|
extern void setlinebuf (FILE *__stream) ;
|
|
|
|
|
|
|
|
|
extern int fprintf (FILE *__restrict __stream,
|
extern int fprintf (FILE *__restrict __stream,
|
__const char *__restrict __format, ...) ;
|
__const char *__restrict __format, ...) ;
|
|
|
extern int printf (__const char *__restrict __format, ...) ;
|
extern int printf (__const char *__restrict __format, ...) ;
|
|
|
extern int sprintf (char *__restrict __s,
|
extern int sprintf (char *__restrict __s,
|
__const char *__restrict __format, ...) ;
|
__const char *__restrict __format, ...) ;
|
|
|
|
|
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
|
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
|
__gnuc_va_list __arg) ;
|
__gnuc_va_list __arg) ;
|
|
|
extern int vprintf (__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,
|
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
|
__gnuc_va_list __arg) ;
|
__gnuc_va_list __arg) ;
|
|
|
|
|
|
|
extern int snprintf (char *__restrict __s, size_t __maxlen,
|
extern int snprintf (char *__restrict __s, size_t __maxlen,
|
__const char *__restrict __format, ...)
|
__const char *__restrict __format, ...)
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
|
|
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
|
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
|
__const char *__restrict __format, __gnuc_va_list __arg)
|
__const char *__restrict __format, __gnuc_va_list __arg)
|
__attribute__ ((__format__ (__printf__, 3, 0)));
|
__attribute__ ((__format__ (__printf__, 3, 0)));
|
# 349 "/projects/or32-uclinux/include/stdio.h"
|
# 349 "/projects/or32-uclinux/include/stdio.h"
|
extern int fscanf (FILE *__restrict __stream,
|
extern int fscanf (FILE *__restrict __stream,
|
__const char *__restrict __format, ...) ;
|
__const char *__restrict __format, ...) ;
|
|
|
extern int scanf (__const char *__restrict __format, ...) ;
|
extern int scanf (__const char *__restrict __format, ...) ;
|
|
|
extern int sscanf (__const char *__restrict __s,
|
extern int sscanf (__const char *__restrict __s,
|
__const char *__restrict __format, ...) ;
|
__const char *__restrict __format, ...) ;
|
# 375 "/projects/or32-uclinux/include/stdio.h"
|
# 375 "/projects/or32-uclinux/include/stdio.h"
|
extern int fgetc (FILE *__stream) ;
|
extern int fgetc (FILE *__stream) ;
|
extern int getc (FILE *__stream) ;
|
extern int getc (FILE *__stream) ;
|
|
|
|
|
extern int getchar (void) ;
|
extern int getchar (void) ;
|
# 389 "/projects/or32-uclinux/include/stdio.h"
|
# 389 "/projects/or32-uclinux/include/stdio.h"
|
extern int getc_unlocked (FILE *__stream) ;
|
extern int getc_unlocked (FILE *__stream) ;
|
extern int getchar_unlocked (void) ;
|
extern int getchar_unlocked (void) ;
|
|
|
|
|
|
|
|
|
extern int fgetc_unlocked (FILE *__stream) ;
|
extern int fgetc_unlocked (FILE *__stream) ;
|
|
|
|
|
|
|
|
|
extern int fputc (int __c, FILE *__stream) ;
|
extern int fputc (int __c, FILE *__stream) ;
|
extern int putc (int __c, FILE *__stream) ;
|
extern int putc (int __c, FILE *__stream) ;
|
|
|
|
|
extern int putchar (int __c) ;
|
extern int putchar (int __c) ;
|
# 414 "/projects/or32-uclinux/include/stdio.h"
|
# 414 "/projects/or32-uclinux/include/stdio.h"
|
extern int fputc_unlocked (int __c, FILE *__stream) ;
|
extern int fputc_unlocked (int __c, FILE *__stream) ;
|
|
|
|
|
|
|
|
|
extern int putc_unlocked (int __c, FILE *__stream) ;
|
extern int putc_unlocked (int __c, FILE *__stream) ;
|
extern int putchar_unlocked (int __c) ;
|
extern int putchar_unlocked (int __c) ;
|
|
|
|
|
|
|
|
|
|
|
extern int getw (FILE *__stream) ;
|
extern int getw (FILE *__stream) ;
|
|
|
|
|
extern int putw (int __w, FILE *__stream) ;
|
extern int putw (int __w, FILE *__stream) ;
|
|
|
|
|
|
|
|
|
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
|
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
|
;
|
;
|
# 446 "/projects/or32-uclinux/include/stdio.h"
|
# 446 "/projects/or32-uclinux/include/stdio.h"
|
extern char *gets (char *__s) ;
|
extern char *gets (char *__s) ;
|
# 470 "/projects/or32-uclinux/include/stdio.h"
|
# 470 "/projects/or32-uclinux/include/stdio.h"
|
extern int fputs (__const char *__restrict __s, FILE *__restrict __stream)
|
extern int fputs (__const char *__restrict __s, FILE *__restrict __stream)
|
;
|
;
|
# 481 "/projects/or32-uclinux/include/stdio.h"
|
# 481 "/projects/or32-uclinux/include/stdio.h"
|
extern int puts (__const char *__s) ;
|
extern int puts (__const char *__s) ;
|
|
|
|
|
|
|
extern int ungetc (int __c, FILE *__stream) ;
|
extern int ungetc (int __c, FILE *__stream) ;
|
|
|
|
|
|
|
extern size_t fread (void *__restrict __ptr, size_t __size,
|
extern size_t fread (void *__restrict __ptr, size_t __size,
|
size_t __n, FILE *__restrict __stream) ;
|
size_t __n, FILE *__restrict __stream) ;
|
|
|
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
|
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
|
size_t __n, FILE *__restrict __s) ;
|
size_t __n, FILE *__restrict __s) ;
|
|
|
|
|
|
|
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
|
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
|
size_t __n, FILE *__restrict __stream) ;
|
size_t __n, FILE *__restrict __stream) ;
|
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
|
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
|
size_t __n, FILE *__restrict __stream) ;
|
size_t __n, FILE *__restrict __stream) ;
|
|
|
|
|
|
|
|
|
extern int fseek (FILE *__stream, long int __off, int __whence) ;
|
extern int fseek (FILE *__stream, long int __off, int __whence) ;
|
|
|
extern long int ftell (FILE *__stream) ;
|
extern long int ftell (FILE *__stream) ;
|
|
|
extern void rewind (FILE *__stream) ;
|
extern void rewind (FILE *__stream) ;
|
# 525 "/projects/or32-uclinux/include/stdio.h"
|
# 525 "/projects/or32-uclinux/include/stdio.h"
|
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
|
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
|
;
|
;
|
|
|
extern int fsetpos (FILE *__stream, __const fpos_t *__pos) ;
|
extern int fsetpos (FILE *__stream, __const fpos_t *__pos) ;
|
# 561 "/projects/or32-uclinux/include/stdio.h"
|
# 561 "/projects/or32-uclinux/include/stdio.h"
|
extern void clearerr (FILE *__stream) ;
|
extern void clearerr (FILE *__stream) ;
|
|
|
extern int feof (FILE *__stream) ;
|
extern int feof (FILE *__stream) ;
|
|
|
extern int ferror (FILE *__stream) ;
|
extern int ferror (FILE *__stream) ;
|
|
|
|
|
|
|
extern void clearerr_unlocked (FILE *__stream) ;
|
extern void clearerr_unlocked (FILE *__stream) ;
|
extern int feof_unlocked (FILE *__stream) ;
|
extern int feof_unlocked (FILE *__stream) ;
|
extern int ferror_unlocked (FILE *__stream) ;
|
extern int ferror_unlocked (FILE *__stream) ;
|
|
|
|
|
|
|
|
|
extern void perror (__const char *__s) ;
|
extern void perror (__const char *__s) ;
|
|
|
|
|
|
|
|
|
extern int sys_nerr;
|
extern int sys_nerr;
|
extern __const char *__const sys_errlist[];
|
extern __const char *__const sys_errlist[];
|
# 593 "/projects/or32-uclinux/include/stdio.h"
|
# 593 "/projects/or32-uclinux/include/stdio.h"
|
extern int fileno (FILE *__stream) ;
|
extern int fileno (FILE *__stream) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int fileno_unlocked (FILE *__stream) ;
|
extern int fileno_unlocked (FILE *__stream) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern FILE *popen (__const char *__command, __const char *__modes) ;
|
extern FILE *popen (__const char *__command, __const char *__modes) ;
|
|
|
|
|
extern int pclose (FILE *__stream) ;
|
extern int pclose (FILE *__stream) ;
|
|
|
|
|
|
|
|
|
|
|
extern char *ctermid (char *__s) ;
|
extern char *ctermid (char *__s) ;
|
# 643 "/projects/or32-uclinux/include/stdio.h"
|
# 643 "/projects/or32-uclinux/include/stdio.h"
|
extern void flockfile (FILE *__stream) ;
|
extern void flockfile (FILE *__stream) ;
|
|
|
|
|
|
|
extern int ftrylockfile (FILE *__stream) ;
|
extern int ftrylockfile (FILE *__stream) ;
|
|
|
|
|
extern void funlockfile (FILE *__stream) ;
|
extern void funlockfile (FILE *__stream) ;
|
# 667 "/projects/or32-uclinux/include/stdio.h"
|
# 667 "/projects/or32-uclinux/include/stdio.h"
|
|
|
# 16 "devopen.c" 2
|
# 16 "devopen.c" 2
|
# 1 "/projects/or32-uclinux/include/stdlib.h" 1
|
# 1 "/projects/or32-uclinux/include/stdlib.h" 1
|
# 35 "/projects/or32-uclinux/include/stdlib.h"
|
# 35 "/projects/or32-uclinux/include/stdlib.h"
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 36 "/projects/or32-uclinux/include/stdlib.h" 2
|
# 36 "/projects/or32-uclinux/include/stdlib.h" 2
|
|
|
|
|
# 96 "/projects/or32-uclinux/include/stdlib.h"
|
# 96 "/projects/or32-uclinux/include/stdlib.h"
|
typedef struct
|
typedef struct
|
{
|
{
|
int quot;
|
int quot;
|
int rem;
|
int rem;
|
} div_t;
|
} div_t;
|
|
|
|
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
long int quot;
|
long int quot;
|
long int rem;
|
long int rem;
|
} ldiv_t;
|
} ldiv_t;
|
# 135 "/projects/or32-uclinux/include/stdlib.h"
|
# 135 "/projects/or32-uclinux/include/stdlib.h"
|
extern size_t __ctype_get_mb_cur_max (void) ;
|
extern size_t __ctype_get_mb_cur_max (void) ;
|
|
|
|
|
|
|
extern double atof (__const char *__nptr) __attribute__ ((__pure__));
|
extern double atof (__const char *__nptr) __attribute__ ((__pure__));
|
|
|
extern int atoi (__const char *__nptr) __attribute__ ((__pure__));
|
extern int atoi (__const char *__nptr) __attribute__ ((__pure__));
|
|
|
extern long int atol (__const char *__nptr) __attribute__ ((__pure__));
|
extern long int atol (__const char *__nptr) __attribute__ ((__pure__));
|
|
|
|
|
|
|
__extension__ extern long long int atoll (__const char *__nptr)
|
__extension__ extern long long int atoll (__const char *__nptr)
|
__attribute__ ((__pure__));
|
__attribute__ ((__pure__));
|
|
|
|
|
|
|
extern double strtod (__const char *__restrict __nptr,
|
extern double strtod (__const char *__restrict __nptr,
|
char **__restrict __endptr) ;
|
char **__restrict __endptr) ;
|
# 165 "/projects/or32-uclinux/include/stdlib.h"
|
# 165 "/projects/or32-uclinux/include/stdlib.h"
|
extern long int strtol (__const char *__restrict __nptr,
|
extern long int strtol (__const char *__restrict __nptr,
|
char **__restrict __endptr, int __base) ;
|
char **__restrict __endptr, int __base) ;
|
|
|
extern unsigned long int strtoul (__const char *__restrict __nptr,
|
extern unsigned long int strtoul (__const char *__restrict __nptr,
|
char **__restrict __endptr, int __base)
|
char **__restrict __endptr, int __base)
|
;
|
;
|
|
|
|
|
|
|
__extension__
|
__extension__
|
extern long long int strtoq (__const char *__restrict __nptr,
|
extern long long int strtoq (__const char *__restrict __nptr,
|
char **__restrict __endptr, int __base) ;
|
char **__restrict __endptr, int __base) ;
|
|
|
__extension__
|
__extension__
|
extern unsigned long long int strtouq (__const char *__restrict __nptr,
|
extern unsigned long long int strtouq (__const char *__restrict __nptr,
|
char **__restrict __endptr, int __base)
|
char **__restrict __endptr, int __base)
|
;
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
__extension__
|
__extension__
|
extern long long int strtoll (__const char *__restrict __nptr,
|
extern long long int strtoll (__const char *__restrict __nptr,
|
char **__restrict __endptr, int __base) ;
|
char **__restrict __endptr, int __base) ;
|
|
|
__extension__
|
__extension__
|
extern unsigned long long int strtoull (__const char *__restrict __nptr,
|
extern unsigned long long int strtoull (__const char *__restrict __nptr,
|
char **__restrict __endptr, int __base)
|
char **__restrict __endptr, int __base)
|
;
|
;
|
# 253 "/projects/or32-uclinux/include/stdlib.h"
|
# 253 "/projects/or32-uclinux/include/stdlib.h"
|
extern double __strtod_internal (__const char *__restrict __nptr,
|
extern double __strtod_internal (__const char *__restrict __nptr,
|
char **__restrict __endptr, int __group)
|
char **__restrict __endptr, int __group)
|
;
|
;
|
extern float __strtof_internal (__const char *__restrict __nptr,
|
extern float __strtof_internal (__const char *__restrict __nptr,
|
char **__restrict __endptr, int __group)
|
char **__restrict __endptr, int __group)
|
;
|
;
|
extern long double __strtold_internal (__const char *__restrict __nptr,
|
extern long double __strtold_internal (__const char *__restrict __nptr,
|
char **__restrict __endptr,
|
char **__restrict __endptr,
|
int __group) ;
|
int __group) ;
|
|
|
extern long int __strtol_internal (__const char *__restrict __nptr,
|
extern long int __strtol_internal (__const char *__restrict __nptr,
|
char **__restrict __endptr,
|
char **__restrict __endptr,
|
int __base, int __group) ;
|
int __base, int __group) ;
|
|
|
|
|
|
|
extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
|
extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
|
char **__restrict __endptr,
|
char **__restrict __endptr,
|
int __base, int __group) ;
|
int __base, int __group) ;
|
|
|
|
|
|
|
|
|
__extension__
|
__extension__
|
extern long long int __strtoll_internal (__const char *__restrict __nptr,
|
extern long long int __strtoll_internal (__const char *__restrict __nptr,
|
char **__restrict __endptr,
|
char **__restrict __endptr,
|
int __base, int __group) ;
|
int __base, int __group) ;
|
|
|
|
|
|
|
__extension__
|
__extension__
|
extern unsigned long long int __strtoull_internal (__const char *
|
extern unsigned long long int __strtoull_internal (__const char *
|
__restrict __nptr,
|
__restrict __nptr,
|
char **__restrict __endptr,
|
char **__restrict __endptr,
|
int __base, int __group)
|
int __base, int __group)
|
;
|
;
|
# 387 "/projects/or32-uclinux/include/stdlib.h"
|
# 387 "/projects/or32-uclinux/include/stdlib.h"
|
extern char *l64a (long int __n) ;
|
extern char *l64a (long int __n) ;
|
|
|
|
|
extern long int a64l (__const char *__s) __attribute__ ((__pure__));
|
extern long int a64l (__const char *__s) __attribute__ ((__pure__));
|
# 400 "/projects/or32-uclinux/include/stdlib.h"
|
# 400 "/projects/or32-uclinux/include/stdlib.h"
|
extern long int random (void) ;
|
extern long int random (void) ;
|
|
|
|
|
extern void srandom (unsigned int __seed) ;
|
extern void srandom (unsigned int __seed) ;
|
|
|
|
|
|
|
|
|
|
|
extern char *initstate (unsigned int __seed, char *__statebuf,
|
extern char *initstate (unsigned int __seed, char *__statebuf,
|
size_t __statelen) ;
|
size_t __statelen) ;
|
|
|
|
|
|
|
extern char *setstate (char *__statebuf) ;
|
extern char *setstate (char *__statebuf) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct random_data
|
struct random_data
|
{
|
{
|
int32_t *fptr;
|
int32_t *fptr;
|
int32_t *rptr;
|
int32_t *rptr;
|
int32_t *state;
|
int32_t *state;
|
int rand_type;
|
int rand_type;
|
int rand_deg;
|
int rand_deg;
|
int rand_sep;
|
int rand_sep;
|
int32_t *end_ptr;
|
int32_t *end_ptr;
|
};
|
};
|
|
|
extern int random_r (struct random_data *__restrict __buf,
|
extern int random_r (struct random_data *__restrict __buf,
|
int32_t *__restrict __result) ;
|
int32_t *__restrict __result) ;
|
|
|
extern int srandom_r (unsigned int __seed, struct random_data *__buf) ;
|
extern int srandom_r (unsigned int __seed, struct random_data *__buf) ;
|
|
|
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
|
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
|
size_t __statelen,
|
size_t __statelen,
|
struct random_data *__restrict __buf) ;
|
struct random_data *__restrict __buf) ;
|
|
|
extern int setstate_r (char *__restrict __statebuf,
|
extern int setstate_r (char *__restrict __statebuf,
|
struct random_data *__restrict __buf) ;
|
struct random_data *__restrict __buf) ;
|
|
|
|
|
|
|
|
|
|
|
extern int rand (void) ;
|
extern int rand (void) ;
|
|
|
extern void srand (unsigned int __seed) ;
|
extern void srand (unsigned int __seed) ;
|
|
|
|
|
|
|
extern int rand_r (unsigned int *__seed) ;
|
extern int rand_r (unsigned int *__seed) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern double drand48 (void) ;
|
extern double drand48 (void) ;
|
extern double erand48 (unsigned short int __xsubi[3]) ;
|
extern double erand48 (unsigned short int __xsubi[3]) ;
|
|
|
|
|
extern long int lrand48 (void) ;
|
extern long int lrand48 (void) ;
|
extern long int nrand48 (unsigned short int __xsubi[3]) ;
|
extern long int nrand48 (unsigned short int __xsubi[3]) ;
|
|
|
|
|
extern long int mrand48 (void) ;
|
extern long int mrand48 (void) ;
|
extern long int jrand48 (unsigned short int __xsubi[3]) ;
|
extern long int jrand48 (unsigned short int __xsubi[3]) ;
|
|
|
|
|
extern void srand48 (long int __seedval) ;
|
extern void srand48 (long int __seedval) ;
|
extern unsigned short int *seed48 (unsigned short int __seed16v[3]) ;
|
extern unsigned short int *seed48 (unsigned short int __seed16v[3]) ;
|
extern void lcong48 (unsigned short int __param[7]) ;
|
extern void lcong48 (unsigned short int __param[7]) ;
|
|
|
|
|
|
|
|
|
|
|
struct drand48_data
|
struct drand48_data
|
{
|
{
|
unsigned short int __x[3];
|
unsigned short int __x[3];
|
unsigned short int __old_x[3];
|
unsigned short int __old_x[3];
|
unsigned short int __c;
|
unsigned short int __c;
|
unsigned short int __init;
|
unsigned short int __init;
|
unsigned long long int __a;
|
unsigned long long int __a;
|
};
|
};
|
|
|
|
|
extern int drand48_r (struct drand48_data *__restrict __buffer,
|
extern int drand48_r (struct drand48_data *__restrict __buffer,
|
double *__restrict __result) ;
|
double *__restrict __result) ;
|
extern int erand48_r (unsigned short int __xsubi[3],
|
extern int erand48_r (unsigned short int __xsubi[3],
|
struct drand48_data *__restrict __buffer,
|
struct drand48_data *__restrict __buffer,
|
double *__restrict __result) ;
|
double *__restrict __result) ;
|
|
|
|
|
extern int lrand48_r (struct drand48_data *__restrict __buffer,
|
extern int lrand48_r (struct drand48_data *__restrict __buffer,
|
long int *__restrict __result) ;
|
long int *__restrict __result) ;
|
extern int nrand48_r (unsigned short int __xsubi[3],
|
extern int nrand48_r (unsigned short int __xsubi[3],
|
struct drand48_data *__restrict __buffer,
|
struct drand48_data *__restrict __buffer,
|
long int *__restrict __result) ;
|
long int *__restrict __result) ;
|
|
|
|
|
extern int mrand48_r (struct drand48_data *__restrict __buffer,
|
extern int mrand48_r (struct drand48_data *__restrict __buffer,
|
long int *__restrict __result) ;
|
long int *__restrict __result) ;
|
extern int jrand48_r (unsigned short int __xsubi[3],
|
extern int jrand48_r (unsigned short int __xsubi[3],
|
struct drand48_data *__restrict __buffer,
|
struct drand48_data *__restrict __buffer,
|
long int *__restrict __result) ;
|
long int *__restrict __result) ;
|
|
|
|
|
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
|
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
|
;
|
;
|
|
|
extern int seed48_r (unsigned short int __seed16v[3],
|
extern int seed48_r (unsigned short int __seed16v[3],
|
struct drand48_data *__buffer) ;
|
struct drand48_data *__buffer) ;
|
|
|
extern int lcong48_r (unsigned short int __param[7],
|
extern int lcong48_r (unsigned short int __param[7],
|
struct drand48_data *__buffer) ;
|
struct drand48_data *__buffer) ;
|
# 530 "/projects/or32-uclinux/include/stdlib.h"
|
# 530 "/projects/or32-uclinux/include/stdlib.h"
|
extern void *malloc (size_t __size) __attribute__ ((__malloc__));
|
extern void *malloc (size_t __size) __attribute__ ((__malloc__));
|
|
|
extern void *calloc (size_t __nmemb, size_t __size)
|
extern void *calloc (size_t __nmemb, size_t __size)
|
__attribute__ ((__malloc__));
|
__attribute__ ((__malloc__));
|
|
|
|
|
|
|
|
|
|
|
extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__malloc__));
|
extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__malloc__));
|
|
|
extern void free (void *__ptr) ;
|
extern void free (void *__ptr) ;
|
|
|
|
|
|
|
extern void cfree (void *__ptr) ;
|
extern void cfree (void *__ptr) ;
|
|
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/alloca.h" 1
|
# 1 "/projects/or32-uclinux/include/alloca.h" 1
|
# 25 "/projects/or32-uclinux/include/alloca.h"
|
# 25 "/projects/or32-uclinux/include/alloca.h"
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 26 "/projects/or32-uclinux/include/alloca.h" 2
|
# 26 "/projects/or32-uclinux/include/alloca.h" 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern void *alloca (size_t __size) ;
|
extern void *alloca (size_t __size) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
# 550 "/projects/or32-uclinux/include/stdlib.h" 2
|
# 550 "/projects/or32-uclinux/include/stdlib.h" 2
|
|
|
|
|
|
|
|
|
extern void *valloc (size_t __size) __attribute__ ((__malloc__));
|
extern void *valloc (size_t __size) __attribute__ ((__malloc__));
|
# 564 "/projects/or32-uclinux/include/stdlib.h"
|
# 564 "/projects/or32-uclinux/include/stdlib.h"
|
extern void abort (void) __attribute__ ((__noreturn__));
|
extern void abort (void) __attribute__ ((__noreturn__));
|
|
|
|
|
|
|
extern int atexit (void (*__func) (void)) ;
|
extern int atexit (void (*__func) (void)) ;
|
# 577 "/projects/or32-uclinux/include/stdlib.h"
|
# 577 "/projects/or32-uclinux/include/stdlib.h"
|
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
|
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
|
;
|
;
|
|
|
|
|
|
|
|
|
|
|
extern void exit (int __status) __attribute__ ((__noreturn__));
|
extern void exit (int __status) __attribute__ ((__noreturn__));
|
# 594 "/projects/or32-uclinux/include/stdlib.h"
|
# 594 "/projects/or32-uclinux/include/stdlib.h"
|
extern char *getenv (__const char *__name) ;
|
extern char *getenv (__const char *__name) ;
|
|
|
|
|
|
|
extern char *__secure_getenv (__const char *__name) ;
|
extern char *__secure_getenv (__const char *__name) ;
|
|
|
|
|
|
|
|
|
|
|
extern int putenv (char *__string) ;
|
extern int putenv (char *__string) ;
|
|
|
|
|
|
|
|
|
|
|
extern int setenv (__const char *__name, __const char *__value, int __replace)
|
extern int setenv (__const char *__name, __const char *__value, int __replace)
|
;
|
;
|
|
|
|
|
extern int unsetenv (__const char *__name) ;
|
extern int unsetenv (__const char *__name) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int clearenv (void) ;
|
extern int clearenv (void) ;
|
# 630 "/projects/or32-uclinux/include/stdlib.h"
|
# 630 "/projects/or32-uclinux/include/stdlib.h"
|
extern char *mktemp (char *__template) ;
|
extern char *mktemp (char *__template) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int mkstemp (char *__template) ;
|
extern int mkstemp (char *__template) ;
|
# 657 "/projects/or32-uclinux/include/stdlib.h"
|
# 657 "/projects/or32-uclinux/include/stdlib.h"
|
extern char *mkdtemp (char *__template) ;
|
extern char *mkdtemp (char *__template) ;
|
|
|
|
|
|
|
|
|
extern int system (__const char *__command) ;
|
extern int system (__const char *__command) ;
|
# 680 "/projects/or32-uclinux/include/stdlib.h"
|
# 680 "/projects/or32-uclinux/include/stdlib.h"
|
extern char *realpath (__const char *__restrict __name,
|
extern char *realpath (__const char *__restrict __name,
|
char *__restrict __resolved) ;
|
char *__restrict __resolved) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int (*__compar_fn_t) (__const void *, __const void *);
|
typedef int (*__compar_fn_t) (__const void *, __const void *);
|
# 697 "/projects/or32-uclinux/include/stdlib.h"
|
# 697 "/projects/or32-uclinux/include/stdlib.h"
|
extern void *bsearch (__const void *__key, __const void *__base,
|
extern void *bsearch (__const void *__key, __const void *__base,
|
size_t __nmemb, size_t __size, __compar_fn_t __compar);
|
size_t __nmemb, size_t __size, __compar_fn_t __compar);
|
|
|
|
|
|
|
extern void qsort (void *__base, size_t __nmemb, size_t __size,
|
extern void qsort (void *__base, size_t __nmemb, size_t __size,
|
__compar_fn_t __compar);
|
__compar_fn_t __compar);
|
|
|
|
|
|
|
extern int abs (int __x) __attribute__ ((__const__));
|
extern int abs (int __x) __attribute__ ((__const__));
|
extern long int labs (long int __x) __attribute__ ((__const__));
|
extern long int labs (long int __x) __attribute__ ((__const__));
|
# 718 "/projects/or32-uclinux/include/stdlib.h"
|
# 718 "/projects/or32-uclinux/include/stdlib.h"
|
extern div_t div (int __numer, int __denom)
|
extern div_t div (int __numer, int __denom)
|
__attribute__ ((__const__));
|
__attribute__ ((__const__));
|
extern ldiv_t ldiv (long int __numer, long int __denom)
|
extern ldiv_t ldiv (long int __numer, long int __denom)
|
__attribute__ ((__const__));
|
__attribute__ ((__const__));
|
# 736 "/projects/or32-uclinux/include/stdlib.h"
|
# 736 "/projects/or32-uclinux/include/stdlib.h"
|
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
|
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
|
int *__restrict __sign) ;
|
int *__restrict __sign) ;
|
|
|
|
|
|
|
|
|
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
|
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
|
int *__restrict __sign) ;
|
int *__restrict __sign) ;
|
|
|
|
|
|
|
|
|
extern char *gcvt (double __value, int __ndigit, char *__buf) ;
|
extern char *gcvt (double __value, int __ndigit, char *__buf) ;
|
|
|
|
|
|
|
|
|
extern char *qecvt (long double __value, int __ndigit,
|
extern char *qecvt (long double __value, int __ndigit,
|
int *__restrict __decpt, int *__restrict __sign) ;
|
int *__restrict __decpt, int *__restrict __sign) ;
|
extern char *qfcvt (long double __value, int __ndigit,
|
extern char *qfcvt (long double __value, int __ndigit,
|
int *__restrict __decpt, int *__restrict __sign) ;
|
int *__restrict __decpt, int *__restrict __sign) ;
|
extern char *qgcvt (long double __value, int __ndigit, char *__buf) ;
|
extern char *qgcvt (long double __value, int __ndigit, char *__buf) ;
|
|
|
|
|
|
|
|
|
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
|
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
|
int *__restrict __sign, char *__restrict __buf,
|
int *__restrict __sign, char *__restrict __buf,
|
size_t __len) ;
|
size_t __len) ;
|
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
|
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
|
int *__restrict __sign, char *__restrict __buf,
|
int *__restrict __sign, char *__restrict __buf,
|
size_t __len) ;
|
size_t __len) ;
|
|
|
extern int qecvt_r (long double __value, int __ndigit,
|
extern int qecvt_r (long double __value, int __ndigit,
|
int *__restrict __decpt, int *__restrict __sign,
|
int *__restrict __decpt, int *__restrict __sign,
|
char *__restrict __buf, size_t __len) ;
|
char *__restrict __buf, size_t __len) ;
|
extern int qfcvt_r (long double __value, int __ndigit,
|
extern int qfcvt_r (long double __value, int __ndigit,
|
int *__restrict __decpt, int *__restrict __sign,
|
int *__restrict __decpt, int *__restrict __sign,
|
char *__restrict __buf, size_t __len) ;
|
char *__restrict __buf, size_t __len) ;
|
# 805 "/projects/or32-uclinux/include/stdlib.h"
|
# 805 "/projects/or32-uclinux/include/stdlib.h"
|
extern int rpmatch (__const char *__response) ;
|
extern int rpmatch (__const char *__response) ;
|
# 867 "/projects/or32-uclinux/include/stdlib.h"
|
# 867 "/projects/or32-uclinux/include/stdlib.h"
|
extern int getloadavg (double __loadavg[], int __nelem) ;
|
extern int getloadavg (double __loadavg[], int __nelem) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
# 17 "devopen.c" 2
|
# 17 "devopen.c" 2
|
# 1 "/projects/mw/markom/mw/src/include/device.h" 1
|
# 1 "/projects/mw/markom/mw/src/include/device.h" 1
|
# 10 "/projects/mw/markom/mw/src/include/device.h"
|
# 10 "/projects/mw/markom/mw/src/include/device.h"
|
# 1 "/projects/mw/markom/mw/src/include/mwtypes.h" 1
|
# 1 "/projects/mw/markom/mw/src/include/mwtypes.h" 1
|
# 160 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
# 160 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
typedef unsigned char MWPIXELVAL;
|
typedef unsigned char MWPIXELVAL;
|
# 176 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
# 176 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
typedef int MWCOORD;
|
typedef int MWCOORD;
|
typedef int MWBOOL;
|
typedef int MWBOOL;
|
typedef unsigned char MWUCHAR;
|
typedef unsigned char MWUCHAR;
|
typedef unsigned long MWCOLORVAL;
|
typedef unsigned long MWCOLORVAL;
|
typedef unsigned short MWIMAGEBITS;
|
typedef unsigned short MWIMAGEBITS;
|
typedef unsigned long MWTIMEOUT;
|
typedef unsigned long MWTIMEOUT;
|
|
|
|
|
typedef struct _mwlist {
|
typedef struct _mwlist {
|
struct _mwlist *next;
|
struct _mwlist *next;
|
struct _mwlist *prev;
|
struct _mwlist *prev;
|
} MWLIST, *PMWLIST;
|
} MWLIST, *PMWLIST;
|
|
|
|
|
typedef struct _mwlisthead {
|
typedef struct _mwlisthead {
|
struct _mwlist *head;
|
struct _mwlist *head;
|
struct _mwlist *tail;
|
struct _mwlist *tail;
|
} MWLISTHEAD, *PMWLISTHEAD;
|
} MWLISTHEAD, *PMWLISTHEAD;
|
|
|
|
|
typedef unsigned int MWKEYMOD;
|
typedef unsigned int MWKEYMOD;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
MWCOORD rows;
|
MWCOORD rows;
|
MWCOORD cols;
|
MWCOORD cols;
|
int xdpcm;
|
int xdpcm;
|
int ydpcm;
|
int ydpcm;
|
int planes;
|
int planes;
|
int bpp;
|
int bpp;
|
long ncolors;
|
long ncolors;
|
int fonts;
|
int fonts;
|
int buttons;
|
int buttons;
|
MWKEYMOD modifiers;
|
MWKEYMOD modifiers;
|
int pixtype;
|
int pixtype;
|
int portrait;
|
int portrait;
|
MWBOOL fbdriver;
|
MWBOOL fbdriver;
|
unsigned long rmask;
|
unsigned long rmask;
|
unsigned long gmask;
|
unsigned long gmask;
|
unsigned long bmask;
|
unsigned long bmask;
|
MWCOORD xpos;
|
MWCOORD xpos;
|
MWCOORD ypos;
|
MWCOORD ypos;
|
|
|
|
|
int vs_width;
|
int vs_width;
|
int vs_height;
|
int vs_height;
|
int ws_width;
|
int ws_width;
|
int ws_height;
|
int ws_height;
|
} MWSCREENINFO, *PMWSCREENINFO;
|
} MWSCREENINFO, *PMWSCREENINFO;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
unsigned char * physpixels;
|
unsigned char * physpixels;
|
|
|
unsigned char * winpixels;
|
unsigned char * winpixels;
|
int pixtype;
|
int pixtype;
|
int bpp;
|
int bpp;
|
int bytespp;
|
int bytespp;
|
int pitch;
|
int pitch;
|
int x, y;
|
int x, y;
|
int portrait_mode;
|
int portrait_mode;
|
MWCOORD xres;
|
MWCOORD xres;
|
MWCOORD yres;
|
MWCOORD yres;
|
MWCOORD xvirtres;
|
MWCOORD xvirtres;
|
MWCOORD yvirtres;
|
MWCOORD yvirtres;
|
} MWWINDOWFBINFO;
|
} MWWINDOWFBINFO;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
int maxwidth;
|
int maxwidth;
|
int height;
|
int height;
|
int baseline;
|
int baseline;
|
int firstchar;
|
int firstchar;
|
int lastchar;
|
int lastchar;
|
MWBOOL fixed;
|
MWBOOL fixed;
|
MWUCHAR widths[256];
|
MWUCHAR widths[256];
|
} MWFONTINFO, *PMWFONTINFO;
|
} MWFONTINFO, *PMWFONTINFO;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
char *ttname;
|
char *ttname;
|
char *mwname;
|
char *mwname;
|
} MWFONTLIST, *PMWFONTLIST;
|
} MWFONTLIST, *PMWFONTLIST;
|
# 311 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
# 311 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
typedef struct {
|
typedef struct {
|
long lfHeight;
|
long lfHeight;
|
long lfWidth;
|
long lfWidth;
|
long lfEscapement;
|
long lfEscapement;
|
long lfOrientation;
|
long lfOrientation;
|
long lfWeight;
|
long lfWeight;
|
MWUCHAR lfItalic;
|
MWUCHAR lfItalic;
|
MWUCHAR lfUnderline;
|
MWUCHAR lfUnderline;
|
MWUCHAR lfStrikeOut;
|
MWUCHAR lfStrikeOut;
|
MWUCHAR lfCharSet;
|
MWUCHAR lfCharSet;
|
MWUCHAR lfOutPrecision;
|
MWUCHAR lfOutPrecision;
|
MWUCHAR lfClipPrecision;
|
MWUCHAR lfClipPrecision;
|
MWUCHAR lfQuality;
|
MWUCHAR lfQuality;
|
|
|
|
|
MWUCHAR lfRoman;
|
MWUCHAR lfRoman;
|
MWUCHAR lfSerif;
|
MWUCHAR lfSerif;
|
MWUCHAR lfSansSerif;
|
MWUCHAR lfSansSerif;
|
MWUCHAR lfModern;
|
MWUCHAR lfModern;
|
MWUCHAR lfMonospace;
|
MWUCHAR lfMonospace;
|
MWUCHAR lfProportional;
|
MWUCHAR lfProportional;
|
MWUCHAR lfOblique;
|
MWUCHAR lfOblique;
|
MWUCHAR lfSmallCaps;
|
MWUCHAR lfSmallCaps;
|
MWUCHAR lfPitch;
|
MWUCHAR lfPitch;
|
|
|
char lfFaceName[64];
|
char lfFaceName[64];
|
} MWLOGFONT, *PMWLOGFONT;
|
} MWLOGFONT, *PMWLOGFONT;
|
# 402 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
# 402 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
typedef struct {
|
typedef struct {
|
MWCOORD x;
|
MWCOORD x;
|
MWCOORD y;
|
MWCOORD y;
|
} MWPOINT;
|
} MWPOINT;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
MWCOORD left;
|
MWCOORD left;
|
MWCOORD top;
|
MWCOORD top;
|
MWCOORD right;
|
MWCOORD right;
|
MWCOORD bottom;
|
MWCOORD bottom;
|
} MWRECT;
|
} MWRECT;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
int size;
|
int size;
|
int numRects;
|
int numRects;
|
int type;
|
int type;
|
MWRECT *rects;
|
MWRECT *rects;
|
MWRECT extents;
|
MWRECT extents;
|
} MWCLIPREGION;
|
} MWCLIPREGION;
|
# 440 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
# 440 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
typedef struct {
|
typedef struct {
|
MWUCHAR r;
|
MWUCHAR r;
|
MWUCHAR g;
|
MWUCHAR g;
|
MWUCHAR b;
|
MWUCHAR b;
|
} MWPALENTRY;
|
} MWPALENTRY;
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
typedef struct {
|
int width;
|
int width;
|
int height;
|
int height;
|
int planes;
|
int planes;
|
int bpp;
|
int bpp;
|
int pitch;
|
int pitch;
|
int bytesperpixel;
|
int bytesperpixel;
|
int compression;
|
int compression;
|
int palsize;
|
int palsize;
|
long transcolor;
|
long transcolor;
|
MWPALENTRY * palette;
|
MWPALENTRY * palette;
|
MWUCHAR * imagebits;
|
MWUCHAR * imagebits;
|
} MWIMAGEHDR, *PMWIMAGEHDR;
|
} MWIMAGEHDR, *PMWIMAGEHDR;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
int id;
|
int id;
|
int width;
|
int width;
|
int height;
|
int height;
|
int planes;
|
int planes;
|
int bpp;
|
int bpp;
|
int pitch;
|
int pitch;
|
int bytesperpixel;
|
int bytesperpixel;
|
int compression;
|
int compression;
|
int palsize;
|
int palsize;
|
MWPALENTRY palette[256];
|
MWPALENTRY palette[256];
|
} MWIMAGEINFO, *PMWIMAGEINFO;
|
} MWIMAGEINFO, *PMWIMAGEINFO;
|
|
|
|
|
|
|
|
|
typedef struct {
|
typedef struct {
|
int width;
|
int width;
|
int height;
|
int height;
|
MWCOORD hotx;
|
MWCOORD hotx;
|
MWCOORD hoty;
|
MWCOORD hoty;
|
MWCOLORVAL fgcolor;
|
MWCOLORVAL fgcolor;
|
MWCOLORVAL bgcolor;
|
MWCOLORVAL bgcolor;
|
MWIMAGEBITS image[16];
|
MWIMAGEBITS image[16];
|
MWIMAGEBITS mask[16];
|
MWIMAGEBITS mask[16];
|
} MWCURSOR, *PMWCURSOR;
|
} MWCURSOR, *PMWCURSOR;
|
|
|
typedef struct _mwfont * PMWFONT;
|
typedef struct _mwfont * PMWFONT;
|
# 534 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
# 534 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
typedef unsigned short MWKEY;
|
typedef unsigned short MWKEY;
|
typedef unsigned char MWSCANCODE;
|
typedef unsigned char MWSCANCODE;
|
# 660 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
# 660 "/projects/mw/markom/mw/src/include/mwtypes.h"
|
typedef struct {
|
typedef struct {
|
int led;
|
int led;
|
int led_mode;
|
int led_mode;
|
} MWKBINFO, *PMWKBINFO;
|
} MWKBINFO, *PMWKBINFO;
|
# 11 "/projects/mw/markom/mw/src/include/device.h" 2
|
# 11 "/projects/mw/markom/mw/src/include/device.h" 2
|
# 30 "/projects/mw/markom/mw/src/include/device.h"
|
# 30 "/projects/mw/markom/mw/src/include/device.h"
|
typedef struct _mwscreendevice *PSD;
|
typedef struct _mwscreendevice *PSD;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
char * name;
|
char * name;
|
int maxwidth;
|
int maxwidth;
|
int height;
|
int height;
|
int ascent;
|
int ascent;
|
int firstchar;
|
int firstchar;
|
int size;
|
int size;
|
MWIMAGEBITS * bits;
|
MWIMAGEBITS * bits;
|
unsigned short *offset;
|
unsigned short *offset;
|
unsigned char * width;
|
unsigned char * width;
|
} MWCFONT, *PMWCFONT;
|
} MWCFONT, *PMWCFONT;
|
|
|
|
|
typedef struct {
|
typedef struct {
|
int encoding;
|
int encoding;
|
MWBOOL (*GetFontInfo)(PMWFONT pfont, PMWFONTINFO pfontinfo);
|
MWBOOL (*GetFontInfo)(PMWFONT pfont, PMWFONTINFO pfontinfo);
|
void (*GetTextSize)(PMWFONT pfont, const void *text, int cc,
|
void (*GetTextSize)(PMWFONT pfont, const void *text, int cc,
|
MWCOORD *pwidth, MWCOORD *pheight, MWCOORD *pbase);
|
MWCOORD *pwidth, MWCOORD *pheight, MWCOORD *pbase);
|
void (*GetTextBits)(PMWFONT pfont, int ch, MWIMAGEBITS *retmap,
|
void (*GetTextBits)(PMWFONT pfont, int ch, MWIMAGEBITS *retmap,
|
MWCOORD *pwidth, MWCOORD *pheight, MWCOORD *pbase);
|
MWCOORD *pwidth, MWCOORD *pheight, MWCOORD *pbase);
|
void (*DestroyFont)(PMWFONT pfont);
|
void (*DestroyFont)(PMWFONT pfont);
|
void (*DrawText)(PMWFONT pfont, PSD psd, MWCOORD x, MWCOORD y,
|
void (*DrawText)(PMWFONT pfont, PSD psd, MWCOORD x, MWCOORD y,
|
const void *str, int count, int flags);
|
const void *str, int count, int flags);
|
void (*SetFontSize)(PMWFONT pfont, MWCOORD fontsize);
|
void (*SetFontSize)(PMWFONT pfont, MWCOORD fontsize);
|
void (*SetFontRotation)(PMWFONT pfont, int tenthdegrees);
|
void (*SetFontRotation)(PMWFONT pfont, int tenthdegrees);
|
void (*SetFontAttr)(PMWFONT pfont, int setflags, int clrflags);
|
void (*SetFontAttr)(PMWFONT pfont, int setflags, int clrflags);
|
} MWFONTPROCS, *PMWFONTPROCS;
|
} MWFONTPROCS, *PMWFONTPROCS;
|
|
|
|
|
typedef struct _mwfont {
|
typedef struct _mwfont {
|
PMWFONTPROCS fontprocs;
|
PMWFONTPROCS fontprocs;
|
MWCOORD fontsize;
|
MWCOORD fontsize;
|
int fontrotation;
|
int fontrotation;
|
int fontattr;
|
int fontattr;
|
|
|
} MWFONT;
|
} MWFONT;
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
typedef struct {
|
PMWFONTPROCS fontprocs;
|
PMWFONTPROCS fontprocs;
|
MWCOORD fontsize;
|
MWCOORD fontsize;
|
int fontrotation;
|
int fontrotation;
|
int fontattr;
|
int fontattr;
|
|
|
char * name;
|
char * name;
|
PMWCFONT cfont;
|
PMWCFONT cfont;
|
} MWCOREFONT, *PMWCOREFONT;
|
} MWCOREFONT, *PMWCOREFONT;
|
|
|
|
|
|
|
|
|
typedef struct {
|
typedef struct {
|
MWCOORD dstx, dsty, dstw, dsth, dst_linelen;
|
MWCOORD dstx, dsty, dstw, dsth, dst_linelen;
|
MWCOORD srcx, srcy, src_linelen;
|
MWCOORD srcx, srcy, src_linelen;
|
void *pixels, *misc;
|
void *pixels, *misc;
|
MWPIXELVAL bg_color, fg_color;
|
MWPIXELVAL bg_color, fg_color;
|
int gr_usebg;
|
int gr_usebg;
|
} driver_gc_t;
|
} driver_gc_t;
|
# 104 "/projects/mw/markom/mw/src/include/device.h"
|
# 104 "/projects/mw/markom/mw/src/include/device.h"
|
typedef struct {
|
typedef struct {
|
PSD dstpsd;
|
PSD dstpsd;
|
MWCOORD dstx, dsty;
|
MWCOORD dstx, dsty;
|
MWCOORD dstw, dsth;
|
MWCOORD dstw, dsth;
|
MWCOORD srcx, srcy;
|
MWCOORD srcx, srcy;
|
MWCOORD srcw, srch;
|
MWCOORD srcw, srch;
|
PSD srcpsd;
|
PSD srcpsd;
|
unsigned long rop;
|
unsigned long rop;
|
PSD alphachan;
|
PSD alphachan;
|
MWPIXELVAL fgcolor;
|
MWPIXELVAL fgcolor;
|
MWPIXELVAL bgcolor;
|
MWPIXELVAL bgcolor;
|
MWPIXELVAL transcolor;
|
MWPIXELVAL transcolor;
|
} MWBLITARGS, *PMWBLITARGS;
|
} MWBLITARGS, *PMWBLITARGS;
|
|
|
|
|
|
|
typedef struct {
|
typedef struct {
|
int (*Init)(PSD psd);
|
int (*Init)(PSD psd);
|
void (*DrawPixel)(PSD psd, MWCOORD x, MWCOORD y, MWPIXELVAL c);
|
void (*DrawPixel)(PSD psd, MWCOORD x, MWCOORD y, MWPIXELVAL c);
|
MWPIXELVAL (*ReadPixel)(PSD psd, MWCOORD x, MWCOORD y);
|
MWPIXELVAL (*ReadPixel)(PSD psd, MWCOORD x, MWCOORD y);
|
void (*DrawHorzLine)(PSD psd, MWCOORD x1, MWCOORD x2, MWCOORD y,
|
void (*DrawHorzLine)(PSD psd, MWCOORD x1, MWCOORD x2, MWCOORD y,
|
MWPIXELVAL c);
|
MWPIXELVAL c);
|
void (*DrawVertLine)(PSD psd, MWCOORD x, MWCOORD y1, MWCOORD y2,
|
void (*DrawVertLine)(PSD psd, MWCOORD x, MWCOORD y1, MWCOORD y2,
|
MWPIXELVAL c);
|
MWPIXELVAL c);
|
void (*FillRect)(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,
|
void (*FillRect)(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,
|
MWCOORD y2,MWPIXELVAL c);
|
MWCOORD y2,MWPIXELVAL c);
|
void (*Blit)(PSD destpsd, MWCOORD destx, MWCOORD desty, MWCOORD w,
|
void (*Blit)(PSD destpsd, MWCOORD destx, MWCOORD desty, MWCOORD w,
|
MWCOORD h,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long op);
|
MWCOORD h,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long op);
|
void (*DrawArea)(PSD psd, driver_gc_t *gc, int op);
|
void (*DrawArea)(PSD psd, driver_gc_t *gc, int op);
|
void (*StretchBlit)(PSD destpsd, MWCOORD destx, MWCOORD desty,
|
void (*StretchBlit)(PSD destpsd, MWCOORD destx, MWCOORD desty,
|
MWCOORD dstw, MWCOORD dsth, PSD srcpsd, MWCOORD srcx,
|
MWCOORD dstw, MWCOORD dsth, PSD srcpsd, MWCOORD srcx,
|
MWCOORD srcy, MWCOORD srcw, MWCOORD srch, long op);
|
MWCOORD srcy, MWCOORD srcw, MWCOORD srch, long op);
|
} SUBDRIVER, *PSUBDRIVER;
|
} SUBDRIVER, *PSUBDRIVER;
|
|
|
|
|
|
|
|
|
|
|
typedef struct _mwscreendevice {
|
typedef struct _mwscreendevice {
|
MWCOORD xres;
|
MWCOORD xres;
|
MWCOORD yres;
|
MWCOORD yres;
|
MWCOORD xvirtres;
|
MWCOORD xvirtres;
|
MWCOORD yvirtres;
|
MWCOORD yvirtres;
|
int planes;
|
int planes;
|
int bpp;
|
int bpp;
|
int linelen;
|
int linelen;
|
|
|
int size;
|
int size;
|
long ncolors;
|
long ncolors;
|
int pixtype;
|
int pixtype;
|
int flags;
|
int flags;
|
void * addr;
|
void * addr;
|
|
|
PSD (*Open)(PSD psd);
|
PSD (*Open)(PSD psd);
|
void (*Close)(PSD psd);
|
void (*Close)(PSD psd);
|
void (*GetScreenInfo)(PSD psd,PMWSCREENINFO psi);
|
void (*GetScreenInfo)(PSD psd,PMWSCREENINFO psi);
|
void (*SetPalette)(PSD psd,int first,int count,MWPALENTRY *pal);
|
void (*SetPalette)(PSD psd,int first,int count,MWPALENTRY *pal);
|
void (*DrawPixel)(PSD psd,MWCOORD x,MWCOORD y,MWPIXELVAL c);
|
void (*DrawPixel)(PSD psd,MWCOORD x,MWCOORD y,MWPIXELVAL c);
|
MWPIXELVAL (*ReadPixel)(PSD psd,MWCOORD x,MWCOORD y);
|
MWPIXELVAL (*ReadPixel)(PSD psd,MWCOORD x,MWCOORD y);
|
void (*DrawHorzLine)(PSD psd,MWCOORD x1,MWCOORD x2,MWCOORD y,
|
void (*DrawHorzLine)(PSD psd,MWCOORD x1,MWCOORD x2,MWCOORD y,
|
MWPIXELVAL c);
|
MWPIXELVAL c);
|
void (*DrawVertLine)(PSD psd,MWCOORD x,MWCOORD y1,MWCOORD y2,
|
void (*DrawVertLine)(PSD psd,MWCOORD x,MWCOORD y1,MWCOORD y2,
|
MWPIXELVAL c);
|
MWPIXELVAL c);
|
void (*FillRect)(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2,
|
void (*FillRect)(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2,
|
MWPIXELVAL c);
|
MWPIXELVAL c);
|
PMWCOREFONT builtin_fonts;
|
PMWCOREFONT builtin_fonts;
|
|
|
|
|
|
|
|
|
void (*Blit)(PSD destpsd,MWCOORD destx,MWCOORD desty,MWCOORD w,
|
void (*Blit)(PSD destpsd,MWCOORD destx,MWCOORD desty,MWCOORD w,
|
MWCOORD h,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long op);
|
MWCOORD h,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long op);
|
void (*PreSelect)(PSD psd);
|
void (*PreSelect)(PSD psd);
|
void (*DrawArea)(PSD psd, driver_gc_t *gc, int op);
|
void (*DrawArea)(PSD psd, driver_gc_t *gc, int op);
|
int (*SetIOPermissions)(PSD psd);
|
int (*SetIOPermissions)(PSD psd);
|
PSD (*AllocateMemGC)(PSD psd);
|
PSD (*AllocateMemGC)(PSD psd);
|
MWBOOL (*MapMemGC)(PSD mempsd,MWCOORD w,MWCOORD h,int planes,int bpp,
|
MWBOOL (*MapMemGC)(PSD mempsd,MWCOORD w,MWCOORD h,int planes,int bpp,
|
int linelen,int size,void *addr);
|
int linelen,int size,void *addr);
|
void (*FreeMemGC)(PSD mempsd);
|
void (*FreeMemGC)(PSD mempsd);
|
void (*StretchBlit)(PSD destpsd,MWCOORD destx,MWCOORD desty,
|
void (*StretchBlit)(PSD destpsd,MWCOORD destx,MWCOORD desty,
|
MWCOORD destw,MWCOORD desth,PSD srcpsd,MWCOORD srcx,
|
MWCOORD destw,MWCOORD desth,PSD srcpsd,MWCOORD srcx,
|
MWCOORD srcy,MWCOORD srcw,MWCOORD srch,long op);
|
MWCOORD srcy,MWCOORD srcw,MWCOORD srch,long op);
|
void (*SetPortrait)(PSD psd,int portraitmode);
|
void (*SetPortrait)(PSD psd,int portraitmode);
|
int portrait;
|
int portrait;
|
PSUBDRIVER orgsubdriver;
|
PSUBDRIVER orgsubdriver;
|
} SCREENDEVICE;
|
} SCREENDEVICE;
|
# 200 "/projects/mw/markom/mw/src/include/device.h"
|
# 200 "/projects/mw/markom/mw/src/include/device.h"
|
typedef struct _mousedevice {
|
typedef struct _mousedevice {
|
int (*Open)(struct _mousedevice *);
|
int (*Open)(struct _mousedevice *);
|
void (*Close)(void);
|
void (*Close)(void);
|
int (*GetButtonInfo)(void);
|
int (*GetButtonInfo)(void);
|
void (*GetDefaultAccel)(int *pscale,int *pthresh);
|
void (*GetDefaultAccel)(int *pscale,int *pthresh);
|
int (*Read)(MWCOORD *dx,MWCOORD *dy,MWCOORD *dz,int *bp);
|
int (*Read)(MWCOORD *dx,MWCOORD *dy,MWCOORD *dz,int *bp);
|
int (*Poll)(void);
|
int (*Poll)(void);
|
} MOUSEDEVICE;
|
} MOUSEDEVICE;
|
|
|
|
|
typedef struct _kbddevice {
|
typedef struct _kbddevice {
|
int (*Open)(struct _kbddevice *pkd);
|
int (*Open)(struct _kbddevice *pkd);
|
void (*Close)(void);
|
void (*Close)(void);
|
void (*GetModifierInfo)(MWKEYMOD *modifiers, MWKEYMOD *curmodifiers);
|
void (*GetModifierInfo)(MWKEYMOD *modifiers, MWKEYMOD *curmodifiers);
|
int (*Read)(MWKEY *buf,MWKEYMOD *modifiers,MWSCANCODE *scancode);
|
int (*Read)(MWKEY *buf,MWKEYMOD *modifiers,MWSCANCODE *scancode);
|
int (*Poll)(void);
|
int (*Poll)(void);
|
} KBDDEVICE;
|
} KBDDEVICE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
typedef struct {
|
MWCOORD x;
|
MWCOORD x;
|
MWCOORD y;
|
MWCOORD y;
|
MWCOORD width;
|
MWCOORD width;
|
MWCOORD height;
|
MWCOORD height;
|
} MWCLIPRECT;
|
} MWCLIPRECT;
|
# 422 "/projects/mw/markom/mw/src/include/device.h"
|
# 422 "/projects/mw/markom/mw/src/include/device.h"
|
PSD GdOpenScreen(void);
|
PSD GdOpenScreen(void);
|
void GdCloseScreen(PSD psd);
|
void GdCloseScreen(PSD psd);
|
int GdSetPortraitMode(PSD psd, int portraitmode);
|
int GdSetPortraitMode(PSD psd, int portraitmode);
|
int GdSetMode(int mode);
|
int GdSetMode(int mode);
|
MWBOOL GdSetUseBackground(MWBOOL flag);
|
MWBOOL GdSetUseBackground(MWBOOL flag);
|
MWPIXELVAL GdSetForeground(MWPIXELVAL fg);
|
MWPIXELVAL GdSetForeground(MWPIXELVAL fg);
|
MWPIXELVAL GdSetBackground(MWPIXELVAL bg);
|
MWPIXELVAL GdSetBackground(MWPIXELVAL bg);
|
void GdResetPalette(void);
|
void GdResetPalette(void);
|
void GdSetPalette(PSD psd,int first, int count, MWPALENTRY *palette);
|
void GdSetPalette(PSD psd,int first, int count, MWPALENTRY *palette);
|
int GdGetPalette(PSD psd,int first, int count, MWPALENTRY *palette);
|
int GdGetPalette(PSD psd,int first, int count, MWPALENTRY *palette);
|
MWPIXELVAL GdFindColor(MWCOLORVAL c);
|
MWPIXELVAL GdFindColor(MWCOLORVAL c);
|
MWPIXELVAL GdFindNearestColor(MWPALENTRY *pal, int size, MWCOLORVAL cr);
|
MWPIXELVAL GdFindNearestColor(MWPALENTRY *pal, int size, MWCOLORVAL cr);
|
int GdCaptureScreen(char *path);
|
int GdCaptureScreen(char *path);
|
void GdGetScreenInfo(PSD psd,PMWSCREENINFO psi);
|
void GdGetScreenInfo(PSD psd,PMWSCREENINFO psi);
|
void GdPoint(PSD psd,MWCOORD x, MWCOORD y);
|
void GdPoint(PSD psd,MWCOORD x, MWCOORD y);
|
void GdLine(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2,
|
void GdLine(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2,
|
MWBOOL bDrawLastPoint);
|
MWBOOL bDrawLastPoint);
|
void GdRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height);
|
void GdRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height);
|
void GdFillRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height);
|
void GdFillRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height);
|
void GdBitmap(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
|
void GdBitmap(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
|
MWIMAGEBITS *imagebits);
|
MWIMAGEBITS *imagebits);
|
MWBOOL GdColorInPalette(MWCOLORVAL cr,MWPALENTRY *palette,int palsize);
|
MWBOOL GdColorInPalette(MWCOLORVAL cr,MWPALENTRY *palette,int palsize);
|
void GdMakePaletteConversionTable(PSD psd,MWPALENTRY *palette,int palsize,
|
void GdMakePaletteConversionTable(PSD psd,MWPALENTRY *palette,int palsize,
|
MWPIXELVAL *convtable,int fLoadType);
|
MWPIXELVAL *convtable,int fLoadType);
|
void GdDrawImage(PSD psd,MWCOORD x, MWCOORD y, PMWIMAGEHDR pimage);
|
void GdDrawImage(PSD psd,MWCOORD x, MWCOORD y, PMWIMAGEHDR pimage);
|
void GdPoly(PSD psd,int count, MWPOINT *points);
|
void GdPoly(PSD psd,int count, MWPOINT *points);
|
void GdFillPoly(PSD psd,int count, MWPOINT *points);
|
void GdFillPoly(PSD psd,int count, MWPOINT *points);
|
void GdReadArea(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
|
void GdReadArea(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
|
MWPIXELVAL *pixels);
|
MWPIXELVAL *pixels);
|
void GdArea(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
|
void GdArea(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
|
void *pixels, int pixtype);
|
void *pixels, int pixtype);
|
void GdTranslateArea(MWCOORD width, MWCOORD height, void *in, int inpixtype,
|
void GdTranslateArea(MWCOORD width, MWCOORD height, void *in, int inpixtype,
|
MWCOORD inpitch, void *out, int outpixtype, int outpitch);
|
MWCOORD inpitch, void *out, int outpixtype, int outpitch);
|
void GdCopyArea(PSD psd,MWCOORD srcx,MWCOORD srcy,MWCOORD width,
|
void GdCopyArea(PSD psd,MWCOORD srcx,MWCOORD srcy,MWCOORD width,
|
MWCOORD height, MWCOORD destx, MWCOORD desty);
|
MWCOORD height, MWCOORD destx, MWCOORD desty);
|
void GdBlit(PSD dstpsd, MWCOORD dstx, MWCOORD dsty, MWCOORD width,
|
void GdBlit(PSD dstpsd, MWCOORD dstx, MWCOORD dsty, MWCOORD width,
|
MWCOORD height,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long rop);
|
MWCOORD height,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long rop);
|
void GdStretchBlit(PSD dstpsd, MWCOORD dstx, MWCOORD dsty, MWCOORD dstw,
|
void GdStretchBlit(PSD dstpsd, MWCOORD dstx, MWCOORD dsty, MWCOORD dstw,
|
MWCOORD dsth, PSD srcpsd, MWCOORD srcx, MWCOORD srcy,
|
MWCOORD dsth, PSD srcpsd, MWCOORD srcx, MWCOORD srcy,
|
MWCOORD srcw, MWCOORD srch, long rop);
|
MWCOORD srcw, MWCOORD srch, long rop);
|
int GdCalcMemGCAlloc(PSD psd, unsigned int width, unsigned int height,
|
int GdCalcMemGCAlloc(PSD psd, unsigned int width, unsigned int height,
|
int planes, int bpp, int *size, int *linelen);
|
int planes, int bpp, int *size, int *linelen);
|
extern SCREENDEVICE scrdev;
|
extern SCREENDEVICE scrdev;
|
|
|
|
|
|
|
void GdArcAngle(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
|
void GdArcAngle(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
|
MWCOORD angle1, MWCOORD angle2, int type);
|
MWCOORD angle1, MWCOORD angle2, int type);
|
|
|
void GdArc(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
|
void GdArc(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
|
MWCOORD ax, MWCOORD ay, MWCOORD bx, MWCOORD by, int type);
|
MWCOORD ax, MWCOORD ay, MWCOORD bx, MWCOORD by, int type);
|
void GdEllipse(PSD psd,MWCOORD x, MWCOORD y, MWCOORD rx, MWCOORD ry,
|
void GdEllipse(PSD psd,MWCOORD x, MWCOORD y, MWCOORD rx, MWCOORD ry,
|
MWBOOL fill);
|
MWBOOL fill);
|
|
|
|
|
void GdClearFontList(void);
|
void GdClearFontList(void);
|
int GdAddFont(char *fndry, char *family, char *fontname, PMWLOGFONT lf,
|
int GdAddFont(char *fndry, char *family, char *fontname, PMWLOGFONT lf,
|
unsigned int flags);
|
unsigned int flags);
|
PMWFONT GdSetFont(PMWFONT pfont);
|
PMWFONT GdSetFont(PMWFONT pfont);
|
PMWFONT GdCreateFont(PSD psd, const char *name, MWCOORD height,
|
PMWFONT GdCreateFont(PSD psd, const char *name, MWCOORD height,
|
const PMWLOGFONT plogfont);
|
const PMWLOGFONT plogfont);
|
MWCOORD GdSetFontSize(PMWFONT pfont, MWCOORD fontsize);
|
MWCOORD GdSetFontSize(PMWFONT pfont, MWCOORD fontsize);
|
void GdGetFontList(MWFONTLIST ***list, int *num);
|
void GdGetFontList(MWFONTLIST ***list, int *num);
|
void GdFreeFontList(MWFONTLIST ***list, int num);
|
void GdFreeFontList(MWFONTLIST ***list, int num);
|
int GdSetFontRotation(PMWFONT pfont, int tenthdegrees);
|
int GdSetFontRotation(PMWFONT pfont, int tenthdegrees);
|
int GdSetFontAttr(PMWFONT pfont, int setflags, int clrflags);
|
int GdSetFontAttr(PMWFONT pfont, int setflags, int clrflags);
|
void GdDestroyFont(PMWFONT pfont);
|
void GdDestroyFont(PMWFONT pfont);
|
MWBOOL GdGetFontInfo(PMWFONT pfont, PMWFONTINFO pfontinfo);
|
MWBOOL GdGetFontInfo(PMWFONT pfont, PMWFONTINFO pfontinfo);
|
int GdConvertEncoding(const void *istr, int iflags, int cc, void *ostr,
|
int GdConvertEncoding(const void *istr, int iflags, int cc, void *ostr,
|
int oflags);
|
int oflags);
|
void GdGetTextSize(PMWFONT pfont, const void *str, int cc, MWCOORD *pwidth,
|
void GdGetTextSize(PMWFONT pfont, const void *str, int cc, MWCOORD *pwidth,
|
MWCOORD *pheight, MWCOORD *pbase, int flags);
|
MWCOORD *pheight, MWCOORD *pbase, int flags);
|
int GdGetTextSizeEx(PMWFONT pfont, const void *str, int cc,
|
int GdGetTextSizeEx(PMWFONT pfont, const void *str, int cc,
|
int nMaxExtent, int *lpnFit, int *alpDx, MWCOORD *pwidth,
|
int nMaxExtent, int *lpnFit, int *alpDx, MWCOORD *pwidth,
|
MWCOORD *pheight, MWCOORD *pbase, int flags);
|
MWCOORD *pheight, MWCOORD *pbase, int flags);
|
void GdText(PSD psd,MWCOORD x,MWCOORD y,const void *str,int count,int flags);
|
void GdText(PSD psd,MWCOORD x,MWCOORD y,const void *str,int count,int flags);
|
|
|
|
|
void GdSetClipRects(PSD psd,int count,MWCLIPRECT *table);
|
void GdSetClipRects(PSD psd,int count,MWCLIPRECT *table);
|
MWBOOL GdClipPoint(PSD psd,MWCOORD x,MWCOORD y);
|
MWBOOL GdClipPoint(PSD psd,MWCOORD x,MWCOORD y);
|
int GdClipArea(PSD psd,MWCOORD x1, MWCOORD y1, MWCOORD x2, MWCOORD y2);
|
int GdClipArea(PSD psd,MWCOORD x1, MWCOORD y1, MWCOORD x2, MWCOORD y2);
|
extern MWCOORD clipminx, clipminy, clipmaxx, clipmaxy;
|
extern MWCOORD clipminx, clipminy, clipmaxx, clipmaxy;
|
|
|
|
|
void GdSetClipRegion(PSD psd, MWCLIPREGION *reg);
|
void GdSetClipRegion(PSD psd, MWCLIPREGION *reg);
|
|
|
|
|
MWBOOL GdPtInRegion(MWCLIPREGION *rgn, MWCOORD x, MWCOORD y);
|
MWBOOL GdPtInRegion(MWCLIPREGION *rgn, MWCOORD x, MWCOORD y);
|
int GdRectInRegion(MWCLIPREGION *rgn, const MWRECT *rect);
|
int GdRectInRegion(MWCLIPREGION *rgn, const MWRECT *rect);
|
MWBOOL GdEqualRegion(MWCLIPREGION *r1, MWCLIPREGION *r2);
|
MWBOOL GdEqualRegion(MWCLIPREGION *r1, MWCLIPREGION *r2);
|
MWBOOL GdEmptyRegion(MWCLIPREGION *rgn);
|
MWBOOL GdEmptyRegion(MWCLIPREGION *rgn);
|
MWCLIPREGION *GdAllocRegion(void);
|
MWCLIPREGION *GdAllocRegion(void);
|
MWCLIPREGION *GdAllocRectRegion(MWCOORD left,MWCOORD top,MWCOORD right,MWCOORD bottom);
|
MWCLIPREGION *GdAllocRectRegion(MWCOORD left,MWCOORD top,MWCOORD right,MWCOORD bottom);
|
MWCLIPREGION *GdAllocRectRegionIndirect(MWRECT *prc);
|
MWCLIPREGION *GdAllocRectRegionIndirect(MWRECT *prc);
|
void GdSetRectRegion(MWCLIPREGION *rgn, MWCOORD left, MWCOORD top,
|
void GdSetRectRegion(MWCLIPREGION *rgn, MWCOORD left, MWCOORD top,
|
MWCOORD right, MWCOORD bottom);
|
MWCOORD right, MWCOORD bottom);
|
void GdSetRectRegionIndirect(MWCLIPREGION *rgn, MWRECT *prc);
|
void GdSetRectRegionIndirect(MWCLIPREGION *rgn, MWRECT *prc);
|
void GdDestroyRegion(MWCLIPREGION *rgn);
|
void GdDestroyRegion(MWCLIPREGION *rgn);
|
void GdOffsetRegion(MWCLIPREGION *rgn, MWCOORD x, MWCOORD y);
|
void GdOffsetRegion(MWCLIPREGION *rgn, MWCOORD x, MWCOORD y);
|
int GdGetRegionBox(MWCLIPREGION *rgn, MWRECT *prc);
|
int GdGetRegionBox(MWCLIPREGION *rgn, MWRECT *prc);
|
void GdUnionRectWithRegion(const MWRECT *rect, MWCLIPREGION *rgn);
|
void GdUnionRectWithRegion(const MWRECT *rect, MWCLIPREGION *rgn);
|
void GdSubtractRectFromRegion(const MWRECT *rect, MWCLIPREGION *rgn);
|
void GdSubtractRectFromRegion(const MWRECT *rect, MWCLIPREGION *rgn);
|
void GdCopyRegion(MWCLIPREGION *d, MWCLIPREGION *s);
|
void GdCopyRegion(MWCLIPREGION *d, MWCLIPREGION *s);
|
void GdIntersectRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
|
void GdIntersectRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
|
void GdUnionRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
|
void GdUnionRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
|
void GdSubtractRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
|
void GdSubtractRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
|
void GdXorRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
|
void GdXorRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
|
|
|
|
|
MWCLIPREGION *GdAllocPolygonRegion(MWPOINT *points, int count, int mode);
|
MWCLIPREGION *GdAllocPolygonRegion(MWPOINT *points, int count, int mode);
|
MWCLIPREGION *GdAllocPolyPolygonRegion(MWPOINT *points, int *count,
|
MWCLIPREGION *GdAllocPolyPolygonRegion(MWPOINT *points, int *count,
|
int nbpolygons, int mode);
|
int nbpolygons, int mode);
|
|
|
|
|
int GdOpenMouse(void);
|
int GdOpenMouse(void);
|
void GdCloseMouse(void);
|
void GdCloseMouse(void);
|
void GdGetButtonInfo(int *buttons);
|
void GdGetButtonInfo(int *buttons);
|
void GdRestrictMouse(MWCOORD newminx,MWCOORD newminy,MWCOORD newmaxx,
|
void GdRestrictMouse(MWCOORD newminx,MWCOORD newminy,MWCOORD newmaxx,
|
MWCOORD newmaxy);
|
MWCOORD newmaxy);
|
void GdSetAccelMouse(int newthresh, int newscale);
|
void GdSetAccelMouse(int newthresh, int newscale);
|
void GdMoveMouse(MWCOORD newx, MWCOORD newy);
|
void GdMoveMouse(MWCOORD newx, MWCOORD newy);
|
int GdReadMouse(MWCOORD *px, MWCOORD *py, int *pb);
|
int GdReadMouse(MWCOORD *px, MWCOORD *py, int *pb);
|
void GdMoveCursor(MWCOORD x, MWCOORD y);
|
void GdMoveCursor(MWCOORD x, MWCOORD y);
|
MWBOOL GdGetCursorPos(MWCOORD *px, MWCOORD *py);
|
MWBOOL GdGetCursorPos(MWCOORD *px, MWCOORD *py);
|
void GdSetCursor(PMWCURSOR pcursor);
|
void GdSetCursor(PMWCURSOR pcursor);
|
int GdShowCursor(PSD psd);
|
int GdShowCursor(PSD psd);
|
int GdHideCursor(PSD psd);
|
int GdHideCursor(PSD psd);
|
void GdCheckCursor(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2);
|
void GdCheckCursor(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2);
|
void GdFixCursor(PSD psd);
|
void GdFixCursor(PSD psd);
|
extern MOUSEDEVICE mousedev;
|
extern MOUSEDEVICE mousedev;
|
|
|
|
|
int GdOpenKeyboard(void);
|
int GdOpenKeyboard(void);
|
void GdCloseKeyboard(void);
|
void GdCloseKeyboard(void);
|
void GdGetModifierInfo(MWKEYMOD *modifiers, MWKEYMOD *curmodifiers);
|
void GdGetModifierInfo(MWKEYMOD *modifiers, MWKEYMOD *curmodifiers);
|
int GdReadKeyboard(MWKEY *buf, MWKEYMOD *modifiers, MWSCANCODE *scancode);
|
int GdReadKeyboard(MWKEY *buf, MWKEYMOD *modifiers, MWSCANCODE *scancode);
|
extern KBDDEVICE kbddev;
|
extern KBDDEVICE kbddev;
|
|
|
|
|
|
|
int GdLoadImageFromBuffer(PSD psd, void *buffer, int size, int flags);
|
int GdLoadImageFromBuffer(PSD psd, void *buffer, int size, int flags);
|
void GdDrawImageFromBuffer(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
|
void GdDrawImageFromBuffer(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
|
MWCOORD height, void *buffer, int size, int flags);
|
MWCOORD height, void *buffer, int size, int flags);
|
void GdDrawImageFromFile(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
|
void GdDrawImageFromFile(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
|
MWCOORD height, char *path, int flags);
|
MWCOORD height, char *path, int flags);
|
int GdLoadImageFromFile(PSD psd, char *path, int flags);
|
int GdLoadImageFromFile(PSD psd, char *path, int flags);
|
void GdDrawImageToFit(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
|
void GdDrawImageToFit(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
|
MWCOORD height, int id);
|
MWCOORD height, int id);
|
void GdFreeImage(int id);
|
void GdFreeImage(int id);
|
MWBOOL GdGetImageInfo(int id, PMWIMAGEINFO pii);
|
MWBOOL GdGetImageInfo(int id, PMWIMAGEINFO pii);
|
void GdStretchImage(PMWIMAGEHDR src, MWCLIPRECT *srcrect, PMWIMAGEHDR dst,
|
void GdStretchImage(PMWIMAGEHDR src, MWCLIPRECT *srcrect, PMWIMAGEHDR dst,
|
MWCLIPRECT *dstrect);
|
MWCLIPRECT *dstrect);
|
|
|
|
|
|
|
|
|
|
|
void * GdItemAlloc(unsigned int size);
|
void * GdItemAlloc(unsigned int size);
|
void GdListAdd(PMWLISTHEAD pHead,PMWLIST pItem);
|
void GdListAdd(PMWLISTHEAD pHead,PMWLIST pItem);
|
void GdListInsert(PMWLISTHEAD pHead,PMWLIST pItem);
|
void GdListInsert(PMWLISTHEAD pHead,PMWLIST pItem);
|
void GdListRemove(PMWLISTHEAD pHead,PMWLIST pItem);
|
void GdListRemove(PMWLISTHEAD pHead,PMWLIST pItem);
|
# 591 "/projects/mw/markom/mw/src/include/device.h"
|
# 591 "/projects/mw/markom/mw/src/include/device.h"
|
# 1 "/projects/or32-uclinux/include/sys/time.h" 1
|
# 1 "/projects/or32-uclinux/include/sys/time.h" 1
|
# 26 "/projects/or32-uclinux/include/sys/time.h"
|
# 26 "/projects/or32-uclinux/include/sys/time.h"
|
# 1 "/projects/or32-uclinux/include/time.h" 1
|
# 1 "/projects/or32-uclinux/include/time.h" 1
|
# 27 "/projects/or32-uclinux/include/sys/time.h" 2
|
# 27 "/projects/or32-uclinux/include/sys/time.h" 2
|
|
|
# 1 "/projects/or32-uclinux/include/bits/time.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/time.h" 1
|
# 29 "/projects/or32-uclinux/include/sys/time.h" 2
|
# 29 "/projects/or32-uclinux/include/sys/time.h" 2
|
|
|
|
|
|
|
|
|
typedef __suseconds_t suseconds_t;
|
typedef __suseconds_t suseconds_t;
|
|
|
|
|
|
|
|
|
|
|
# 56 "/projects/or32-uclinux/include/sys/time.h"
|
# 56 "/projects/or32-uclinux/include/sys/time.h"
|
struct timezone
|
struct timezone
|
{
|
{
|
int tz_minuteswest;
|
int tz_minuteswest;
|
int tz_dsttime;
|
int tz_dsttime;
|
};
|
};
|
|
|
typedef struct timezone *__restrict __timezone_ptr_t;
|
typedef struct timezone *__restrict __timezone_ptr_t;
|
# 72 "/projects/or32-uclinux/include/sys/time.h"
|
# 72 "/projects/or32-uclinux/include/sys/time.h"
|
extern int gettimeofday (struct timeval *__restrict __tv,
|
extern int gettimeofday (struct timeval *__restrict __tv,
|
__timezone_ptr_t __tz) ;
|
__timezone_ptr_t __tz) ;
|
|
|
|
|
|
|
|
|
extern int settimeofday (__const struct timeval *__tv,
|
extern int settimeofday (__const struct timeval *__tv,
|
__const struct timezone *__tz) ;
|
__const struct timezone *__tz) ;
|
|
|
|
|
|
|
|
|
|
|
extern int adjtime (__const struct timeval *__delta,
|
extern int adjtime (__const struct timeval *__delta,
|
struct timeval *__olddelta) ;
|
struct timeval *__olddelta) ;
|
|
|
|
|
|
|
|
|
enum __itimer_which
|
enum __itimer_which
|
{
|
{
|
|
|
ITIMER_REAL = 0,
|
ITIMER_REAL = 0,
|
|
|
|
|
ITIMER_VIRTUAL = 1,
|
ITIMER_VIRTUAL = 1,
|
|
|
|
|
|
|
ITIMER_PROF = 2
|
ITIMER_PROF = 2
|
|
|
};
|
};
|
|
|
|
|
|
|
struct itimerval
|
struct itimerval
|
{
|
{
|
|
|
struct timeval it_interval;
|
struct timeval it_interval;
|
|
|
struct timeval it_value;
|
struct timeval it_value;
|
};
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int __itimer_which_t;
|
typedef int __itimer_which_t;
|
|
|
|
|
|
|
|
|
extern int getitimer (__itimer_which_t __which,
|
extern int getitimer (__itimer_which_t __which,
|
struct itimerval *__value) ;
|
struct itimerval *__value) ;
|
|
|
|
|
|
|
|
|
extern int setitimer (__itimer_which_t __which,
|
extern int setitimer (__itimer_which_t __which,
|
__const struct itimerval *__restrict __new,
|
__const struct itimerval *__restrict __new,
|
struct itimerval *__restrict __old) ;
|
struct itimerval *__restrict __old) ;
|
|
|
|
|
|
|
extern int utimes (__const char *__file, __const struct timeval __tvp[2])
|
extern int utimes (__const char *__file, __const struct timeval __tvp[2])
|
;
|
;
|
# 171 "/projects/or32-uclinux/include/sys/time.h"
|
# 171 "/projects/or32-uclinux/include/sys/time.h"
|
|
|
# 592 "/projects/mw/markom/mw/src/include/device.h" 2
|
# 592 "/projects/mw/markom/mw/src/include/device.h" 2
|
|
|
typedef void (*MWTIMERCB)(void *);
|
typedef void (*MWTIMERCB)(void *);
|
|
|
|
|
|
|
|
|
typedef struct mw_timer MWTIMER;
|
typedef struct mw_timer MWTIMER;
|
struct mw_timer {
|
struct mw_timer {
|
struct timeval timeout;
|
struct timeval timeout;
|
MWTIMERCB callback;
|
MWTIMERCB callback;
|
void *arg;
|
void *arg;
|
MWTIMER *next;
|
MWTIMER *next;
|
MWTIMER *prev;
|
MWTIMER *prev;
|
int type;
|
int type;
|
MWTIMEOUT period;
|
MWTIMEOUT period;
|
};
|
};
|
|
|
MWTIMER *GdAddTimer(MWTIMEOUT timeout, MWTIMERCB callback, void *arg);
|
MWTIMER *GdAddTimer(MWTIMEOUT timeout, MWTIMERCB callback, void *arg);
|
MWTIMER *GdAddPeriodicTimer(MWTIMEOUT timeout, MWTIMERCB callback, void *arg);
|
MWTIMER *GdAddPeriodicTimer(MWTIMEOUT timeout, MWTIMERCB callback, void *arg);
|
void GdDestroyTimer(MWTIMER *timer);
|
void GdDestroyTimer(MWTIMER *timer);
|
MWTIMER *GdFindTimer(void *arg);
|
MWTIMER *GdFindTimer(void *arg);
|
MWBOOL GdGetNextTimeout(struct timeval *tv, MWTIMEOUT timeout);
|
MWBOOL GdGetNextTimeout(struct timeval *tv, MWTIMEOUT timeout);
|
MWBOOL GdTimeout(void);
|
MWBOOL GdTimeout(void);
|
|
|
|
|
|
|
|
|
int GdError(const char *format, ...);
|
int GdError(const char *format, ...);
|
int GdErrorNull(const char *format, ...);
|
int GdErrorNull(const char *format, ...);
|
# 18 "devopen.c" 2
|
# 18 "devopen.c" 2
|
# 1 "/projects/mw/markom/mw/src/include/swap.h" 1
|
# 1 "/projects/mw/markom/mw/src/include/swap.h" 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/byteswap.h" 1
|
# 1 "/projects/or32-uclinux/include/byteswap.h" 1
|
# 23 "/projects/or32-uclinux/include/byteswap.h"
|
# 23 "/projects/or32-uclinux/include/byteswap.h"
|
# 1 "/projects/or32-uclinux/include/bits/byteswap.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/byteswap.h" 1
|
# 24 "/projects/or32-uclinux/include/byteswap.h" 2
|
# 24 "/projects/or32-uclinux/include/byteswap.h" 2
|
# 9 "/projects/mw/markom/mw/src/include/swap.h" 2
|
# 9 "/projects/mw/markom/mw/src/include/swap.h" 2
|
# 19 "devopen.c" 2
|
# 19 "devopen.c" 2
|
# 32 "devopen.c"
|
# 32 "devopen.c"
|
MWPIXELVAL gr_foreground;
|
MWPIXELVAL gr_foreground;
|
MWPIXELVAL gr_background;
|
MWPIXELVAL gr_background;
|
MWBOOL gr_usebg;
|
MWBOOL gr_usebg;
|
int gr_mode = 0;
|
int gr_mode = 0;
|
MWPALENTRY gr_palette[256];
|
MWPALENTRY gr_palette[256];
|
int gr_firstuserpalentry;
|
int gr_firstuserpalentry;
|
int gr_nextpalentry;
|
int gr_nextpalentry;
|
static int gr_pixtype;
|
static int gr_pixtype;
|
static long gr_ncolors;
|
static long gr_ncolors;
|
|
|
|
|
|
|
|
|
PSD
|
PSD
|
GdOpenScreen(void)
|
GdOpenScreen(void)
|
{
|
{
|
PSD psd;
|
PSD psd;
|
MWPALENTRY * stdpal;
|
MWPALENTRY * stdpal;
|
MWSCREENINFO sinfo;
|
MWSCREENINFO sinfo;
|
|
|
psd = scrdev.Open(&scrdev);
|
psd = scrdev.Open(&scrdev);
|
if (!psd)
|
if (!psd)
|
return ((void *)0);
|
return ((void *)0);
|
GdGetScreenInfo(psd, &sinfo);
|
GdGetScreenInfo(psd, &sinfo);
|
gr_pixtype = sinfo.pixtype;
|
gr_pixtype = sinfo.pixtype;
|
gr_ncolors = sinfo.ncolors;
|
gr_ncolors = sinfo.ncolors;
|
|
|
|
|
gr_firstuserpalentry = (int)psd->ncolors;
|
gr_firstuserpalentry = (int)psd->ncolors;
|
|
|
|
|
switch((int)psd->ncolors) {
|
switch((int)psd->ncolors) {
|
|
|
|
|
case 2:
|
case 2:
|
{
|
{
|
extern MWPALENTRY mwstdpal1[2];
|
extern MWPALENTRY mwstdpal1[2];
|
stdpal = mwstdpal1;
|
stdpal = mwstdpal1;
|
}
|
}
|
break;
|
break;
|
|
|
|
|
|
|
case 4:
|
case 4:
|
{
|
{
|
extern MWPALENTRY mwstdpal2[4];
|
extern MWPALENTRY mwstdpal2[4];
|
stdpal = mwstdpal2;
|
stdpal = mwstdpal2;
|
}
|
}
|
break;
|
break;
|
|
|
|
|
|
|
|
|
case 8:
|
case 8:
|
case 16:
|
case 16:
|
{
|
{
|
extern MWPALENTRY mwstdpal4[16];
|
extern MWPALENTRY mwstdpal4[16];
|
stdpal = mwstdpal4;
|
stdpal = mwstdpal4;
|
}
|
}
|
break;
|
break;
|
|
|
|
|
|
|
case 256:
|
case 256:
|
{
|
{
|
extern MWPALENTRY mwstdpal8[256];
|
extern MWPALENTRY mwstdpal8[256];
|
|
|
|
|
|
|
|
|
|
|
gr_firstuserpalentry = 24;
|
gr_firstuserpalentry = 24;
|
|
|
stdpal = mwstdpal8;
|
stdpal = mwstdpal8;
|
}
|
}
|
break;
|
break;
|
|
|
|
|
default:
|
default:
|
|
|
gr_firstuserpalentry = 0;
|
gr_firstuserpalentry = 0;
|
stdpal = ((void *)0);
|
stdpal = ((void *)0);
|
}
|
}
|
|
|
|
|
GdResetPalette();
|
GdResetPalette();
|
GdSetPalette(psd, 0, (int)psd->ncolors, stdpal);
|
GdSetPalette(psd, 0, (int)psd->ncolors, stdpal);
|
# 127 "devopen.c"
|
# 127 "devopen.c"
|
GdSetMode(0);
|
GdSetMode(0);
|
GdSetForeground(GdFindColor(((MWCOLORVAL)(((unsigned char)(255)| ((unsigned short)((unsigned char)(255))<<8))| (((unsigned long)(unsigned char)(255))<<16)))));
|
GdSetForeground(GdFindColor(((MWCOLORVAL)(((unsigned char)(255)| ((unsigned short)((unsigned char)(255))<<8))| (((unsigned long)(unsigned char)(255))<<16)))));
|
GdSetBackground(GdFindColor(((MWCOLORVAL)(((unsigned char)(0)| ((unsigned short)((unsigned char)(0))<<8))| (((unsigned long)(unsigned char)(0))<<16)))));
|
GdSetBackground(GdFindColor(((MWCOLORVAL)(((unsigned char)(0)| ((unsigned short)((unsigned char)(0))<<8))| (((unsigned long)(unsigned char)(0))<<16)))));
|
GdSetUseBackground(1);
|
GdSetUseBackground(1);
|
GdSetFont(GdCreateFont(psd, "System", 0, ((void *)0)));
|
GdSetFont(GdCreateFont(psd, "System", 0, ((void *)0)));
|
|
|
GdSetClipRegion(psd,
|
GdSetClipRegion(psd,
|
GdAllocRectRegion(0, 0, psd->xvirtres, psd->yvirtres));
|
GdAllocRectRegion(0, 0, psd->xvirtres, psd->yvirtres));
|
|
|
|
|
|
|
|
|
|
|
|
|
psd->FillRect(psd, 0, 0, psd->xvirtres-1, psd->yvirtres-1, 0);
|
psd->FillRect(psd, 0, 0, psd->xvirtres-1, psd->yvirtres-1, 0);
|
return psd;
|
return psd;
|
}
|
}
|
|
|
|
|
|
|
|
|
void
|
void
|
GdCloseScreen(PSD psd)
|
GdCloseScreen(PSD psd)
|
{
|
{
|
psd->Close(psd);
|
psd->Close(psd);
|
}
|
}
|
|
|
|
|
int
|
int
|
GdSetPortraitMode(PSD psd, int portraitmode)
|
GdSetPortraitMode(PSD psd, int portraitmode)
|
{
|
{
|
|
|
if (psd->SetPortrait)
|
if (psd->SetPortrait)
|
psd->SetPortrait(psd, portraitmode);
|
psd->SetPortrait(psd, portraitmode);
|
return psd->portrait;
|
return psd->portrait;
|
}
|
}
|
|
|
|
|
|
|
|
|
void
|
void
|
GdGetScreenInfo(PSD psd, PMWSCREENINFO psi)
|
GdGetScreenInfo(PSD psd, PMWSCREENINFO psi)
|
{
|
{
|
psd->GetScreenInfo(psd, psi);
|
psd->GetScreenInfo(psd, psi);
|
GdGetButtonInfo(&psi->buttons);
|
GdGetButtonInfo(&psi->buttons);
|
GdGetModifierInfo(&psi->modifiers, ((void *)0));
|
GdGetModifierInfo(&psi->modifiers, ((void *)0));
|
GdGetCursorPos(&psi->xpos, &psi->ypos);
|
GdGetCursorPos(&psi->xpos, &psi->ypos);
|
}
|
}
|
|
|
|
|
void
|
void
|
GdResetPalette(void)
|
GdResetPalette(void)
|
{
|
{
|
|
|
|
|
|
|
gr_nextpalentry = gr_firstuserpalentry;
|
gr_nextpalentry = gr_firstuserpalentry;
|
}
|
}
|
|
|
|
|
void
|
void
|
GdSetPalette(PSD psd, int first, int count, MWPALENTRY *palette)
|
GdSetPalette(PSD psd, int first, int count, MWPALENTRY *palette)
|
{
|
{
|
int i;
|
int i;
|
|
|
|
|
if(psd->pixtype != 2)
|
if(psd->pixtype != 2)
|
return;
|
return;
|
|
|
|
|
if(first + count > (int)psd->ncolors)
|
if(first + count > (int)psd->ncolors)
|
count = (int)psd->ncolors - first;
|
count = (int)psd->ncolors - first;
|
if(count >= 0 && first < (int)psd->ncolors) {
|
if(count >= 0 && first < (int)psd->ncolors) {
|
psd->SetPalette(psd, first, count, palette);
|
psd->SetPalette(psd, first, count, palette);
|
|
|
|
|
for(i=0; i
|
for(i=0; i
|
gr_palette[i+first] = palette[i];
|
gr_palette[i+first] = palette[i];
|
}
|
}
|
}
|
}
|
|
|
|
|
int
|
int
|
GdGetPalette(PSD psd, int first, int count, MWPALENTRY *palette)
|
GdGetPalette(PSD psd, int first, int count, MWPALENTRY *palette)
|
{
|
{
|
int i;
|
int i;
|
|
|
|
|
if(psd->pixtype != 2)
|
if(psd->pixtype != 2)
|
return 0;
|
return 0;
|
|
|
|
|
if(first + count > (int)psd->ncolors)
|
if(first + count > (int)psd->ncolors)
|
if( (count = (int)psd->ncolors - first) <= 0)
|
if( (count = (int)psd->ncolors - first) <= 0)
|
return 0;
|
return 0;
|
|
|
for(i=0; i
|
for(i=0; i
|
*palette++ = gr_palette[i+first];
|
*palette++ = gr_palette[i+first];
|
|
|
return count;
|
return count;
|
}
|
}
|
|
|
|
|
|
|
|
|
MWPIXELVAL
|
MWPIXELVAL
|
GdFindColor(MWCOLORVAL c)
|
GdFindColor(MWCOLORVAL c)
|
{
|
{
|
|
|
|
|
|
|
|
|
switch(gr_pixtype) {
|
switch(gr_pixtype) {
|
case 3:
|
case 3:
|
case 4:
|
case 4:
|
|
|
|
|
return ((((c) & 0xff) << 16) | ((c) & 0xff00) | (((c) & 0xff0000) >> 16));
|
return ((((c) & 0xff) << 16) | ((c) & 0xff00) | (((c) & 0xff0000) >> 16));
|
|
|
case 5:
|
case 5:
|
|
|
|
|
return ((((c) & 0xf8) << 8) | (((c) & 0xfc00) >> 5) | (((c) & 0xf80000) >> 19));
|
return ((((c) & 0xf8) << 8) | (((c) & 0xfc00) >> 5) | (((c) & 0xf80000) >> 19));
|
|
|
case 6:
|
case 6:
|
|
|
|
|
return ((((c) & 0xf8) << 7) | (((c) & 0xf800) >> 6) | (((c) & 0xf80000) >> 19));
|
return ((((c) & 0xf8) << 7) | (((c) & 0xf800) >> 6) | (((c) & 0xf80000) >> 19));
|
|
|
case 7:
|
case 7:
|
|
|
|
|
return (((c) & 0xe0) | (((c) & 0xe000) >> 11) | (((c) & 0xc00000) >> 22));
|
return (((c) & 0xe0) | (((c) & 0xe000) >> 11) | (((c) & 0xc00000) >> 22));
|
}
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(c & 0x01000000)
|
if(c & 0x01000000)
|
return (c & 0xff);
|
return (c & 0xff);
|
|
|
|
|
return GdFindNearestColor(gr_palette, (int)gr_ncolors, c);
|
return GdFindNearestColor(gr_palette, (int)gr_ncolors, c);
|
}
|
}
|
|
|
|
|
|
|
|
|
|
|
MWPIXELVAL
|
MWPIXELVAL
|
GdFindNearestColor(MWPALENTRY *pal, int size, MWCOLORVAL cr)
|
GdFindNearestColor(MWPALENTRY *pal, int size, MWCOLORVAL cr)
|
{
|
{
|
MWPALENTRY * rgb;
|
MWPALENTRY * rgb;
|
int r, g, b;
|
int r, g, b;
|
int R, G, B;
|
int R, G, B;
|
long diff = 0x7fffffffL;
|
long diff = 0x7fffffffL;
|
long sq;
|
long sq;
|
int best = 0;
|
int best = 0;
|
|
|
r = ((cr) & 0xff);
|
r = ((cr) & 0xff);
|
g = (((cr) >> 8) & 0xff);
|
g = (((cr) >> 8) & 0xff);
|
b = (((cr) >> 16) & 0xff);
|
b = (((cr) >> 16) & 0xff);
|
for(rgb=pal; diff && rgb < &pal[size]; ++rgb) {
|
for(rgb=pal; diff && rgb < &pal[size]; ++rgb) {
|
R = rgb->r - r;
|
R = rgb->r - r;
|
G = rgb->g - g;
|
G = rgb->g - g;
|
B = rgb->b - b;
|
B = rgb->b - b;
|
|
|
|
|
sq = abs(R) + abs(G) + abs(B);
|
sq = abs(R) + abs(G) + abs(B);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(sq < diff) {
|
if(sq < diff) {
|
best = rgb - pal;
|
best = rgb - pal;
|
if((diff = sq) == 0)
|
if((diff = sq) == 0)
|
return best;
|
return best;
|
}
|
}
|
}
|
}
|
return best;
|
return best;
|
}
|
}
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/unistd.h" 1
|
# 1 "/projects/or32-uclinux/include/unistd.h" 1
|
# 28 "/projects/or32-uclinux/include/unistd.h"
|
# 28 "/projects/or32-uclinux/include/unistd.h"
|
|
|
# 175 "/projects/or32-uclinux/include/unistd.h"
|
# 175 "/projects/or32-uclinux/include/unistd.h"
|
# 1 "/projects/or32-uclinux/include/bits/posix_opt.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/posix_opt.h" 1
|
# 176 "/projects/or32-uclinux/include/unistd.h" 2
|
# 176 "/projects/or32-uclinux/include/unistd.h" 2
|
# 199 "/projects/or32-uclinux/include/unistd.h"
|
# 199 "/projects/or32-uclinux/include/unistd.h"
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
|
# 200 "/projects/or32-uclinux/include/unistd.h" 2
|
# 200 "/projects/or32-uclinux/include/unistd.h" 2
|
# 240 "/projects/or32-uclinux/include/unistd.h"
|
# 240 "/projects/or32-uclinux/include/unistd.h"
|
typedef __intptr_t intptr_t;
|
typedef __intptr_t intptr_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef __socklen_t socklen_t;
|
typedef __socklen_t socklen_t;
|
# 260 "/projects/or32-uclinux/include/unistd.h"
|
# 260 "/projects/or32-uclinux/include/unistd.h"
|
extern int access (__const char *__name, int __type) ;
|
extern int access (__const char *__name, int __type) ;
|
# 291 "/projects/or32-uclinux/include/unistd.h"
|
# 291 "/projects/or32-uclinux/include/unistd.h"
|
extern __off_t lseek (int __fd, __off_t __offset, int __whence) ;
|
extern __off_t lseek (int __fd, __off_t __offset, int __whence) ;
|
# 307 "/projects/or32-uclinux/include/unistd.h"
|
# 307 "/projects/or32-uclinux/include/unistd.h"
|
extern int close (int __fd) ;
|
extern int close (int __fd) ;
|
|
|
|
|
|
|
extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
|
extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
|
|
|
|
|
extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
|
extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
|
# 354 "/projects/or32-uclinux/include/unistd.h"
|
# 354 "/projects/or32-uclinux/include/unistd.h"
|
extern int pipe (int __pipedes[2]) ;
|
extern int pipe (int __pipedes[2]) ;
|
# 363 "/projects/or32-uclinux/include/unistd.h"
|
# 363 "/projects/or32-uclinux/include/unistd.h"
|
extern unsigned int alarm (unsigned int __seconds) ;
|
extern unsigned int alarm (unsigned int __seconds) ;
|
# 372 "/projects/or32-uclinux/include/unistd.h"
|
# 372 "/projects/or32-uclinux/include/unistd.h"
|
extern unsigned int sleep (unsigned int __seconds) ;
|
extern unsigned int sleep (unsigned int __seconds) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
|
extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
|
;
|
;
|
|
|
|
|
|
|
extern int usleep (__useconds_t __useconds) ;
|
extern int usleep (__useconds_t __useconds) ;
|
|
|
|
|
|
|
|
|
|
|
extern int pause (void) ;
|
extern int pause (void) ;
|
|
|
|
|
|
|
extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
|
extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
|
;
|
;
|
|
|
|
|
|
|
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) ;
|
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) ;
|
|
|
|
|
|
|
|
|
extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
|
extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
|
;
|
;
|
|
|
|
|
|
|
|
|
extern int chdir (__const char *__path) ;
|
extern int chdir (__const char *__path) ;
|
|
|
|
|
|
|
extern int fchdir (int __fd) ;
|
extern int fchdir (int __fd) ;
|
# 424 "/projects/or32-uclinux/include/unistd.h"
|
# 424 "/projects/or32-uclinux/include/unistd.h"
|
extern char *getcwd (char *__buf, size_t __size) ;
|
extern char *getcwd (char *__buf, size_t __size) ;
|
# 438 "/projects/or32-uclinux/include/unistd.h"
|
# 438 "/projects/or32-uclinux/include/unistd.h"
|
extern char *getwd (char *__buf) ;
|
extern char *getwd (char *__buf) ;
|
|
|
|
|
|
|
|
|
extern int dup (int __fd) ;
|
extern int dup (int __fd) ;
|
|
|
|
|
extern int dup2 (int __fd, int __fd2) ;
|
extern int dup2 (int __fd, int __fd2) ;
|
|
|
|
|
extern char **__environ;
|
extern char **__environ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int execve (__const char *__path, char *__const __argv[],
|
extern int execve (__const char *__path, char *__const __argv[],
|
char *__const __envp[]) ;
|
char *__const __envp[]) ;
|
# 470 "/projects/or32-uclinux/include/unistd.h"
|
# 470 "/projects/or32-uclinux/include/unistd.h"
|
extern int execv (__const char *__path, char *__const __argv[]) ;
|
extern int execv (__const char *__path, char *__const __argv[]) ;
|
|
|
|
|
|
|
extern int execle (__const char *__path, __const char *__arg, ...) ;
|
extern int execle (__const char *__path, __const char *__arg, ...) ;
|
|
|
|
|
|
|
extern int execl (__const char *__path, __const char *__arg, ...) ;
|
extern int execl (__const char *__path, __const char *__arg, ...) ;
|
|
|
|
|
|
|
extern int execvp (__const char *__file, char *__const __argv[]) ;
|
extern int execvp (__const char *__file, char *__const __argv[]) ;
|
|
|
|
|
|
|
|
|
extern int execlp (__const char *__file, __const char *__arg, ...) ;
|
extern int execlp (__const char *__file, __const char *__arg, ...) ;
|
|
|
|
|
|
|
|
|
extern int nice (int __inc) ;
|
extern int nice (int __inc) ;
|
|
|
|
|
|
|
|
|
extern void _exit (int __status) __attribute__ ((__noreturn__));
|
extern void _exit (int __status) __attribute__ ((__noreturn__));
|
|
|
|
|
|
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/bits/confname.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/confname.h" 1
|
# 25 "/projects/or32-uclinux/include/bits/confname.h"
|
# 25 "/projects/or32-uclinux/include/bits/confname.h"
|
enum
|
enum
|
{
|
{
|
_PC_LINK_MAX,
|
_PC_LINK_MAX,
|
|
|
_PC_MAX_CANON,
|
_PC_MAX_CANON,
|
|
|
_PC_MAX_INPUT,
|
_PC_MAX_INPUT,
|
|
|
_PC_NAME_MAX,
|
_PC_NAME_MAX,
|
|
|
_PC_PATH_MAX,
|
_PC_PATH_MAX,
|
|
|
_PC_PIPE_BUF,
|
_PC_PIPE_BUF,
|
|
|
_PC_CHOWN_RESTRICTED,
|
_PC_CHOWN_RESTRICTED,
|
|
|
_PC_NO_TRUNC,
|
_PC_NO_TRUNC,
|
|
|
_PC_VDISABLE,
|
_PC_VDISABLE,
|
|
|
_PC_SYNC_IO,
|
_PC_SYNC_IO,
|
|
|
_PC_ASYNC_IO,
|
_PC_ASYNC_IO,
|
|
|
_PC_PRIO_IO,
|
_PC_PRIO_IO,
|
|
|
_PC_SOCK_MAXBUF,
|
_PC_SOCK_MAXBUF,
|
|
|
_PC_FILESIZEBITS,
|
_PC_FILESIZEBITS,
|
|
|
_PC_REC_INCR_XFER_SIZE,
|
_PC_REC_INCR_XFER_SIZE,
|
|
|
_PC_REC_MAX_XFER_SIZE,
|
_PC_REC_MAX_XFER_SIZE,
|
|
|
_PC_REC_MIN_XFER_SIZE,
|
_PC_REC_MIN_XFER_SIZE,
|
|
|
_PC_REC_XFER_ALIGN,
|
_PC_REC_XFER_ALIGN,
|
|
|
_PC_ALLOC_SIZE_MIN,
|
_PC_ALLOC_SIZE_MIN,
|
|
|
_PC_SYMLINK_MAX
|
_PC_SYMLINK_MAX
|
|
|
};
|
};
|
|
|
|
|
enum
|
enum
|
{
|
{
|
_SC_ARG_MAX,
|
_SC_ARG_MAX,
|
|
|
_SC_CHILD_MAX,
|
_SC_CHILD_MAX,
|
|
|
_SC_CLK_TCK,
|
_SC_CLK_TCK,
|
|
|
_SC_NGROUPS_MAX,
|
_SC_NGROUPS_MAX,
|
|
|
_SC_OPEN_MAX,
|
_SC_OPEN_MAX,
|
|
|
_SC_STREAM_MAX,
|
_SC_STREAM_MAX,
|
|
|
_SC_TZNAME_MAX,
|
_SC_TZNAME_MAX,
|
|
|
_SC_JOB_CONTROL,
|
_SC_JOB_CONTROL,
|
|
|
_SC_SAVED_IDS,
|
_SC_SAVED_IDS,
|
|
|
_SC_REALTIME_SIGNALS,
|
_SC_REALTIME_SIGNALS,
|
|
|
_SC_PRIORITY_SCHEDULING,
|
_SC_PRIORITY_SCHEDULING,
|
|
|
_SC_TIMERS,
|
_SC_TIMERS,
|
|
|
_SC_ASYNCHRONOUS_IO,
|
_SC_ASYNCHRONOUS_IO,
|
|
|
_SC_PRIORITIZED_IO,
|
_SC_PRIORITIZED_IO,
|
|
|
_SC_SYNCHRONIZED_IO,
|
_SC_SYNCHRONIZED_IO,
|
|
|
_SC_FSYNC,
|
_SC_FSYNC,
|
|
|
_SC_MAPPED_FILES,
|
_SC_MAPPED_FILES,
|
|
|
_SC_MEMLOCK,
|
_SC_MEMLOCK,
|
|
|
_SC_MEMLOCK_RANGE,
|
_SC_MEMLOCK_RANGE,
|
|
|
_SC_MEMORY_PROTECTION,
|
_SC_MEMORY_PROTECTION,
|
|
|
_SC_MESSAGE_PASSING,
|
_SC_MESSAGE_PASSING,
|
|
|
_SC_SEMAPHORES,
|
_SC_SEMAPHORES,
|
|
|
_SC_SHARED_MEMORY_OBJECTS,
|
_SC_SHARED_MEMORY_OBJECTS,
|
|
|
_SC_AIO_LISTIO_MAX,
|
_SC_AIO_LISTIO_MAX,
|
|
|
_SC_AIO_MAX,
|
_SC_AIO_MAX,
|
|
|
_SC_AIO_PRIO_DELTA_MAX,
|
_SC_AIO_PRIO_DELTA_MAX,
|
|
|
_SC_DELAYTIMER_MAX,
|
_SC_DELAYTIMER_MAX,
|
|
|
_SC_MQ_OPEN_MAX,
|
_SC_MQ_OPEN_MAX,
|
|
|
_SC_MQ_PRIO_MAX,
|
_SC_MQ_PRIO_MAX,
|
|
|
_SC_VERSION,
|
_SC_VERSION,
|
|
|
_SC_PAGESIZE,
|
_SC_PAGESIZE,
|
|
|
|
|
_SC_RTSIG_MAX,
|
_SC_RTSIG_MAX,
|
|
|
_SC_SEM_NSEMS_MAX,
|
_SC_SEM_NSEMS_MAX,
|
|
|
_SC_SEM_VALUE_MAX,
|
_SC_SEM_VALUE_MAX,
|
|
|
_SC_SIGQUEUE_MAX,
|
_SC_SIGQUEUE_MAX,
|
|
|
_SC_TIMER_MAX,
|
_SC_TIMER_MAX,
|
|
|
|
|
|
|
|
|
_SC_BC_BASE_MAX,
|
_SC_BC_BASE_MAX,
|
|
|
_SC_BC_DIM_MAX,
|
_SC_BC_DIM_MAX,
|
|
|
_SC_BC_SCALE_MAX,
|
_SC_BC_SCALE_MAX,
|
|
|
_SC_BC_STRING_MAX,
|
_SC_BC_STRING_MAX,
|
|
|
_SC_COLL_WEIGHTS_MAX,
|
_SC_COLL_WEIGHTS_MAX,
|
|
|
_SC_EQUIV_CLASS_MAX,
|
_SC_EQUIV_CLASS_MAX,
|
|
|
_SC_EXPR_NEST_MAX,
|
_SC_EXPR_NEST_MAX,
|
|
|
_SC_LINE_MAX,
|
_SC_LINE_MAX,
|
|
|
_SC_RE_DUP_MAX,
|
_SC_RE_DUP_MAX,
|
|
|
_SC_CHARCLASS_NAME_MAX,
|
_SC_CHARCLASS_NAME_MAX,
|
|
|
|
|
_SC_2_VERSION,
|
_SC_2_VERSION,
|
|
|
_SC_2_C_BIND,
|
_SC_2_C_BIND,
|
|
|
_SC_2_C_DEV,
|
_SC_2_C_DEV,
|
|
|
_SC_2_FORT_DEV,
|
_SC_2_FORT_DEV,
|
|
|
_SC_2_FORT_RUN,
|
_SC_2_FORT_RUN,
|
|
|
_SC_2_SW_DEV,
|
_SC_2_SW_DEV,
|
|
|
_SC_2_LOCALEDEF,
|
_SC_2_LOCALEDEF,
|
|
|
|
|
_SC_PII,
|
_SC_PII,
|
|
|
_SC_PII_XTI,
|
_SC_PII_XTI,
|
|
|
_SC_PII_SOCKET,
|
_SC_PII_SOCKET,
|
|
|
_SC_PII_INTERNET,
|
_SC_PII_INTERNET,
|
|
|
_SC_PII_OSI,
|
_SC_PII_OSI,
|
|
|
_SC_POLL,
|
_SC_POLL,
|
|
|
_SC_SELECT,
|
_SC_SELECT,
|
|
|
_SC_UIO_MAXIOV,
|
_SC_UIO_MAXIOV,
|
|
|
_SC_IOV_MAX = _SC_UIO_MAXIOV,
|
_SC_IOV_MAX = _SC_UIO_MAXIOV,
|
|
|
_SC_PII_INTERNET_STREAM,
|
_SC_PII_INTERNET_STREAM,
|
|
|
_SC_PII_INTERNET_DGRAM,
|
_SC_PII_INTERNET_DGRAM,
|
|
|
_SC_PII_OSI_COTS,
|
_SC_PII_OSI_COTS,
|
|
|
_SC_PII_OSI_CLTS,
|
_SC_PII_OSI_CLTS,
|
|
|
_SC_PII_OSI_M,
|
_SC_PII_OSI_M,
|
|
|
_SC_T_IOV_MAX,
|
_SC_T_IOV_MAX,
|
|
|
|
|
|
|
_SC_THREADS,
|
_SC_THREADS,
|
|
|
_SC_THREAD_SAFE_FUNCTIONS,
|
_SC_THREAD_SAFE_FUNCTIONS,
|
|
|
_SC_GETGR_R_SIZE_MAX,
|
_SC_GETGR_R_SIZE_MAX,
|
|
|
_SC_GETPW_R_SIZE_MAX,
|
_SC_GETPW_R_SIZE_MAX,
|
|
|
_SC_LOGIN_NAME_MAX,
|
_SC_LOGIN_NAME_MAX,
|
|
|
_SC_TTY_NAME_MAX,
|
_SC_TTY_NAME_MAX,
|
|
|
_SC_THREAD_DESTRUCTOR_ITERATIONS,
|
_SC_THREAD_DESTRUCTOR_ITERATIONS,
|
|
|
_SC_THREAD_KEYS_MAX,
|
_SC_THREAD_KEYS_MAX,
|
|
|
_SC_THREAD_STACK_MIN,
|
_SC_THREAD_STACK_MIN,
|
|
|
_SC_THREAD_THREADS_MAX,
|
_SC_THREAD_THREADS_MAX,
|
|
|
_SC_THREAD_ATTR_STACKADDR,
|
_SC_THREAD_ATTR_STACKADDR,
|
|
|
_SC_THREAD_ATTR_STACKSIZE,
|
_SC_THREAD_ATTR_STACKSIZE,
|
|
|
_SC_THREAD_PRIORITY_SCHEDULING,
|
_SC_THREAD_PRIORITY_SCHEDULING,
|
|
|
_SC_THREAD_PRIO_INHERIT,
|
_SC_THREAD_PRIO_INHERIT,
|
|
|
_SC_THREAD_PRIO_PROTECT,
|
_SC_THREAD_PRIO_PROTECT,
|
|
|
_SC_THREAD_PROCESS_SHARED,
|
_SC_THREAD_PROCESS_SHARED,
|
|
|
|
|
_SC_NPROCESSORS_CONF,
|
_SC_NPROCESSORS_CONF,
|
|
|
_SC_NPROCESSORS_ONLN,
|
_SC_NPROCESSORS_ONLN,
|
|
|
_SC_PHYS_PAGES,
|
_SC_PHYS_PAGES,
|
|
|
_SC_AVPHYS_PAGES,
|
_SC_AVPHYS_PAGES,
|
|
|
_SC_ATEXIT_MAX,
|
_SC_ATEXIT_MAX,
|
|
|
_SC_PASS_MAX,
|
_SC_PASS_MAX,
|
|
|
|
|
_SC_XOPEN_VERSION,
|
_SC_XOPEN_VERSION,
|
|
|
_SC_XOPEN_XCU_VERSION,
|
_SC_XOPEN_XCU_VERSION,
|
|
|
_SC_XOPEN_UNIX,
|
_SC_XOPEN_UNIX,
|
|
|
_SC_XOPEN_CRYPT,
|
_SC_XOPEN_CRYPT,
|
|
|
_SC_XOPEN_ENH_I18N,
|
_SC_XOPEN_ENH_I18N,
|
|
|
_SC_XOPEN_SHM,
|
_SC_XOPEN_SHM,
|
|
|
|
|
_SC_2_CHAR_TERM,
|
_SC_2_CHAR_TERM,
|
|
|
_SC_2_C_VERSION,
|
_SC_2_C_VERSION,
|
|
|
_SC_2_UPE,
|
_SC_2_UPE,
|
|
|
|
|
_SC_XOPEN_XPG2,
|
_SC_XOPEN_XPG2,
|
|
|
_SC_XOPEN_XPG3,
|
_SC_XOPEN_XPG3,
|
|
|
_SC_XOPEN_XPG4,
|
_SC_XOPEN_XPG4,
|
|
|
|
|
_SC_CHAR_BIT,
|
_SC_CHAR_BIT,
|
|
|
_SC_CHAR_MAX,
|
_SC_CHAR_MAX,
|
|
|
_SC_CHAR_MIN,
|
_SC_CHAR_MIN,
|
|
|
_SC_INT_MAX,
|
_SC_INT_MAX,
|
|
|
_SC_INT_MIN,
|
_SC_INT_MIN,
|
|
|
_SC_LONG_BIT,
|
_SC_LONG_BIT,
|
|
|
_SC_WORD_BIT,
|
_SC_WORD_BIT,
|
|
|
_SC_MB_LEN_MAX,
|
_SC_MB_LEN_MAX,
|
|
|
_SC_NZERO,
|
_SC_NZERO,
|
|
|
_SC_SSIZE_MAX,
|
_SC_SSIZE_MAX,
|
|
|
_SC_SCHAR_MAX,
|
_SC_SCHAR_MAX,
|
|
|
_SC_SCHAR_MIN,
|
_SC_SCHAR_MIN,
|
|
|
_SC_SHRT_MAX,
|
_SC_SHRT_MAX,
|
|
|
_SC_SHRT_MIN,
|
_SC_SHRT_MIN,
|
|
|
_SC_UCHAR_MAX,
|
_SC_UCHAR_MAX,
|
|
|
_SC_UINT_MAX,
|
_SC_UINT_MAX,
|
|
|
_SC_ULONG_MAX,
|
_SC_ULONG_MAX,
|
|
|
_SC_USHRT_MAX,
|
_SC_USHRT_MAX,
|
|
|
|
|
_SC_NL_ARGMAX,
|
_SC_NL_ARGMAX,
|
|
|
_SC_NL_LANGMAX,
|
_SC_NL_LANGMAX,
|
|
|
_SC_NL_MSGMAX,
|
_SC_NL_MSGMAX,
|
|
|
_SC_NL_NMAX,
|
_SC_NL_NMAX,
|
|
|
_SC_NL_SETMAX,
|
_SC_NL_SETMAX,
|
|
|
_SC_NL_TEXTMAX,
|
_SC_NL_TEXTMAX,
|
|
|
|
|
_SC_XBS5_ILP32_OFF32,
|
_SC_XBS5_ILP32_OFF32,
|
|
|
_SC_XBS5_ILP32_OFFBIG,
|
_SC_XBS5_ILP32_OFFBIG,
|
|
|
_SC_XBS5_LP64_OFF64,
|
_SC_XBS5_LP64_OFF64,
|
|
|
_SC_XBS5_LPBIG_OFFBIG,
|
_SC_XBS5_LPBIG_OFFBIG,
|
|
|
|
|
_SC_XOPEN_LEGACY,
|
_SC_XOPEN_LEGACY,
|
|
|
_SC_XOPEN_REALTIME,
|
_SC_XOPEN_REALTIME,
|
|
|
_SC_XOPEN_REALTIME_THREADS,
|
_SC_XOPEN_REALTIME_THREADS,
|
|
|
|
|
_SC_ADVISORY_INFO,
|
_SC_ADVISORY_INFO,
|
|
|
_SC_BARRIERS,
|
_SC_BARRIERS,
|
|
|
_SC_BASE,
|
_SC_BASE,
|
|
|
_SC_C_LANG_SUPPORT,
|
_SC_C_LANG_SUPPORT,
|
|
|
_SC_C_LANG_SUPPORT_R,
|
_SC_C_LANG_SUPPORT_R,
|
|
|
_SC_CLOCK_SELECTION,
|
_SC_CLOCK_SELECTION,
|
|
|
_SC_CPUTIME,
|
_SC_CPUTIME,
|
|
|
_SC_THREAD_CPUTIME,
|
_SC_THREAD_CPUTIME,
|
|
|
_SC_DEVICE_IO,
|
_SC_DEVICE_IO,
|
|
|
_SC_DEVICE_SPECIFIC,
|
_SC_DEVICE_SPECIFIC,
|
|
|
_SC_DEVICE_SPECIFIC_R,
|
_SC_DEVICE_SPECIFIC_R,
|
|
|
_SC_FD_MGMT,
|
_SC_FD_MGMT,
|
|
|
_SC_FIFO,
|
_SC_FIFO,
|
|
|
_SC_PIPE,
|
_SC_PIPE,
|
|
|
_SC_FILE_ATTRIBUTES,
|
_SC_FILE_ATTRIBUTES,
|
|
|
_SC_FILE_LOCKING,
|
_SC_FILE_LOCKING,
|
|
|
_SC_FILE_SYSTEM,
|
_SC_FILE_SYSTEM,
|
|
|
_SC_MONOTONIC_CLOCK,
|
_SC_MONOTONIC_CLOCK,
|
|
|
_SC_MULTI_PROCESS,
|
_SC_MULTI_PROCESS,
|
|
|
_SC_SINGLE_PROCESS,
|
_SC_SINGLE_PROCESS,
|
|
|
_SC_NETWORKING,
|
_SC_NETWORKING,
|
|
|
_SC_READER_WRITER_LOCKS,
|
_SC_READER_WRITER_LOCKS,
|
|
|
_SC_SPIN_LOCKS,
|
_SC_SPIN_LOCKS,
|
|
|
_SC_REGEXP,
|
_SC_REGEXP,
|
|
|
_SC_REGEX_VERSION,
|
_SC_REGEX_VERSION,
|
|
|
_SC_SHELL,
|
_SC_SHELL,
|
|
|
_SC_SIGNALS,
|
_SC_SIGNALS,
|
|
|
_SC_SPAWN,
|
_SC_SPAWN,
|
|
|
_SC_SPORADIC_SERVER,
|
_SC_SPORADIC_SERVER,
|
|
|
_SC_THREAD_SPORADIC_SERVER,
|
_SC_THREAD_SPORADIC_SERVER,
|
|
|
_SC_SYSTEM_DATABASE,
|
_SC_SYSTEM_DATABASE,
|
|
|
_SC_SYSTEM_DATABASE_R,
|
_SC_SYSTEM_DATABASE_R,
|
|
|
_SC_TIMEOUTS,
|
_SC_TIMEOUTS,
|
|
|
_SC_TYPED_MEMORY_OBJECTS,
|
_SC_TYPED_MEMORY_OBJECTS,
|
|
|
_SC_USER_GROUPS,
|
_SC_USER_GROUPS,
|
|
|
_SC_USER_GROUPS_R,
|
_SC_USER_GROUPS_R,
|
|
|
_SC_2_PBS,
|
_SC_2_PBS,
|
|
|
_SC_2_PBS_ACCOUNTING,
|
_SC_2_PBS_ACCOUNTING,
|
|
|
_SC_2_PBS_LOCATE,
|
_SC_2_PBS_LOCATE,
|
|
|
_SC_2_PBS_MESSAGE,
|
_SC_2_PBS_MESSAGE,
|
|
|
_SC_2_PBS_TRACK,
|
_SC_2_PBS_TRACK,
|
|
|
_SC_SYMLOOP_MAX,
|
_SC_SYMLOOP_MAX,
|
|
|
_SC_STREAMS,
|
_SC_STREAMS,
|
|
|
_SC_2_PBS_CHECKPOINT,
|
_SC_2_PBS_CHECKPOINT,
|
|
|
|
|
_SC_V6_ILP32_OFF32,
|
_SC_V6_ILP32_OFF32,
|
|
|
_SC_V6_ILP32_OFFBIG,
|
_SC_V6_ILP32_OFFBIG,
|
|
|
_SC_V6_LP64_OFF64,
|
_SC_V6_LP64_OFF64,
|
|
|
_SC_V6_LPBIG_OFFBIG,
|
_SC_V6_LPBIG_OFFBIG,
|
|
|
|
|
_SC_HOST_NAME_MAX,
|
_SC_HOST_NAME_MAX,
|
|
|
_SC_TRACE,
|
_SC_TRACE,
|
|
|
_SC_TRACE_EVENT_FILTER,
|
_SC_TRACE_EVENT_FILTER,
|
|
|
_SC_TRACE_INHERIT,
|
_SC_TRACE_INHERIT,
|
|
|
_SC_TRACE_LOG
|
_SC_TRACE_LOG
|
|
|
};
|
};
|
|
|
|
|
|
|
|
|
|
|
enum
|
enum
|
{
|
{
|
_CS_PATH,
|
_CS_PATH,
|
# 563 "/projects/or32-uclinux/include/bits/confname.h"
|
# 563 "/projects/or32-uclinux/include/bits/confname.h"
|
_CS_V6_WIDTH_RESTRICTED_ENVS
|
_CS_V6_WIDTH_RESTRICTED_ENVS
|
|
|
};
|
};
|
# 504 "/projects/or32-uclinux/include/unistd.h" 2
|
# 504 "/projects/or32-uclinux/include/unistd.h" 2
|
|
|
|
|
extern long int pathconf (__const char *__path, int __name) ;
|
extern long int pathconf (__const char *__path, int __name) ;
|
|
|
|
|
extern long int fpathconf (int __fd, int __name) ;
|
extern long int fpathconf (int __fd, int __name) ;
|
|
|
|
|
extern long int sysconf (int __name) __attribute__ ((__const__));
|
extern long int sysconf (int __name) __attribute__ ((__const__));
|
|
|
|
|
|
|
extern size_t confstr (int __name, char *__buf, size_t __len) ;
|
extern size_t confstr (int __name, char *__buf, size_t __len) ;
|
|
|
|
|
|
|
|
|
extern __pid_t getpid (void) ;
|
extern __pid_t getpid (void) ;
|
|
|
|
|
extern __pid_t getppid (void) ;
|
extern __pid_t getppid (void) ;
|
|
|
|
|
|
|
|
|
extern __pid_t getpgrp (void) ;
|
extern __pid_t getpgrp (void) ;
|
# 539 "/projects/or32-uclinux/include/unistd.h"
|
# 539 "/projects/or32-uclinux/include/unistd.h"
|
extern __pid_t __getpgid (__pid_t __pid) ;
|
extern __pid_t __getpgid (__pid_t __pid) ;
|
# 548 "/projects/or32-uclinux/include/unistd.h"
|
# 548 "/projects/or32-uclinux/include/unistd.h"
|
extern int setpgid (__pid_t __pid, __pid_t __pgid) ;
|
extern int setpgid (__pid_t __pid, __pid_t __pgid) ;
|
# 565 "/projects/or32-uclinux/include/unistd.h"
|
# 565 "/projects/or32-uclinux/include/unistd.h"
|
extern int setpgrp (void) ;
|
extern int setpgrp (void) ;
|
# 583 "/projects/or32-uclinux/include/unistd.h"
|
# 583 "/projects/or32-uclinux/include/unistd.h"
|
extern __pid_t setsid (void) ;
|
extern __pid_t setsid (void) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __uid_t getuid (void) ;
|
extern __uid_t getuid (void) ;
|
|
|
|
|
extern __uid_t geteuid (void) ;
|
extern __uid_t geteuid (void) ;
|
|
|
|
|
extern __gid_t getgid (void) ;
|
extern __gid_t getgid (void) ;
|
|
|
|
|
extern __gid_t getegid (void) ;
|
extern __gid_t getegid (void) ;
|
|
|
|
|
|
|
|
|
extern int getgroups (int __size, __gid_t __list[]) ;
|
extern int getgroups (int __size, __gid_t __list[]) ;
|
# 617 "/projects/or32-uclinux/include/unistd.h"
|
# 617 "/projects/or32-uclinux/include/unistd.h"
|
extern int setuid (__uid_t __uid) ;
|
extern int setuid (__uid_t __uid) ;
|
|
|
|
|
|
|
|
|
extern int setreuid (__uid_t __ruid, __uid_t __euid) ;
|
extern int setreuid (__uid_t __ruid, __uid_t __euid) ;
|
|
|
|
|
|
|
|
|
extern int seteuid (__uid_t __uid) ;
|
extern int seteuid (__uid_t __uid) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int setgid (__gid_t __gid) ;
|
extern int setgid (__gid_t __gid) ;
|
|
|
|
|
|
|
|
|
extern int setregid (__gid_t __rgid, __gid_t __egid) ;
|
extern int setregid (__gid_t __rgid, __gid_t __egid) ;
|
|
|
|
|
|
|
|
|
extern int setegid (__gid_t __gid) ;
|
extern int setegid (__gid_t __gid) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __pid_t fork (void) ;
|
extern __pid_t fork (void) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __pid_t vfork (void) ;
|
extern __pid_t vfork (void) ;
|
|
|
|
|
|
|
|
|
|
|
extern char *ttyname (int __fd) ;
|
extern char *ttyname (int __fd) ;
|
|
|
|
|
|
|
extern int ttyname_r (int __fd, char *__buf, size_t __buflen) ;
|
extern int ttyname_r (int __fd, char *__buf, size_t __buflen) ;
|
|
|
|
|
|
|
extern int isatty (int __fd) ;
|
extern int isatty (int __fd) ;
|
|
|
|
|
|
|
|
|
|
|
extern int ttyslot (void) ;
|
extern int ttyslot (void) ;
|
|
|
|
|
|
|
|
|
extern int link (__const char *__from, __const char *__to) ;
|
extern int link (__const char *__from, __const char *__to) ;
|
|
|
|
|
|
|
extern int symlink (__const char *__from, __const char *__to) ;
|
extern int symlink (__const char *__from, __const char *__to) ;
|
|
|
|
|
|
|
|
|
extern int readlink (__const char *__restrict __path, char *__restrict __buf,
|
extern int readlink (__const char *__restrict __path, char *__restrict __buf,
|
size_t __len) ;
|
size_t __len) ;
|
|
|
|
|
|
|
extern int unlink (__const char *__name) ;
|
extern int unlink (__const char *__name) ;
|
|
|
|
|
extern int rmdir (__const char *__path) ;
|
extern int rmdir (__const char *__path) ;
|
|
|
|
|
|
|
extern __pid_t tcgetpgrp (int __fd) ;
|
extern __pid_t tcgetpgrp (int __fd) ;
|
|
|
|
|
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) ;
|
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) ;
|
|
|
|
|
|
|
extern char *getlogin (void) ;
|
extern char *getlogin (void) ;
|
# 721 "/projects/or32-uclinux/include/unistd.h"
|
# 721 "/projects/or32-uclinux/include/unistd.h"
|
extern int setlogin (__const char *__name) ;
|
extern int setlogin (__const char *__name) ;
|
# 730 "/projects/or32-uclinux/include/unistd.h"
|
# 730 "/projects/or32-uclinux/include/unistd.h"
|
# 1 "/projects/or32-uclinux/include/getopt.h" 1
|
# 1 "/projects/or32-uclinux/include/getopt.h" 1
|
# 47 "/projects/or32-uclinux/include/getopt.h"
|
# 47 "/projects/or32-uclinux/include/getopt.h"
|
extern char *optarg;
|
extern char *optarg;
|
# 61 "/projects/or32-uclinux/include/getopt.h"
|
# 61 "/projects/or32-uclinux/include/getopt.h"
|
extern int optind;
|
extern int optind;
|
|
|
|
|
|
|
|
|
extern int opterr;
|
extern int opterr;
|
|
|
|
|
|
|
extern int optopt;
|
extern int optopt;
|
# 145 "/projects/or32-uclinux/include/getopt.h"
|
# 145 "/projects/or32-uclinux/include/getopt.h"
|
extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
|
extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
|
# 731 "/projects/or32-uclinux/include/unistd.h" 2
|
# 731 "/projects/or32-uclinux/include/unistd.h" 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int gethostname (char *__name, size_t __len) ;
|
extern int gethostname (char *__name, size_t __len) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int sethostname (__const char *__name, size_t __len) ;
|
extern int sethostname (__const char *__name, size_t __len) ;
|
|
|
|
|
|
|
extern int sethostid (long int __id) ;
|
extern int sethostid (long int __id) ;
|
|
|
|
|
|
|
|
|
|
|
extern int getdomainname (char *__name, size_t __len) ;
|
extern int getdomainname (char *__name, size_t __len) ;
|
extern int setdomainname (__const char *__name, size_t __len) ;
|
extern int setdomainname (__const char *__name, size_t __len) ;
|
|
|
|
|
|
|
|
|
|
|
extern int vhangup (void) ;
|
extern int vhangup (void) ;
|
|
|
|
|
extern int revoke (__const char *__file) ;
|
extern int revoke (__const char *__file) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int profil (unsigned short int *__sample_buffer, size_t __size,
|
extern int profil (unsigned short int *__sample_buffer, size_t __size,
|
size_t __offset, unsigned int __scale) ;
|
size_t __offset, unsigned int __scale) ;
|
|
|
|
|
|
|
|
|
|
|
extern int acct (__const char *__name) ;
|
extern int acct (__const char *__name) ;
|
|
|
|
|
|
|
extern char *getusershell (void) ;
|
extern char *getusershell (void) ;
|
extern void endusershell (void) ;
|
extern void endusershell (void) ;
|
extern void setusershell (void) ;
|
extern void setusershell (void) ;
|
|
|
|
|
|
|
|
|
|
|
extern int daemon (int __nochdir, int __noclose) ;
|
extern int daemon (int __nochdir, int __noclose) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern int chroot (__const char *__path) ;
|
extern int chroot (__const char *__path) ;
|
|
|
|
|
|
|
extern char *getpass (__const char *__prompt) ;
|
extern char *getpass (__const char *__prompt) ;
|
|
|
|
|
|
|
|
|
|
|
extern int fsync (int __fd) ;
|
extern int fsync (int __fd) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
extern long int gethostid (void) ;
|
extern long int gethostid (void) ;
|
|
|
|
|
extern void sync (void) ;
|
extern void sync (void) ;
|
|
|
|
|
|
|
|
|
extern int getpagesize (void) __attribute__ ((__const__));
|
extern int getpagesize (void) __attribute__ ((__const__));
|
|
|
|
|
|
|
|
|
extern int truncate (__const char *__file, __off_t __length) ;
|
extern int truncate (__const char *__file, __off_t __length) ;
|
# 845 "/projects/or32-uclinux/include/unistd.h"
|
# 845 "/projects/or32-uclinux/include/unistd.h"
|
extern int ftruncate (int __fd, __off_t __length) ;
|
extern int ftruncate (int __fd, __off_t __length) ;
|
# 861 "/projects/or32-uclinux/include/unistd.h"
|
# 861 "/projects/or32-uclinux/include/unistd.h"
|
extern int getdtablesize (void) ;
|
extern int getdtablesize (void) ;
|
# 870 "/projects/or32-uclinux/include/unistd.h"
|
# 870 "/projects/or32-uclinux/include/unistd.h"
|
extern int brk (void *__addr) ;
|
extern int brk (void *__addr) ;
|
|
|
|
|
|
|
|
|
|
|
extern void *sbrk (intptr_t __delta) ;
|
extern void *sbrk (intptr_t __delta) ;
|
# 891 "/projects/or32-uclinux/include/unistd.h"
|
# 891 "/projects/or32-uclinux/include/unistd.h"
|
extern long int syscall (long int __sysno, ...) ;
|
extern long int syscall (long int __sysno, ...) ;
|
# 911 "/projects/or32-uclinux/include/unistd.h"
|
# 911 "/projects/or32-uclinux/include/unistd.h"
|
extern int lockf (int __fd, int __cmd, __off_t __len) ;
|
extern int lockf (int __fd, int __cmd, __off_t __len) ;
|
# 942 "/projects/or32-uclinux/include/unistd.h"
|
# 942 "/projects/or32-uclinux/include/unistd.h"
|
extern int fdatasync (int __fildes) ;
|
extern int fdatasync (int __fildes) ;
|
# 987 "/projects/or32-uclinux/include/unistd.h"
|
# 987 "/projects/or32-uclinux/include/unistd.h"
|
extern int pthread_atfork (void (*__prepare) (void),
|
extern int pthread_atfork (void (*__prepare) (void),
|
void (*__parent) (void),
|
void (*__parent) (void),
|
void (*__child) (void)) ;
|
void (*__child) (void)) ;
|
|
|
|
|
|
|
# 317 "devopen.c" 2
|
# 317 "devopen.c" 2
|
# 1 "/projects/or32-uclinux/include/fcntl.h" 1
|
# 1 "/projects/or32-uclinux/include/fcntl.h" 1
|
# 29 "/projects/or32-uclinux/include/fcntl.h"
|
# 29 "/projects/or32-uclinux/include/fcntl.h"
|
|
|
|
|
|
|
|
|
# 1 "/projects/or32-uclinux/include/bits/fcntl.h" 1
|
# 1 "/projects/or32-uclinux/include/bits/fcntl.h" 1
|
# 137 "/projects/or32-uclinux/include/bits/fcntl.h"
|
# 137 "/projects/or32-uclinux/include/bits/fcntl.h"
|
struct flock
|
struct flock
|
{
|
{
|
short int l_type;
|
short int l_type;
|
short int l_whence;
|
short int l_whence;
|
|
|
__off_t l_start;
|
__off_t l_start;
|
__off_t l_len;
|
__off_t l_len;
|
|
|
|
|
|
|
|
|
__pid_t l_pid;
|
__pid_t l_pid;
|
};
|
};
|
# 34 "/projects/or32-uclinux/include/fcntl.h" 2
|
# 34 "/projects/or32-uclinux/include/fcntl.h" 2
|
# 61 "/projects/or32-uclinux/include/fcntl.h"
|
# 61 "/projects/or32-uclinux/include/fcntl.h"
|
extern int fcntl (int __fd, int __cmd, ...) ;
|
extern int fcntl (int __fd, int __cmd, ...) ;
|
# 75 "/projects/or32-uclinux/include/fcntl.h"
|
# 75 "/projects/or32-uclinux/include/fcntl.h"
|
extern int open (__const char *__file, int __oflag, ...) ;
|
extern int open (__const char *__file, int __oflag, ...) ;
|
# 92 "/projects/or32-uclinux/include/fcntl.h"
|
# 92 "/projects/or32-uclinux/include/fcntl.h"
|
extern int creat (__const char *__file, __mode_t __mode) ;
|
extern int creat (__const char *__file, __mode_t __mode) ;
|
# 174 "/projects/or32-uclinux/include/fcntl.h"
|
# 174 "/projects/or32-uclinux/include/fcntl.h"
|
|
|
# 318 "devopen.c" 2
|
# 318 "devopen.c" 2
|
# 328 "devopen.c"
|
# 328 "devopen.c"
|
typedef unsigned char BYTE;
|
typedef unsigned char BYTE;
|
typedef unsigned short WORD;
|
typedef unsigned short WORD;
|
typedef unsigned long DWORD;
|
typedef unsigned long DWORD;
|
typedef long LONG;
|
typedef long LONG;
|
|
|
#pragma pack(1)
|
#pragma pack(1)
|
|
|
typedef struct {
|
typedef struct {
|
|
|
BYTE bfType[2];
|
BYTE bfType[2];
|
DWORD bfSize;
|
DWORD bfSize;
|
WORD bfReserved1;
|
WORD bfReserved1;
|
WORD bfReserved2;
|
WORD bfReserved2;
|
DWORD bfOffBits;
|
DWORD bfOffBits;
|
|
|
DWORD BiSize;
|
DWORD BiSize;
|
LONG BiWidth;
|
LONG BiWidth;
|
LONG BiHeight;
|
LONG BiHeight;
|
WORD BiPlanes;
|
WORD BiPlanes;
|
WORD BiBitCount;
|
WORD BiBitCount;
|
DWORD BiCompression;
|
DWORD BiCompression;
|
DWORD BiSizeImage;
|
DWORD BiSizeImage;
|
LONG BiXpelsPerMeter;
|
LONG BiXpelsPerMeter;
|
LONG BiYpelsPerMeter;
|
LONG BiYpelsPerMeter;
|
DWORD BiClrUsed;
|
DWORD BiClrUsed;
|
DWORD BiClrImportant;
|
DWORD BiClrImportant;
|
} BMPHEAD;
|
} BMPHEAD;
|
#pragma pack()
|
#pragma pack()
|
# 372 "devopen.c"
|
# 372 "devopen.c"
|
static void
|
static void
|
putsw(unsigned long dw, FILE *ofp)
|
putsw(unsigned long dw, FILE *ofp)
|
{
|
{
|
|
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
dw >>= 8;
|
dw >>= 8;
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
}
|
}
|
|
|
static void
|
static void
|
putdw(unsigned long dw, FILE *ofp)
|
putdw(unsigned long dw, FILE *ofp)
|
{
|
{
|
|
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
dw >>= 8;
|
dw >>= 8;
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
dw >>= 8;
|
dw >>= 8;
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
dw >>= 8;
|
dw >>= 8;
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc(((unsigned char)dw), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = ((unsigned char)dw)) );
|
}
|
}
|
|
|
|
|
|
|
int
|
int
|
GdCaptureScreen(char *path)
|
GdCaptureScreen(char *path)
|
{
|
{
|
|
|
int ifd, i, j;
|
int ifd, i, j;
|
FILE * ofp;
|
FILE * ofp;
|
int cx, cy, extra, bpp, bytespp, ncolors, sizecolortable;
|
int cx, cy, extra, bpp, bytespp, ncolors, sizecolortable;
|
unsigned long rmask, gmask, bmask;
|
unsigned long rmask, gmask, bmask;
|
unsigned char *cptr;
|
unsigned char *cptr;
|
unsigned short *sptr;
|
unsigned short *sptr;
|
unsigned long *lptr;
|
unsigned long *lptr;
|
BMPHEAD bmp;
|
BMPHEAD bmp;
|
unsigned char buf[2048*4];
|
unsigned char buf[2048*4];
|
|
|
ofp = fopen(path, "wb");
|
ofp = fopen(path, "wb");
|
if (!ofp)
|
if (!ofp)
|
return 1;
|
return 1;
|
ifd = open("/dev/fb0", 0);
|
ifd = open("/dev/fb0", 0);
|
|
|
cx = scrdev.xvirtres;
|
cx = scrdev.xvirtres;
|
cy = scrdev.yvirtres;
|
cy = scrdev.yvirtres;
|
bpp = scrdev.bpp;
|
bpp = scrdev.bpp;
|
bytespp = (bpp+7)/8;
|
bytespp = (bpp+7)/8;
|
|
|
|
|
extra = (cx*bytespp) & 3;
|
extra = (cx*bytespp) & 3;
|
if (extra)
|
if (extra)
|
extra = 4 - extra;
|
extra = 4 - extra;
|
ncolors = (bpp <= 8)? (1<
|
ncolors = (bpp <= 8)? (1<
|
|
|
sizecolortable = ncolors? ncolors*4: 3*4;
|
sizecolortable = ncolors? ncolors*4: 3*4;
|
if (bpp == 24)
|
if (bpp == 24)
|
sizecolortable = 0;
|
sizecolortable = 0;
|
|
|
|
|
memset(&bmp, 0, sizeof(bmp));
|
memset(&bmp, 0, sizeof(bmp));
|
bmp.bfType[0] = 'B';
|
bmp.bfType[0] = 'B';
|
bmp.bfType[1] = 'M';
|
bmp.bfType[1] = 'M';
|
bmp.bfSize = (__extension__ ({ unsigned int __bsx = (sizeof(bmp) + sizecolortable + (long)(cx+extra)*cy*bytespp); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.bfSize = (__extension__ ({ unsigned int __bsx = (sizeof(bmp) + sizecolortable + (long)(cx+extra)*cy*bytespp); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.bfOffBits = (__extension__ ({ unsigned int __bsx = (sizeof(bmp) + sizecolortable); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.bfOffBits = (__extension__ ({ unsigned int __bsx = (sizeof(bmp) + sizecolortable); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiSize = (__extension__ ({ unsigned int __bsx = (40); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiSize = (__extension__ ({ unsigned int __bsx = (40); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiWidth = (__extension__ ({ unsigned int __bsx = (cx); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiWidth = (__extension__ ({ unsigned int __bsx = (cx); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiHeight = (__extension__ ({ unsigned int __bsx = (cy); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiHeight = (__extension__ ({ unsigned int __bsx = (cy); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiPlanes = (__extension__ ({ unsigned short int __bsx = (1); ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }));
|
bmp.BiPlanes = (__extension__ ({ unsigned short int __bsx = (1); ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }));
|
bmp.BiBitCount = (__extension__ ({ unsigned short int __bsx = (bpp); ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }));
|
bmp.BiBitCount = (__extension__ ({ unsigned short int __bsx = (bpp); ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }));
|
bmp.BiCompression = (__extension__ ({ unsigned int __bsx = ((bpp==16 || bpp==32)? 3L: 0L); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiCompression = (__extension__ ({ unsigned int __bsx = ((bpp==16 || bpp==32)? 3L: 0L); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiSizeImage = (__extension__ ({ unsigned int __bsx = ((long)(cx+extra)*cy*bytespp); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiSizeImage = (__extension__ ({ unsigned int __bsx = ((long)(cx+extra)*cy*bytespp); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiClrUsed = (__extension__ ({ unsigned int __bsx = ((bpp <= 8)? ncolors: 0); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
bmp.BiClrUsed = (__extension__ ({ unsigned int __bsx = ((bpp <= 8)? ncolors: 0); ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }));
|
|
|
|
|
|
|
fwrite(&bmp, sizeof(bmp), 1, ofp);
|
fwrite(&bmp, sizeof(bmp), 1, ofp);
|
|
|
|
|
if (sizecolortable) {
|
if (sizecolortable) {
|
if(bpp <= 8) {
|
if(bpp <= 8) {
|
|
|
for(i=0; i
|
for(i=0; i
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((gr_palette[i].b), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (gr_palette[i].b)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((gr_palette[i].b), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (gr_palette[i].b)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((gr_palette[i].g), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (gr_palette[i].g)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((gr_palette[i].g), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (gr_palette[i].g)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((gr_palette[i].r), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (gr_palette[i].r)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((gr_palette[i].r), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (gr_palette[i].r)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((0), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (0)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((0), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (0)) );
|
}
|
}
|
} else {
|
} else {
|
|
|
switch (gr_pixtype) {
|
switch (gr_pixtype) {
|
case 3:
|
case 3:
|
default:
|
default:
|
rmask = 0xff0000;
|
rmask = 0xff0000;
|
gmask = 0x00ff00;
|
gmask = 0x00ff00;
|
bmask = 0x0000ff;
|
bmask = 0x0000ff;
|
break;
|
break;
|
case 5:
|
case 5:
|
rmask = 0xf800;
|
rmask = 0xf800;
|
gmask = 0x07e0;
|
gmask = 0x07e0;
|
bmask = 0x001f;
|
bmask = 0x001f;
|
break;
|
break;
|
case 6:
|
case 6:
|
rmask = 0x7c00;
|
rmask = 0x7c00;
|
gmask = 0x03e0;
|
gmask = 0x03e0;
|
bmask = 0x001f;
|
bmask = 0x001f;
|
break;
|
break;
|
case 7:
|
case 7:
|
rmask = 0xe0;
|
rmask = 0xe0;
|
gmask = 0x1c;
|
gmask = 0x1c;
|
bmask = 0x03;
|
bmask = 0x03;
|
break;
|
break;
|
}
|
}
|
putdw(rmask, ofp);
|
putdw(rmask, ofp);
|
putdw(gmask, ofp);
|
putdw(gmask, ofp);
|
putdw(bmask, ofp);
|
putdw(bmask, ofp);
|
}
|
}
|
}
|
}
|
|
|
|
|
for(i=cy-1; i>=0; --i) {
|
for(i=cy-1; i>=0; --i) {
|
long base = sizeof(bmp) + sizecolortable + (long)i*cx*bytespp;
|
long base = sizeof(bmp) + sizecolortable + (long)i*cx*bytespp;
|
fseek(ofp, base, 0);
|
fseek(ofp, base, 0);
|
read(ifd, buf, cx*bytespp);
|
read(ifd, buf, cx*bytespp);
|
switch (bpp) {
|
switch (bpp) {
|
case 32:
|
case 32:
|
lptr = (unsigned long *)buf;
|
lptr = (unsigned long *)buf;
|
for(j=0; j
|
for(j=0; j
|
putdw(*lptr++, ofp);
|
putdw(*lptr++, ofp);
|
break;
|
break;
|
case 24:
|
case 24:
|
cptr = (unsigned char *)buf;
|
cptr = (unsigned char *)buf;
|
for(j=0; j
|
for(j=0; j
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((*cptr++), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (*cptr++)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((*cptr++), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (*cptr++)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((*cptr++), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (*cptr++)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((*cptr++), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (*cptr++)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((*cptr++), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (*cptr++)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((*cptr++), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (*cptr++)) );
|
}
|
}
|
break;
|
break;
|
case 16:
|
case 16:
|
sptr = (unsigned short *)buf;
|
sptr = (unsigned short *)buf;
|
for(j=0; j
|
for(j=0; j
|
putsw(*sptr++, ofp);
|
putsw(*sptr++, ofp);
|
break;
|
break;
|
default:
|
default:
|
cptr = (unsigned char *)buf;
|
cptr = (unsigned char *)buf;
|
for(j=0; j
|
for(j=0; j
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((*cptr++), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (*cptr++)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((*cptr++), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (*cptr++)) );
|
break;
|
break;
|
}
|
}
|
for(j=0; j
|
for(j=0; j
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((0), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (0)) );
|
(((ofp)->bufpos >= (ofp)->bufwrite) ? fputc((0), (ofp)) : (unsigned char) (*(ofp)->bufpos++ = (0)) );
|
}
|
}
|
|
|
fclose(ofp);
|
fclose(ofp);
|
close(ifd);
|
close(ifd);
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|