This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug Report for GCC 2.96
- To: bug-gcc at gnu dot org
- Subject: Bug Report for GCC 2.96
- From: Prasad <prasad_s at gdit dot iiit dot net>
- Date: Fri, 10 Nov 2000 04:37:36 +0530 (IST)
Version of GCC: 2.96 20000731
System Type : i386-redhat-linux
Command Given : g++ -c server.cpp -I/usr/local/qt-2.2.1/include -I.
Error Message : Attached - Error.txt
.ii File : Attached - server.ii
--
Prasad <prasad@cutetux.org>
<prasad_s@gdit.iiit.net>
99094, IIIT-Hyderabad, India.
In file included from serverthread.h:7,
from server.h:6,
from server.cpp:2:
user.h:10: syntax error before `*'
user.h:12: type specifier omitted for parameter
user.h:12: parse error before `*'
user.h:14: ISO C++ forbids declaration of `QThread' with no type
user.h:14: `QThread' declared as an `inline' field
user.h:14: parse error before `*'
In file included from server.h:6,
from server.cpp:2:
serverthread.h:9: parse error before `{'
serverthread.h:19: parse error before `public'
serverthread.h:21: virtual outside class declaration
serverthread.h:25: parse error before `}'
server.cpp:4: ISO C++ forbids defining types within return type
server.cpp:4: return type specification for constructor invalid
server.cpp: In method `void chatServer::acceptConnections ()':
server.cpp:14: return-statement with a value, in function declared with
a void return type
server.cpp:15: parse error before `='
server.cpp:17: return-statement with a value, in function declared with
a void return type
server.cpp:18: Internal error #122.
server.cpp:18: Internal compiler error in finish_function, at
../gcc/cp/decl.c:14422
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [server.o] Error 1
# 1 "server.cpp"
# 5 "server.h" 1
# 6 "sock.h" 1
# 28 "/usr/include/stdio.h" 1 3
# 283 "/usr/include/features.h" 1 3
# 311 "/usr/include/features.h" 3
# 28 "/usr/include/stdio.h" 2 3
extern "C" {
# 199 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h" 1 3
typedef unsigned int size_t;
# 34 "/usr/include/stdio.h" 2 3
# 43 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h" 1 3
typedef __builtin_va_list __gnuc_va_list;
# 39 "/usr/include/stdio.h" 2 3
# 30 "/usr/include/bits/types.h" 1 3
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
# 49 "/usr/include/bits/types.h" 3
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
typedef __quad_t *__qaddr_t;
typedef __u_quad_t __dev_t;
typedef __u_int __uid_t;
typedef __u_int __gid_t;
typedef __u_long __ino_t;
typedef __u_int __mode_t;
typedef __u_int __nlink_t;
typedef long int __off_t;
typedef __quad_t __loff_t;
typedef int __pid_t;
typedef int __ssize_t;
typedef __u_long __rlim_t;
typedef __u_quad_t __rlim64_t;
typedef __u_int __id_t;
typedef struct
{
int __val[2];
} __fsid_t;
typedef int __daddr_t;
typedef char *__caddr_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef long int __swblk_t;
typedef long int __clock_t;
typedef int __clockid_t;
typedef int __timer_t;
typedef unsigned long int __fd_mask;
# 109 "/usr/include/bits/types.h" 3
typedef struct
{
__fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
} __fd_set;
typedef int __key_t;
typedef unsigned short int __ipc_pid_t;
typedef long int __blksize_t;
typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;
typedef __u_long __fsblkcnt_t;
typedef __u_quad_t __fsblkcnt64_t;
typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;
typedef __u_quad_t __ino64_t;
typedef __loff_t __off64_t;
typedef long int __t_scalar_t;
typedef unsigned long int __t_uscalar_t;
typedef int __intptr_t;
typedef unsigned int __socklen_t;
# 24 "/usr/include/bits/pthreadtypes.h" 1 3
# 68 "/usr/include/bits/sched.h" 1 3
struct __sched_param
{
int sched_priority;
};
# 24 "/usr/include/bits/pthreadtypes.h" 2 3
struct _pthread_fastlock
{
long int __status;
int __spinlock;
};
typedef struct _pthread_descr_struct *_pthread_descr;
typedef struct
{
int __detachstate;
int __schedpolicy;
struct __sched_param __schedparam;
int __inheritsched;
int __scope;
size_t __guardsize;
int __stackaddr_set;
void *__stackaddr;
size_t __stacksize;
} pthread_attr_t;
typedef struct
{
struct _pthread_fastlock __c_lock;
_pthread_descr __c_waiting;
} pthread_cond_t;
typedef struct
{
int __dummy;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef struct
{
int __m_reserved;
int __m_count;
_pthread_descr __m_owner;
int __m_kind;
struct _pthread_fastlock __m_lock;
} pthread_mutex_t;
typedef struct
{
int __mutexkind;
} pthread_mutexattr_t;
typedef int pthread_once_t;
# 140 "/usr/include/bits/pthreadtypes.h" 3
typedef unsigned long int pthread_t;
# 166 "/usr/include/bits/types.h" 2 3
# 41 "/usr/include/stdio.h" 2 3
typedef struct _IO_FILE FILE;
# 58 "/usr/include/stdio.h" 3
# 31 "/usr/include/libio.h" 1 3
# 15 "/usr/include/_G_config.h" 1 3
# 312 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h" 1 3
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3
# 25 "/usr/include/_G_config.h" 3
# 46 "/usr/include/wchar.h" 1 3
# 62 "/usr/include/wchar.h" 3
typedef struct
{
int __count;
union
{
wint_t __wch;
char __wchb[4];
} __value;
} __mbstate_t;
# 25 "/usr/include/_G_config.h" 2 3
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
# 45 "/usr/include/_G_config.h" 3
# 29 "/usr/include/gconv.h" 1 3
# 46 "/usr/include/wchar.h" 1 3
# 29 "/usr/include/gconv.h" 2 3
enum
{
__GCONV_OK = 0,
__GCONV_NOCONV,
__GCONV_NODB,
__GCONV_NOMEM,
__GCONV_EMPTY_INPUT,
__GCONV_FULL_OUTPUT,
__GCONV_ILLEGAL_INPUT,
__GCONV_INCOMPLETE_INPUT,
__GCONV_ILLEGAL_DESCRIPTOR,
__GCONV_INTERNAL_ERROR
};
enum
{
__GCONV_IS_LAST = 0x0001,
__GCONV_IGNORE_ERRORS = 0x0002
};
struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
struct __gconv_trans_data;
typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
__const unsigned char **, __const unsigned char *,
unsigned char **, size_t *, int, int);
typedef int (*__gconv_init_fct) (struct __gconv_step *);
typedef void (*__gconv_end_fct) (struct __gconv_step *);
typedef int (*__gconv_trans_fct) (struct __gconv_step *,
struct __gconv_step_data *, void *,
__const unsigned char *,
__const unsigned char **,
__const unsigned char *, unsigned char **,
size_t *);
typedef int (*__gconv_trans_context_fct) (struct __gconv_trans_data *,
__const unsigned char *,
__const unsigned char *,
unsigned char *, unsigned char *);
typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
size_t *);
typedef int (*__gconv_trans_init_fct) (void **, const char *);
typedef void (*__gconv_trans_end_fct) (void *);
struct __gconv_trans_data
{
__gconv_trans_fct __trans_fct;
__gconv_trans_context_fct __trans_context_fct;
__gconv_trans_end_fct __trans_end_fct;
void *__data;
struct __gconv_trans_data *__next;
};
struct __gconv_step
{
struct __gconv_loaded_object *__shlib_handle;
__const char *__modname;
int __counter;
__const char *__from_name;
__const char *__to_name;
__gconv_fct __fct;
__gconv_init_fct __init_fct;
__gconv_end_fct __end_fct;
int __min_needed_from;
int __max_needed_from;
int __min_needed_to;
int __max_needed_to;
int __stateful;
void *__data;
};
struct __gconv_step_data
{
unsigned char *__outbuf;
unsigned char *__outbufend;
int __flags;
int __invocation_counter;
int __internal_use;
__mbstate_t *__statep;
__mbstate_t __state;
struct __gconv_trans_data *__trans;
};
typedef struct __gconv_info
{
size_t __nsteps;
struct __gconv_step *__steps;
__extension__ struct __gconv_step_data __data[0];
} *__gconv_t;
# 45 "/usr/include/_G_config.h" 2 3
typedef union
{
struct __gconv_info __cd;
struct
{
struct __gconv_info __cd;
struct __gconv_step_data __data;
} __combined;
} _G_iconv_t;
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 31 "/usr/include/libio.h" 2 3
# 52 "/usr/include/libio.h" 3
# 157 "/usr/include/libio.h" 3
struct _IO_jump_t; struct _IO_FILE;
typedef void _IO_lock_t;
struct _IO_marker {
struct _IO_marker *_next;
struct _IO_FILE *_sbuf;
int _pos;
# 190 "/usr/include/libio.h" 3
};
enum __codecvt_result
{
__codecvt_ok,
__codecvt_partial,
__codecvt_error,
__codecvt_noconv
};
# 262 "/usr/include/libio.h" 3
struct _IO_FILE {
int _flags;
char* _IO_read_ptr;
char* _IO_read_end;
char* _IO_read_base;
char* _IO_write_base;
char* _IO_write_ptr;
char* _IO_write_end;
char* _IO_buf_base;
char* _IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _blksize;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
# 306 "/usr/include/libio.h" 3
__off64_t _offset;
void *__pad1;
void *__pad2;
int _mode;
char _unused2[15 * sizeof (int) - 2 * sizeof (void *)];
};
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 345 "/usr/include/libio.h" 3
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
size_t __n);
typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
typedef int __io_close_fn (void *__cookie);
# 394 "/usr/include/libio.h" 3
extern "C" {
extern int __underflow (_IO_FILE *) throw ();
extern int __uflow (_IO_FILE *) throw ();
extern int __overflow (_IO_FILE *, int) throw ();
extern wint_t __wunderflow (_IO_FILE *) throw ();
extern wint_t __wuflow (_IO_FILE *) throw ();
extern wint_t __woverflow (_IO_FILE *, wint_t) throw ();
# 427 "/usr/include/libio.h" 3
extern int _IO_getc (_IO_FILE *__fp) throw ();
extern int _IO_putc (int __c, _IO_FILE *__fp) throw ();
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();
extern int _IO_peekc_locked (_IO_FILE *__fp) throw ();
extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 453 "/usr/include/libio.h" 3
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
__gnuc_va_list, int *__restrict) throw ();
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
__gnuc_va_list) throw ();
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw ();
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw ();
extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw ();
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw ();
extern void _IO_free_backup_area (_IO_FILE *) throw ();
# 495 "/usr/include/libio.h" 3
}
# 58 "/usr/include/stdio.h" 2 3
typedef _G_fpos_t fpos_t;
# 111 "/usr/include/stdio.h" 3
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
extern int remove (__const char *__filename) throw ();
extern int rename (__const char *__old, __const char *__new) throw ();
extern FILE *tmpfile (void) throw ();
# 142 "/usr/include/stdio.h" 3
extern char *tmpnam (char *__s) throw ();
extern char *tmpnam_r (char *__s) throw ();
# 159 "/usr/include/stdio.h" 3
extern char *tempnam (__const char *__dir, __const char *__pfx)
throw () __attribute__ ((__malloc__));
extern int fclose (FILE *__stream) throw ();
extern int fflush (FILE *__stream) throw ();
extern int fflush_unlocked (FILE *__stream) throw ();
# 182 "/usr/include/stdio.h" 3
extern FILE *fopen (__const char *__restrict __filename,
__const char *__restrict __modes) throw ();
extern FILE *freopen (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) throw ();
# 212 "/usr/include/stdio.h" 3
extern FILE *fdopen (int __fd, __const char *__modes) throw ();
# 235 "/usr/include/stdio.h" 3
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) throw ();
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
size_t __size) throw ();
extern void setlinebuf (FILE *__stream) throw ();
extern int fprintf (FILE *__restrict __stream,
__const char *__restrict __format, ...) throw ();
extern int printf (__const char *__restrict __format, ...) throw ();
extern int sprintf (char *__restrict __s,
__const char *__restrict __format, ...) throw ();
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg) throw ();
extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg)
throw ();
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg) throw ();
extern int snprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 3, 4)));
extern int __vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 3, 0)));
# 309 "/usr/include/stdio.h" 3
extern int fscanf (FILE *__restrict __stream,
__const char *__restrict __format, ...) throw ();
extern int scanf (__const char *__restrict __format, ...) throw ();
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) throw ();
# 335 "/usr/include/stdio.h" 3
extern int fgetc (FILE *__stream) throw ();
extern int getc (FILE *__stream) throw ();
extern int getchar (void) throw ();
extern int getc_unlocked (FILE *__stream) throw ();
extern int getchar_unlocked (void) throw ();
extern int fgetc_unlocked (FILE *__stream) throw ();
extern int fputc (int __c, FILE *__stream) throw ();
extern int putc (int __c, FILE *__stream) throw ();
extern int putchar (int __c) throw ();
extern int fputc_unlocked (int __c, FILE *__stream) throw ();
extern int putc_unlocked (int __c, FILE *__stream) throw ();
extern int putchar_unlocked (int __c) throw ();
extern int getw (FILE *__stream) throw ();
extern int putw (int __w, FILE *__stream) throw ();
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
throw ();
# 401 "/usr/include/stdio.h" 3
extern char *gets (char *__s) throw ();
# 425 "/usr/include/stdio.h" 3
extern int fputs (__const char *__restrict __s, FILE *__restrict __stream)
throw ();
extern int puts (__const char *__s) throw ();
extern int ungetc (int __c, FILE *__stream) throw ();
extern size_t fread (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s) throw ();
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) throw ();
extern int fseek (FILE *__stream, long int __off, int __whence) throw ();
extern long int ftell (FILE *__stream) throw ();
extern void rewind (FILE *__stream) throw ();
typedef __off_t off_t;
# 495 "/usr/include/stdio.h" 3
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
throw ();
extern int fsetpos (FILE *__stream, __const fpos_t *__pos) throw ();
# 531 "/usr/include/stdio.h" 3
extern void clearerr (FILE *__stream) throw ();
extern int feof (FILE *__stream) throw ();
extern int ferror (FILE *__stream) throw ();
extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw ();
extern int ferror_unlocked (FILE *__stream) throw ();
extern void perror (__const char *__s) throw ();
extern int sys_nerr;
extern __const char *__const sys_errlist[];
# 562 "/usr/include/stdio.h" 3
extern int fileno (FILE *__stream) throw ();
extern int fileno_unlocked (FILE *__stream) throw ();
extern FILE *popen (__const char *__command, __const char *__modes) throw ();
extern int pclose (FILE *__stream) throw ();
extern char *ctermid (char *__s) throw ();
# 609 "/usr/include/stdio.h" 3
extern void flockfile (FILE *__stream) throw ();
extern int ftrylockfile (FILE *__stream) throw ();
extern void funlockfile (FILE *__stream) throw ();
# 633 "/usr/include/stdio.h" 3
}
# 6 "sock.h" 2
# 28 "/usr/include/sys/types.h" 1 3
extern "C" {
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
# 58 "/usr/include/sys/types.h" 3
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
# 96 "/usr/include/sys/types.h" 3
typedef __pid_t pid_t;
typedef __id_t id_t;
typedef __ssize_t ssize_t;
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
# 127 "/usr/include/sys/types.h" 3
# 71 "/usr/include/time.h" 1 3
typedef __time_t time_t;
# 82 "/usr/include/time.h" 3
typedef __clockid_t clockid_t;
# 93 "/usr/include/time.h" 3
typedef __timer_t timer_t;
# 127 "/usr/include/sys/types.h" 2 3
# 141 "/usr/include/sys/types.h" 3
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 184 "/usr/include/sys/types.h" 3
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
typedef int register_t __attribute__ ((__mode__ (__word__)));
# 38 "/usr/include/endian.h" 1 3
# 207 "/usr/include/sys/types.h" 2 3
# 32 "/usr/include/sys/select.h" 1 3
# 23 "/usr/include/bits/sigset.h" 1 3
typedef int __sig_atomic_t;
typedef struct
{
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3
# 105 "/usr/include/time.h" 1 3
struct timespec
{
long int tv_sec;
long int tv_nsec;
};
# 39 "/usr/include/sys/select.h" 2 3
extern "C" {
struct timeval;
typedef __fd_mask fd_mask;
typedef __fd_set fd_set;
# 74 "/usr/include/sys/select.h" 3
extern int select (int __nfds, __fd_set *__restrict __readfds,
__fd_set *__restrict __writefds,
__fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout) throw ();
# 92 "/usr/include/sys/select.h" 3
}
# 210 "/usr/include/sys/types.h" 2 3
# 224 "/usr/include/sys/types.h" 3
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
# 256 "/usr/include/sys/types.h" 3
}
# 7 "sock.h" 2
# 25 "/usr/include/sys/socket.h" 1 3
extern "C" {
# 30 "/usr/include/bits/socket.h" 1 3
# 12 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/limits.h" 1 3
# 8 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/syslimits.h" 1 3
# 131 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/limits.h" 1 3
# 31 "/usr/include/limits.h" 1 3
# 127 "/usr/include/bits/posix1_lim.h" 1 3
# 37 "/usr/include/bits/local_lim.h" 1 3
# 127 "/usr/include/bits/posix1_lim.h" 2 3
# 31 "/usr/include/limits.h" 2 3
# 131 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/limits.h" 2 3
# 8 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/syslimits.h" 2 3
# 12 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/limits.h" 2 3
# 32 "/usr/include/bits/socket.h" 2 3
typedef __socklen_t socklen_t;
enum __socket_type
{
SOCK_STREAM = 1,
SOCK_DGRAM = 2,
SOCK_RAW = 3,
SOCK_RDM = 4,
SOCK_SEQPACKET = 5,
SOCK_PACKET = 10
};
# 139 "/usr/include/bits/socket.h" 3
# 29 "/usr/include/bits/sockaddr.h" 1 3
typedef unsigned short int sa_family_t;
extern int __libc_sa_len (sa_family_t __af) throw ();
# 139 "/usr/include/bits/socket.h" 2 3
struct sockaddr
{
sa_family_t sa_family;
char sa_data[14];
};
# 158 "/usr/include/bits/socket.h" 3
struct sockaddr_storage
{
sa_family_t __ss_family;
__uint32_t __ss_align;
char __ss_padding[(128 - (2 * sizeof (__uint32_t)))];
};
enum
{
MSG_OOB = 0x01,
MSG_PEEK = 0x02,
MSG_DONTROUTE = 0x04,
MSG_CTRUNC = 0x08,
MSG_PROXY = 0x10,
MSG_TRUNC = 0x20,
MSG_DONTWAIT = 0x40,
MSG_EOR = 0x80,
MSG_WAITALL = 0x100,
MSG_FIN = 0x200,
MSG_SYN = 0x400,
MSG_CONFIRM = 0x800,
MSG_RST = 0x1000,
MSG_ERRQUEUE = 0x2000,
MSG_NOSIGNAL = 0x4000
};
struct msghdr
{
void *msg_name;
socklen_t msg_namelen;
struct iovec *msg_iov;
size_t msg_iovlen;
void *msg_control;
size_t msg_controllen;
int msg_flags;
};
struct cmsghdr
{
size_t cmsg_len;
int cmsg_level;
int cmsg_type;
__extension__ unsigned char __cmsg_data[0];
};
# 252 "/usr/include/bits/socket.h" 3
extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
struct cmsghdr *__cmsg) throw ();
# 279 "/usr/include/bits/socket.h" 3
enum
{
SCM_RIGHTS = 0x01,
SCM_CREDENTIALS = 0x02,
__SCM_CONNECT = 0x03
};
struct ucred
{
pid_t pid;
uid_t uid;
gid_t gid;
};
# 5 "/usr/include/asm/socket.h" 1 3
# 301 "/usr/include/bits/socket.h" 2 3
struct linger
{
int l_onoff;
int l_linger;
};
# 35 "/usr/include/sys/socket.h" 2 3
struct osockaddr
{
unsigned short int sa_family;
unsigned char sa_data[14];
};
enum
{
SHUT_RD = 0,
SHUT_WR,
SHUT_RDWR
};
# 99 "/usr/include/sys/socket.h" 3
extern int socket (int __domain, int __type, int __protocol) throw ();
extern int socketpair (int __domain, int __type, int __protocol,
int __fds[2]) throw ();
extern int bind (int __fd, __const struct sockaddr * __addr, socklen_t __len)
throw ();
extern int getsockname (int __fd, struct sockaddr *__restrict __addr,
socklen_t *__restrict __len) throw ();
extern int connect (int __fd, __const struct sockaddr * __addr, socklen_t __len)
throw ();
extern int getpeername (int __fd, struct sockaddr *__restrict __addr,
socklen_t *__restrict __len) throw ();
extern int send (int __fd, __const void *__buf, size_t __n, int __flags)
throw ();
extern int recv (int __fd, void *__buf, size_t __n, int __flags)
throw ();
extern int sendto (int __fd, __const void *__buf, size_t __n,
int __flags, __const struct sockaddr * __addr,
socklen_t __addr_len) throw ();
extern int recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len)
throw ();
extern int sendmsg (int __fd, __const struct msghdr *__message, int __flags)
throw ();
extern int recvmsg (int __fd, struct msghdr *__message, int __flags)
throw ();
extern int getsockopt (int __fd, int __level, int __optname,
void *__restrict __optval,
socklen_t *__restrict __optlen) throw ();
extern int setsockopt (int __fd, int __level, int __optname,
__const void *__optval, socklen_t __optlen) throw ();
extern int listen (int __fd, unsigned int __n) throw ();
extern int accept (int __fd, struct sockaddr *__restrict __addr,
socklen_t *__restrict __addr_len)
throw ();
extern int shutdown (int __fd, int __how) throw ();
extern int isfdtype (int __fd, int __fdtype) throw ();
}
# 8 "sock.h" 2
# 31 "/usr/include/netdb.h" 1 3
# 43 "/usr/include/rpc/netdb.h" 1 3
extern "C" {
struct rpcent
{
char *r_name;
char **r_aliases;
int r_number;
};
extern void setrpcent (int __stayopen) throw ();
extern void endrpcent (void) throw ();
extern struct rpcent *getrpcbyname (__const char *__name) throw ();
extern struct rpcent *getrpcbynumber (int __number) throw ();
extern struct rpcent *getrpcent (void) throw ();
extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf,
char *__buffer, size_t __buflen,
struct rpcent **__result) throw ();
extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf,
char *__buffer, size_t __buflen,
struct rpcent **__result) throw ();
extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer,
size_t __buflen, struct rpcent **__result) throw ();
}
# 31 "/usr/include/netdb.h" 2 3
typedef unsigned int uint32_t;
# 27 "/usr/include/bits/netdb.h" 1 3
struct netent
{
char *n_name;
char **n_aliases;
int n_addrtype;
uint32_t n_net;
};
# 41 "/usr/include/netdb.h" 2 3
# 51 "/usr/include/netdb.h" 3
extern "C" {
extern int h_errno;
extern int *__h_errno_location (void) throw () __attribute__ ((__const__));
# 97 "/usr/include/netdb.h" 3
extern void herror (__const char *__str) throw ();
extern __const char *hstrerror (int __err_num) throw ();
struct hostent
{
char *h_name;
char **h_aliases;
int h_addrtype;
socklen_t h_length;
char **h_addr_list;
};
extern void sethostent (int __stay_open) throw ();
extern void endhostent (void) throw ();
extern struct hostent *gethostent (void) throw ();
extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len,
int __type) throw ();
extern struct hostent *gethostbyname (__const char *__name) throw ();
extern struct hostent *gethostbyname2 (__const char *__name, int __af) throw ();
extern int gethostent_r (struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct hostent **__restrict __result,
int *__restrict __h_errnop) throw ();
extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len,
int __type,
struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct hostent **__restrict __result,
int *__restrict __h_errnop) throw ();
extern int gethostbyname_r (__const char *__restrict __name,
struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct hostent **__restrict __result,
int *__restrict __h_errnop) throw ();
extern int gethostbyname2_r (__const char *__restrict __name, int __af,
struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct hostent **__restrict __result,
int *__restrict __h_errnop) throw ();
extern void setnetent (int __stay_open) throw ();
extern void endnetent (void) throw ();
extern struct netent *getnetent (void) throw ();
extern struct netent *getnetbyaddr (uint32_t __net, int __type)
throw ();
extern struct netent *getnetbyname (__const char *__name) throw ();
extern int getnetent_r (struct netent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct netent **__restrict __result,
int *__restrict __h_errnop) throw ();
extern int getnetbyaddr_r (uint32_t __net, int __type,
struct netent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct netent **__restrict __result,
int *__restrict __h_errnop) throw ();
extern int getnetbyname_r (__const char *__restrict __name,
struct netent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct netent **__restrict __result,
int *__restrict __h_errnop) throw ();
struct servent
{
char *s_name;
char **s_aliases;
int s_port;
char *s_proto;
};
extern void setservent (int __stay_open) throw ();
extern void endservent (void) throw ();
extern struct servent *getservent (void) throw ();
extern struct servent *getservbyname (__const char *__name,
__const char *__proto) throw ();
extern struct servent *getservbyport (int __port, __const char *__proto)
throw ();
extern int getservent_r (struct servent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct servent **__restrict __result) throw ();
extern int getservbyname_r (__const char *__restrict __name,
__const char *__restrict __proto,
struct servent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct servent **__restrict __result) throw ();
extern int getservbyport_r (int __port, __const char *__restrict __proto,
struct servent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct servent **__restrict __result) throw ();
struct protoent
{
char *p_name;
char **p_aliases;
int p_proto;
};
extern void setprotoent (int __stay_open) throw ();
extern void endprotoent (void) throw ();
extern struct protoent *getprotoent (void) throw ();
extern struct protoent *getprotobyname (__const char *__name) throw ();
extern struct protoent *getprotobynumber (int __proto) throw ();
extern int getprotoent_r (struct protoent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct protoent **__restrict __result) throw ();
extern int getprotobyname_r (__const char *__restrict __name,
struct protoent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct protoent **__restrict __result) throw ();
extern int getprotobynumber_r (int __proto,
struct protoent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct protoent **__restrict __result) throw ();
extern int setnetgrent (__const char *__netgroup) throw ();
extern void endnetgrent (void) throw ();
extern int getnetgrent (char **__restrict __hostp,
char **__restrict __userp,
char **__restrict __domainp) throw ();
extern int innetgr (__const char *__netgroup, __const char *__host,
__const char *__user, __const char *domain) throw ();
extern int getnetgrent_r (char **__restrict __hostp,
char **__restrict __userp,
char **__restrict __domainp,
char *__restrict __buffer, size_t __buflen) throw ();
# 343 "/usr/include/netdb.h" 3
extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
__const char *__restrict __locuser,
__const char *__restrict __remuser,
__const char *__restrict __cmd, int *__restrict __fd2p)
throw ();
extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
__const char *__restrict __locuser,
__const char *__restrict __remuser,
__const char *__restrict __cmd, int *__restrict __fd2p,
sa_family_t __af) throw ();
extern int rexec (char **__restrict __ahost, int __rport,
__const char *__restrict __name,
__const char *__restrict __pass,
__const char *__restrict __cmd, int *__restrict __fd2p)
throw ();
extern int rexec_af (char **__restrict __ahost, int __rport,
__const char *__restrict __name,
__const char *__restrict __pass,
__const char *__restrict __cmd, int *__restrict __fd2p,
sa_family_t __af) throw ();
extern int ruserok (__const char *__rhost, int __suser,
__const char *__remuser, __const char *__locuser) throw ();
extern int ruserok_af (__const char *__rhost, int __suser,
__const char *__remuser, __const char *__locuser,
sa_family_t __af) throw ();
extern int rresvport (int *__alport) throw ();
extern int rresvport_af (int *__alport, sa_family_t __af) throw ();
struct addrinfo
{
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
socklen_t ai_addrlen;
struct sockaddr *ai_addr;
char *ai_canonname;
struct addrinfo *ai_next;
};
# 443 "/usr/include/netdb.h" 3
extern int getaddrinfo (__const char *__restrict __name,
__const char *__restrict __service,
__const struct addrinfo *__restrict __req,
struct addrinfo **__restrict __pai) throw ();
extern void freeaddrinfo (struct addrinfo *__ai) throw ();
extern char *gai_strerror (int __ecode) throw ();
extern int getnameinfo (__const struct sockaddr *__restrict __sa,
socklen_t __salen, char *__restrict __host,
socklen_t __hostlen, char *__restrict __serv,
socklen_t __servlen, int __flags) throw ();
}
# 9 "sock.h" 2
# 24 "/usr/include/netinet/in.h" 1 3
# 29 "/usr/include/stdint.h" 1 3
# 50 "/usr/include/stdint.h" 3
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
__extension__
typedef unsigned long long int uint64_t;
typedef signed char int_least8_t;
typedef short int int_least16_t;
typedef int int_least32_t;
__extension__
typedef long long int int_least64_t;
typedef unsigned char uint_least8_t;
typedef unsigned short int uint_least16_t;
typedef unsigned int uint_least32_t;
__extension__
typedef unsigned long long int uint_least64_t;
typedef signed char int_fast8_t;
typedef int int_fast16_t;
typedef int int_fast32_t;
__extension__
typedef long long int int_fast64_t;
typedef unsigned char uint_fast8_t;
typedef unsigned int uint_fast16_t;
typedef unsigned int uint_fast32_t;
__extension__
typedef unsigned long long int uint_fast64_t;
# 127 "/usr/include/stdint.h" 3
typedef int intptr_t;
typedef unsigned int uintptr_t;
# 139 "/usr/include/stdint.h" 3
__extension__
typedef long long int intmax_t;
__extension__
typedef unsigned long long int uintmax_t;
# 25 "/usr/include/netinet/in.h" 2 3
extern "C" {
enum
{
IPPROTO_IP = 0,
IPPROTO_HOPOPTS = 0,
IPPROTO_ICMP = 1,
IPPROTO_IGMP = 2,
IPPROTO_IPIP = 4,
IPPROTO_TCP = 6,
IPPROTO_EGP = 8,
IPPROTO_PUP = 12,
IPPROTO_UDP = 17,
IPPROTO_IDP = 22,
IPPROTO_TP = 29,
IPPROTO_IPV6 = 41,
IPPROTO_ROUTING = 43,
IPPROTO_FRAGMENT = 44,
IPPROTO_RSVP = 46,
IPPROTO_GRE = 47,
IPPROTO_ESP = 50,
IPPROTO_AH = 51,
IPPROTO_ICMPV6 = 58,
IPPROTO_NONE = 59,
IPPROTO_DSTOPTS = 60,
IPPROTO_MTP = 92,
IPPROTO_ENCAP = 98,
IPPROTO_PIM = 103,
IPPROTO_COMP = 108,
IPPROTO_RAW = 255,
IPPROTO_MAX
};
typedef uint16_t in_port_t;
enum
{
IPPORT_ECHO = 7,
IPPORT_DISCARD = 9,
IPPORT_SYSTAT = 11,
IPPORT_DAYTIME = 13,
IPPORT_NETSTAT = 15,
IPPORT_FTP = 21,
IPPORT_TELNET = 23,
IPPORT_SMTP = 25,
IPPORT_TIMESERVER = 37,
IPPORT_NAMESERVER = 42,
IPPORT_WHOIS = 43,
IPPORT_MTP = 57,
IPPORT_TFTP = 69,
IPPORT_RJE = 77,
IPPORT_FINGER = 79,
IPPORT_TTYLINK = 87,
IPPORT_SUPDUP = 95,
IPPORT_EXECSERVER = 512,
IPPORT_LOGINSERVER = 513,
IPPORT_CMDSERVER = 514,
IPPORT_EFSSERVER = 520,
IPPORT_BIFFUDP = 512,
IPPORT_WHOSERVER = 513,
IPPORT_ROUTESERVER = 520,
IPPORT_RESERVED = 1024,
IPPORT_USERRESERVED = 5000
};
typedef uint32_t in_addr_t;
struct in_addr
{
in_addr_t s_addr;
};
# 167 "/usr/include/netinet/in.h" 3
struct in6_addr
{
union
{
uint8_t u6_addr8[16];
uint16_t u6_addr16[8];
uint32_t u6_addr32[4];
} in6_u;
};
extern const struct in6_addr in6addr_any;
extern const struct in6_addr in6addr_loopback;
# 193 "/usr/include/netinet/in.h" 3
struct sockaddr_in
{
sa_family_t sin_family;
in_port_t sin_port;
struct in_addr sin_addr;
unsigned char sin_zero[sizeof (struct sockaddr) -
(sizeof (unsigned short int)) -
sizeof (in_port_t) -
sizeof (struct in_addr)];
};
struct sockaddr_in6
{
sa_family_t sin6_family;
in_port_t sin6_port;
uint32_t sin6_flowinfo;
struct in6_addr sin6_addr;
uint32_t sin6_scope_id;
};
struct ipv6_mreq
{
struct in6_addr ipv6mr_multiaddr;
unsigned int ipv6mr_interface;
};
# 66 "/usr/include/bits/in.h" 1 3
struct ip_opts
{
struct in_addr ip_dst;
char ip_opts[40];
};
struct ip_mreq
{
struct in_addr imr_multiaddr;
struct in_addr imr_interface;
};
struct ip_mreqn
{
struct in_addr imr_multiaddr;
struct in_addr imr_address;
int imr_ifindex;
};
struct in_pktinfo
{
int ipi_ifindex;
struct in_addr ipi_spec_dst;
struct in_addr ipi_addr;
};
# 228 "/usr/include/netinet/in.h" 2 3
# 236 "/usr/include/netinet/in.h" 3
extern uint32_t ntohl (uint32_t __netlong) throw () __attribute__ ((__const__));
extern uint16_t ntohs (uint16_t __netshort)
throw () __attribute__ ((__const__));
extern uint32_t htonl (uint32_t __hostlong)
throw () __attribute__ ((__const__));
extern uint16_t htons (uint16_t __hostshort)
throw () __attribute__ ((__const__));
# 301 "/usr/include/netinet/in.h" 3
extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) throw ();
extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
throw ();
# 324 "/usr/include/netinet/in.h" 3
struct in6_pktinfo
{
struct in6_addr ipi6_addr;
unsigned int ipi6_ifindex;
};
}
# 10 "sock.h" 2
# 26 "/usr/include/arpa/inet.h" 1 3
extern "C" {
extern in_addr_t inet_addr (__const char *__cp) throw ();
extern in_addr_t inet_lnaof (struct in_addr __in) throw ();
extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
throw ();
extern in_addr_t inet_netof (struct in_addr __in) throw ();
extern in_addr_t inet_network (__const char *__cp) throw ();
extern char *inet_ntoa (struct in_addr __in) throw ();
extern int inet_pton (int __af, __const char *__restrict __cp,
void *__restrict __buf) throw ();
extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
char *__restrict __buf, socklen_t __len)
throw ();
extern in_addr_t inet_aton (__const char *__cp, struct in_addr *__inp) throw ();
extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) throw ();
extern char *inet_net_ntop (int __af, __const void *__cp, int __bits,
char *__buf, size_t __len) throw ();
extern int inet_net_pton (int __af, __const char *__cp,
void *__buf, size_t __len) throw ();
extern unsigned int inet_nsap_addr (__const char *__cp,
unsigned char *__buf, int __len) throw ();
extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp,
char *__buf) throw ();
}
# 11 "sock.h" 2
# 28 "/usr/include/string.h" 1 3
extern "C" {
extern void *memcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n) throw ();
extern void *memmove (void *__dest, __const void *__src, size_t __n)
throw ();
extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
int __c, size_t __n)
throw ();
extern void *memset (void *__s, int __c, size_t __n) throw ();
extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern void *memchr (__const void *__s, int __c, size_t __n)
throw () __attribute__ ((__pure__));
# 77 "/usr/include/string.h" 3
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
throw ();
extern char *strncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n) throw ();
extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
throw ();
extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
size_t __n) throw ();
extern int strcmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__));
extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern int strcoll (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__));
extern size_t strxfrm (char *__restrict __dest,
__const char *__restrict __src, size_t __n) throw ();
# 120 "/usr/include/string.h" 3
extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__));
# 155 "/usr/include/string.h" 3
extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__));
extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__));
# 167 "/usr/include/string.h" 3
extern size_t strcspn (__const char *__s, __const char *__reject)
throw () __attribute__ ((__pure__));
extern size_t strspn (__const char *__s, __const char *__accept)
throw () __attribute__ ((__pure__));
extern char *strpbrk (__const char *__s, __const char *__accept)
throw () __attribute__ ((__pure__));
extern char *strstr (__const char *__haystack, __const char *__needle)
throw () __attribute__ ((__pure__));
# 189 "/usr/include/string.h" 3
extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
throw ();
extern char *__strtok_r (char *__restrict __s,
__const char *__restrict __delim,
char **__restrict __save_ptr) throw ();
extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
char **__restrict __save_ptr) throw ();
# 220 "/usr/include/string.h" 3
extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__));
# 231 "/usr/include/string.h" 3
extern char *strerror (int __errnum) throw ();
extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();
extern void __bzero (void *__s, size_t __n) throw ();
extern void bcopy (__const void *__src, void *__dest, size_t __n) throw ();
extern void bzero (void *__s, size_t __n) throw ();
extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__));
extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__));
extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__));
extern int __ffs (int __i) throw () __attribute__ ((const));
extern int ffs (int __i) throw () __attribute__ ((const));
# 276 "/usr/include/string.h" 3
extern int __strcasecmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__));
extern int strcasecmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__));
extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__));
# 300 "/usr/include/string.h" 3
extern char *strsep (char **__restrict __stringp,
__const char *__restrict __delim) throw ();
# 369 "/usr/include/string.h" 3
}
# 12 "sock.h" 2
# 32 "/usr/include/errno.h" 1 3
extern "C" {
# 26 "/usr/include/bits/errno.h" 1 3
# 5 "/usr/include/linux/errno.h" 1 3
# 26 "/usr/include/bits/errno.h" 2 3
# 36 "/usr/include/bits/errno.h" 3
extern int errno;
extern int *__errno_location (void) throw () __attribute__ ((__const__));
# 37 "/usr/include/errno.h" 2 3
# 59 "/usr/include/errno.h" 3
}
# 13 "sock.h" 2
# 45 "/usr/include/malloc.h" 1 3
# 147 "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h" 1 3
typedef int ptrdiff_t;
# 45 "/usr/include/malloc.h" 2 3
# 102 "/usr/include/malloc.h" 3
extern "C" {
# 111 "/usr/include/malloc.h" 3
extern int __malloc_initialized;
extern void * malloc (size_t __size) throw () __attribute__ ((__malloc__));
extern void * calloc (size_t __nmemb, size_t __size) throw ()
__attribute__ ((__malloc__));
extern void * realloc (void * __ptr,
size_t __size) throw ()
__attribute__ ((__malloc__));
extern void free (void * __ptr) throw ();
extern void cfree (void * __ptr) throw ();
extern void * memalign (size_t __alignment, size_t __size) throw ();
extern void * valloc (size_t __size) throw () __attribute__ ((__malloc__));
extern void * pvalloc (size_t __size) throw ()
__attribute__ ((__malloc__));
extern void * (*__morecore) (ptrdiff_t __size);
extern void * __default_morecore (ptrdiff_t __size) throw ()
__attribute__ ((__malloc__));
struct mallinfo {
int arena;
int ordblks;
int smblks;
int hblks;
int hblkhd;
int usmblks;
int fsmblks;
int uordblks;
int fordblks;
int keepcost;
};
extern struct mallinfo mallinfo (void) throw ();
# 195 "/usr/include/malloc.h" 3
extern int mallopt (int __param, int __val) throw ();
extern int malloc_trim (size_t __pad) throw ();
extern size_t malloc_usable_size (void * __ptr) throw ();
extern void malloc_stats (void) throw ();
extern void * malloc_get_state (void) throw ();
extern int malloc_set_state (void * __ptr) throw ();
extern void (*__malloc_initialize_hook) (void);
extern void (*__free_hook) (void * __ptr,
__const void *);
extern void * (*__malloc_hook) (size_t __size,
__const void *);
extern void * (*__realloc_hook) (void * __ptr,
size_t __size,
# 227 "/usr/include/malloc.h" 3
__const void *);
extern void * (*__memalign_hook) (size_t __size,
size_t __alignment,
# 230 "/usr/include/malloc.h" 3
__const void *);
extern void (*__after_morecore_hook) (void);
extern void __malloc_check_init (void) throw ();
};
# 14 "sock.h" 2
# 28 "/usr/include/unistd.h" 1 3
extern "C" {
# 176 "/usr/include/unistd.h" 3
# 200 "/usr/include/unistd.h" 3
# 260 "/usr/include/unistd.h" 3
extern int access (__const char *__name, int __type) throw ();
# 290 "/usr/include/unistd.h" 3
extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw ();
# 306 "/usr/include/unistd.h" 3
extern int close (int __fd) throw ();
extern ssize_t read (int __fd, void *__buf, size_t __nbytes) throw ();
extern ssize_t write (int __fd, __const void *__buf, size_t __n) throw ();
# 353 "/usr/include/unistd.h" 3
extern int pipe (int __pipedes[2]) throw ();
# 362 "/usr/include/unistd.h" 3
extern unsigned int alarm (unsigned int __seconds) throw ();
# 371 "/usr/include/unistd.h" 3
extern unsigned int sleep (unsigned int __seconds) throw ();
extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
throw ();
extern void usleep (__useconds_t __useconds) throw ();
extern int pause (void) throw ();
extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
throw ();
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw ();
extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
throw ();
extern int chdir (__const char *__path) throw ();
extern int fchdir (int __fd) throw ();
# 423 "/usr/include/unistd.h" 3
extern char *getcwd (char *__buf, size_t __size) throw ();
# 436 "/usr/include/unistd.h" 3
extern char *getwd (char *__buf) throw ();
extern int dup (int __fd) throw ();
extern int dup2 (int __fd, int __fd2) throw ();
extern char **__environ;
extern int execve (__const char *__path, char *__const __argv[],
char *__const __envp[]) throw ();
# 467 "/usr/include/unistd.h" 3
extern int execv (__const char *__path, char *__const __argv[]) throw ();
extern int execle (__const char *__path, __const char *__arg, ...) throw ();
extern int execl (__const char *__path, __const char *__arg, ...) throw ();
extern int execvp (__const char *__file, char *__const __argv[]) throw ();
extern int execlp (__const char *__file, __const char *__arg, ...) throw ();
extern int nice (int __inc) throw ();
extern void _exit (int __status) __attribute__ ((__noreturn__));
# 25 "/usr/include/bits/confname.h" 1 3
enum
{
_PC_LINK_MAX,
_PC_MAX_CANON,
_PC_MAX_INPUT,
_PC_NAME_MAX,
_PC_PATH_MAX,
_PC_PIPE_BUF,
_PC_CHOWN_RESTRICTED,
_PC_NO_TRUNC,
_PC_VDISABLE,
_PC_SYNC_IO,
_PC_ASYNC_IO,
_PC_PRIO_IO,
_PC_SOCK_MAXBUF,
_PC_FILESIZEBITS
};
enum
{
_SC_ARG_MAX,
_SC_CHILD_MAX,
_SC_CLK_TCK,
_SC_NGROUPS_MAX,
_SC_OPEN_MAX,
_SC_STREAM_MAX,
_SC_TZNAME_MAX,
_SC_JOB_CONTROL,
_SC_SAVED_IDS,
_SC_REALTIME_SIGNALS,
_SC_PRIORITY_SCHEDULING,
_SC_TIMERS,
_SC_ASYNCHRONOUS_IO,
_SC_PRIORITIZED_IO,
_SC_SYNCHRONIZED_IO,
_SC_FSYNC,
_SC_MAPPED_FILES,
_SC_MEMLOCK,
_SC_MEMLOCK_RANGE,
_SC_MEMORY_PROTECTION,
_SC_MESSAGE_PASSING,
_SC_SEMAPHORES,
_SC_SHARED_MEMORY_OBJECTS,
_SC_AIO_LISTIO_MAX,
_SC_AIO_MAX,
_SC_AIO_PRIO_DELTA_MAX,
_SC_DELAYTIMER_MAX,
_SC_MQ_OPEN_MAX,
_SC_MQ_PRIO_MAX,
_SC_VERSION,
_SC_PAGESIZE,
_SC_RTSIG_MAX,
_SC_SEM_NSEMS_MAX,
_SC_SEM_VALUE_MAX,
_SC_SIGQUEUE_MAX,
_SC_TIMER_MAX,
_SC_BC_BASE_MAX,
_SC_BC_DIM_MAX,
_SC_BC_SCALE_MAX,
_SC_BC_STRING_MAX,
_SC_COLL_WEIGHTS_MAX,
_SC_EQUIV_CLASS_MAX,
_SC_EXPR_NEST_MAX,
_SC_LINE_MAX,
_SC_RE_DUP_MAX,
_SC_CHARCLASS_NAME_MAX,
_SC_2_VERSION,
_SC_2_C_BIND,
_SC_2_C_DEV,
_SC_2_FORT_DEV,
_SC_2_FORT_RUN,
_SC_2_SW_DEV,
_SC_2_LOCALEDEF,
_SC_PII,
_SC_PII_XTI,
_SC_PII_SOCKET,
_SC_PII_INTERNET,
_SC_PII_OSI,
_SC_POLL,
_SC_SELECT,
_SC_UIO_MAXIOV,
_SC_PII_INTERNET_STREAM,
_SC_PII_INTERNET_DGRAM,
_SC_PII_OSI_COTS,
_SC_PII_OSI_CLTS,
_SC_PII_OSI_M,
_SC_T_IOV_MAX,
_SC_THREADS,
_SC_THREAD_SAFE_FUNCTIONS,
_SC_GETGR_R_SIZE_MAX,
_SC_GETPW_R_SIZE_MAX,
_SC_LOGIN_NAME_MAX,
_SC_TTY_NAME_MAX,
_SC_THREAD_DESTRUCTOR_ITERATIONS,
_SC_THREAD_KEYS_MAX,
_SC_THREAD_STACK_MIN,
_SC_THREAD_THREADS_MAX,
_SC_THREAD_ATTR_STACKADDR,
_SC_THREAD_ATTR_STACKSIZE,
_SC_THREAD_PRIORITY_SCHEDULING,
_SC_THREAD_PRIO_INHERIT,
_SC_THREAD_PRIO_PROTECT,
_SC_THREAD_PROCESS_SHARED,
_SC_NPROCESSORS_CONF,
_SC_NPROCESSORS_ONLN,
_SC_PHYS_PAGES,
_SC_AVPHYS_PAGES,
_SC_ATEXIT_MAX,
_SC_PASS_MAX,
_SC_XOPEN_VERSION,
_SC_XOPEN_XCU_VERSION,
_SC_XOPEN_UNIX,
_SC_XOPEN_CRYPT,
_SC_XOPEN_ENH_I18N,
_SC_XOPEN_SHM,
_SC_2_CHAR_TERM,
_SC_2_C_VERSION,
_SC_2_UPE,
_SC_XOPEN_XPG2,
_SC_XOPEN_XPG3,
_SC_XOPEN_XPG4,
_SC_CHAR_BIT,
_SC_CHAR_MAX,
_SC_CHAR_MIN,
_SC_INT_MAX,
_SC_INT_MIN,
_SC_LONG_BIT,
_SC_WORD_BIT,
_SC_MB_LEN_MAX,
_SC_NZERO,
_SC_SSIZE_MAX,
_SC_SCHAR_MAX,
_SC_SCHAR_MIN,
_SC_SHRT_MAX,
_SC_SHRT_MIN,
_SC_UCHAR_MAX,
_SC_UINT_MAX,
_SC_ULONG_MAX,
_SC_USHRT_MAX,
_SC_NL_ARGMAX,
_SC_NL_LANGMAX,
_SC_NL_MSGMAX,
_SC_NL_NMAX,
_SC_NL_SETMAX,
_SC_NL_TEXTMAX,
_SC_XBS5_ILP32_OFF32,
_SC_XBS5_ILP32_OFFBIG,
_SC_XBS5_LP64_OFF64,
_SC_XBS5_LPBIG_OFFBIG,
_SC_XOPEN_LEGACY,
_SC_XOPEN_REALTIME,
_SC_XOPEN_REALTIME_THREADS,
_SC_ADVISORY_INFO,
_SC_BARRIERS,
_SC_BASE,
_SC_C_LANG_SUPPORT,
_SC_C_LANG_SUPPORT_R,
_SC_CLOCK_SELECTION,
_SC_CPUTIME,
_SC_THREAD_CPUTIME,
_SC_DEVICE_IO,
_SC_DEVICE_SPECIFIC,
_SC_DEVICE_SPECIFIC_R,
_SC_FD_MGMT,
_SC_FIFO,
_SC_PIPE,
_SC_FILE_ATTRIBUTES,
_SC_FILE_LOCKING,
_SC_FILE_SYSTEM,
_SC_MONOTONIC_CLOCK,
_SC_MULTIPLE_PROCESS,
_SC_SINGLE_PROCESS,
_SC_NETWORKING,
_SC_READER_WRITER_LOCKS,
_SC_SPIN_LOCKS,
_SC_REGEXP,
_SC_REGEX_VERSION,
_SC_SHELL,
_SC_SIGNALS,
_SC_SPAWN,
_SC_SPORADIC_SERVER,
_SC_THREAD_SPORADIC_SERVER,
_SC_SYSTEM_DATABASE,
_SC_SYSTEM_DATABASE_R,
_SC_TIMEOUTS,
_SC_TYPED_MEMORY_OBJECTS,
_SC_USER_GROUPS,
_SC_USER_GROUPS_R,
_SC_PBS,
_SC_PBS_ACCOUNTING,
_SC_PBS_LOCATE,
_SC_PBS_MESSAGE,
_SC_PBS_TRACK,
_SC_SYMLOOP
};
enum
{
_CS_PATH
# 492 "/usr/include/bits/confname.h" 3
};
# 501 "/usr/include/unistd.h" 2 3
extern long int pathconf (__const char *__path, int __name) throw ();
extern long int fpathconf (int __fd, int __name) throw ();
extern long int sysconf (int __name) throw ();
extern size_t confstr (int __name, char *__buf, size_t __len) throw ();
extern __pid_t getpid (void) throw ();
extern __pid_t getppid (void) throw ();
extern __pid_t getpgrp (void) throw ();
# 536 "/usr/include/unistd.h" 3
extern __pid_t __getpgid (__pid_t __pid) throw ();
# 545 "/usr/include/unistd.h" 3
extern int setpgid (__pid_t __pid, __pid_t __pgid) throw ();
# 562 "/usr/include/unistd.h" 3
extern int setpgrp (void) throw ();
# 580 "/usr/include/unistd.h" 3
extern __pid_t setsid (void) throw ();
extern __uid_t getuid (void) throw ();
extern __uid_t geteuid (void) throw ();
extern __gid_t getgid (void) throw ();
extern __gid_t getegid (void) throw ();
extern int getgroups (int __size, __gid_t __list[]) throw ();
# 613 "/usr/include/unistd.h" 3
extern int setuid (__uid_t __uid) throw ();
extern int setreuid (__uid_t __ruid, __uid_t __euid) throw ();
extern int seteuid (__uid_t __uid) throw ();
extern int setgid (__gid_t __gid) throw ();
extern int setregid (__gid_t __rgid, __gid_t __egid) throw ();
extern int setegid (__gid_t __gid) throw ();
extern __pid_t fork (void) throw ();
extern __pid_t vfork (void) throw ();
extern char *ttyname (int __fd) throw ();
extern int ttyname_r (int __fd, char *__buf, size_t __buflen) throw ();
extern int isatty (int __fd) throw ();
extern int ttyslot (void) throw ();
extern int link (__const char *__from, __const char *__to) throw ();
extern int symlink (__const char *__from, __const char *__to) throw ();
extern int readlink (__const char *__restrict __path, char *__restrict __buf,
size_t __len) throw ();
extern int unlink (__const char *__name) throw ();
extern int rmdir (__const char *__path) throw ();
extern __pid_t tcgetpgrp (int __fd) throw ();
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw ();
extern char *getlogin (void) throw ();
# 716 "/usr/include/unistd.h" 3
extern int setlogin (__const char *__name) throw ();
# 726 "/usr/include/unistd.h" 3
# 38 "/usr/include/getopt.h" 1 3
extern "C" {
# 47 "/usr/include/getopt.h" 3
extern char *optarg;
# 61 "/usr/include/getopt.h" 3
extern int optind;
extern int opterr;
extern int optopt;
# 145 "/usr/include/getopt.h" 3
extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
# 174 "/usr/include/getopt.h" 3
}
# 726 "/usr/include/unistd.h" 2 3
# 734 "/usr/include/unistd.h" 3
extern int gethostname (char *__name, socklen_t __len) throw ();
extern int sethostname (__const char *__name, size_t __len) throw ();
extern int sethostid (long int __id) throw ();
extern int getdomainname (char *__name, size_t __len) throw ();
extern int setdomainname (__const char *__name, size_t __len) throw ();
extern int fsync (int __fd) throw ();
extern int vhangup (void) throw ();
extern int revoke (__const char *__file) throw ();
extern int profil (unsigned short int *__sample_buffer, size_t __size,
size_t __offset, unsigned int __scale) throw ();
extern int acct (__const char *__name) throw ();
extern int chroot (__const char *__path) throw ();
extern char *getusershell (void) throw ();
extern void endusershell (void) throw ();
extern void setusershell (void) throw ();
extern char *getpass (__const char *__prompt) throw ();
extern int daemon (int __nochdir, int __noclose) throw ();
extern long int gethostid (void) throw ();
extern int sync (void) throw ();
extern int getpagesize (void) throw () __attribute__ ((__const__));
extern int truncate (__const char *__file, __off_t __length) throw ();
# 834 "/usr/include/unistd.h" 3
extern int ftruncate (int __fd, __off_t __length) throw ();
# 850 "/usr/include/unistd.h" 3
extern int getdtablesize (void) throw ();
extern int brk (void *__addr) throw ();
extern void *sbrk (intptr_t __delta) throw ();
# 880 "/usr/include/unistd.h" 3
extern long int syscall (long int __sysno, ...) throw ();
# 900 "/usr/include/unistd.h" 3
extern int lockf (int __fd, int __cmd, __off_t __len) throw ();
# 931 "/usr/include/unistd.h" 3
extern int fdatasync (int __fildes) throw ();
# 976 "/usr/include/unistd.h" 3
extern int pthread_atfork (void (*__prepare) (void),
void (*__parent) (void),
void (*__child) (void)) throw ();
}
# 15 "sock.h" 2
class Sock
{
private:
int port;
char *server;
int sock;
bool isServerSock;
public:
Sock();
Sock( bool isServer, char *name, int port );
~Sock();
int serverSocket( );
int clientSocket( );
int readLine( char *ptr, int nbytes );
int writeLine( char *ptr, int nbytes );
int interact( char *prompt, char *reply );
inline int getSock()
{ return sock; };
inline int getPort()
{ return port; };
inline char* getServer()
{ return server; };
inline bool isServer()
{ return isServerSock; };
};
# 5 "server.h" 2
# 5 "serverthread.h" 1
# 42 "/usr/local/qt-2.2.1/include/qthread.h" 1
# 44 "/usr/local/qt-2.2.1/include/qwindowdefs.h" 1
# 43 "/usr/local/qt-2.2.1/include/qobjectdefs.h" 1
# 332 "/usr/local/qt-2.2.1/include/qglobal.h" 1
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned uint;
typedef unsigned long ulong;
typedef char *pchar;
typedef uchar *puchar;
typedef const char *pcchar;
const bool FALSE = 0;
const bool TRUE = !0;
# 370 "/usr/local/qt-2.2.1/include/qglobal.h"
inline int qRound( double d )
{
return d > 0.0 ? int(d+0.5) : int(d-0.5);
}
# 382 "/usr/local/qt-2.2.1/include/qglobal.h"
typedef signed char INT8;
typedef unsigned char UINT8;
typedef short INT16;
typedef unsigned short UINT16;
typedef int INT32;
typedef unsigned int UINT32;
typedef signed char Q_INT8;
typedef unsigned char Q_UINT8;
typedef short Q_INT16;
typedef unsigned short Q_UINT16;
typedef int Q_INT32;
typedef unsigned int Q_UINT32;
typedef long Q_INT64;
typedef unsigned long Q_UINT64;
class QDataStream;
# 46 "/usr/local/qt-2.2.1/include/qfeatures.h" 1
# 414 "/usr/local/qt-2.2.1/include/qglobal.h" 2
# 451 "/usr/local/qt-2.2.1/include/qglobal.h"
const char *qVersion();
bool qSysInfo( int *wordSize, bool *bigEndian );
# 515 "/usr/local/qt-2.2.1/include/qglobal.h"
void qDebug( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void qWarning( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void qFatal( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void debug( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void warning( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void fatal( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
# 574 "/usr/local/qt-2.2.1/include/qglobal.h"
bool qt_check_pointer( bool c, const char *, int );
enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
typedef void (*msg_handler)(QtMsgType, const char *);
msg_handler qInstallMsgHandler( msg_handler );
void qSuppressObsoleteWarnings( bool = TRUE );
void qObsolete( const char *obj, const char *oldfunc,
const char *newfunc );
void qObsolete( const char *obj, const char *oldfunc );
void qObsolete( const char *message );
# 43 "/usr/local/qt-2.2.1/include/qobjectdefs.h" 2
# 117 "/usr/local/qt-2.2.1/include/qobjectdefs.h"
class QObject;
class QMetaObject;
class QSignal;
class QConnection;
class QEvent;
struct QMetaData;
class QConnectionList;
class QConnectionListIt;
class QSignalDict;
class QSignalDictIt;
class QObjectList;
class QObjectListIt;
class QMemberDict;
# 44 "/usr/local/qt-2.2.1/include/qwindowdefs.h" 2
# 44 "/usr/local/qt-2.2.1/include/qstring.h" 1
# 44 "/usr/local/qt-2.2.1/include/qcstring.h" 1
# 43 "/usr/local/qt-2.2.1/include/qarray.h" 1
# 43 "/usr/local/qt-2.2.1/include/qgarray.h" 1
# 46 "/usr/local/qt-2.2.1/include/qshared.h" 1
struct QShared
{
QShared() { count = 1; }
void ref() { count++; }
bool deref() { return !--count; }
uint count;
};
# 43 "/usr/local/qt-2.2.1/include/qgarray.h" 2
class QGArray
{
friend class QBuffer;
public:
struct array_data : public QShared {
array_data() { data=0; len=0; }
char *data;
uint len;
};
QGArray();
protected:
QGArray( int, int );
QGArray( int size );
QGArray( const QGArray &a );
virtual ~QGArray();
QGArray &operator=( const QGArray &a ) { return assign( a ); }
virtual void detach() { duplicate(*this); }
char *data() const { return shd->data; }
uint nrefs() const { return shd->count; }
uint size() const { return shd->len; }
bool isEqual( const QGArray &a ) const;
bool resize( uint newsize );
bool fill( const char *d, int len, uint sz );
QGArray &assign( const QGArray &a );
QGArray &assign( const char *d, uint len );
QGArray &duplicate( const QGArray &a );
QGArray &duplicate( const char *d, uint len );
void store( const char *d, uint len );
array_data *sharedBlock() const { return shd; }
void setSharedBlock( array_data *p ) { shd=(array_data*)p; }
QGArray &setRawData( const char *d, uint len );
void resetRawData( const char *d, uint len );
int find( const char *d, uint index, uint sz ) const;
int contains( const char *d, uint sz ) const;
void sort( uint sz );
int bsearch( const char *d, uint sz ) const;
char *at( uint index ) const;
bool setExpand( uint index, const char *d, uint sz );
protected:
virtual array_data *newData();
virtual void deleteData( array_data *p );
private:
static void msg_index( uint );
array_data *shd;
};
inline char *QGArray::at( uint index ) const
{
if ( index >= size() ) {
msg_index( index );
index = 0;
}
return &shd->data[index];
}
# 43 "/usr/local/qt-2.2.1/include/qarray.h" 2
template<class type> class QArray : public QGArray
{
public:
typedef type* Iterator;
typedef const type* ConstIterator;
typedef type ValueType;
protected:
QArray( int, int ) : QGArray( 0, 0 ) {}
public:
QArray() {}
QArray( int size ) : QGArray(size*sizeof(type)) {}
QArray( const QArray<type> &a ) : QGArray(a) {}
~QArray() {}
QArray<type> &operator=(const QArray<type> &a)
{ return (QArray<type>&)QGArray::assign(a); }
type *data() const { return (type *)QGArray::data(); }
uint nrefs() const { return QGArray::nrefs(); }
uint size() const { return QGArray::size()/sizeof(type); }
uint count() const { return size(); }
bool isEmpty() const { return QGArray::size() == 0; }
bool isNull() const { return QGArray::data() == 0; }
bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); }
bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); }
bool fill( const type &d, int size = -1 )
{ return QGArray::fill((char*)&d,size,sizeof(type) ); }
void detach() { QGArray::detach(); }
QArray<type> copy() const
{ QArray<type> tmp; return tmp.duplicate(*this); }
QArray<type>& assign( const QArray<type>& a )
{ return (QArray<type>&)QGArray::assign(a); }
QArray<type>& assign( const type *a, uint n )
{ return (QArray<type>&)QGArray::assign((char*)a,n*sizeof(type)); }
QArray<type>& duplicate( const QArray<type>& a )
{ return (QArray<type>&)QGArray::duplicate(a); }
QArray<type>& duplicate( const type *a, uint n )
{ return (QArray<type>&)QGArray::duplicate((char*)a,n*sizeof(type)); }
QArray<type>& setRawData( const type *a, uint n )
{ return (QArray<type>&)QGArray::setRawData((char*)a,
n*sizeof(type)); }
void resetRawData( const type *a, uint n )
{ QGArray::resetRawData((char*)a,n*sizeof(type)); }
int find( const type &d, uint i=0 ) const
{ return QGArray::find((char*)&d,i,sizeof(type)); }
int contains( const type &d ) const
{ return QGArray::contains((char*)&d,sizeof(type)); }
void sort() { QGArray::sort(sizeof(type)); }
int bsearch( const type &d ) const
{ return QGArray::bsearch((const char*)&d,sizeof(type)); }
type& operator[]( int i ) const
{ return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
type& at( uint i ) const
{ return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
operator const type*() const { return (const type *)QGArray::data(); }
bool operator==( const QArray<type> &a ) const { return isEqual(a); }
bool operator!=( const QArray<type> &a ) const { return !isEqual(a); }
Iterator begin() { return data(); }
Iterator end() { return data() + size(); }
ConstIterator begin() const { return data(); }
ConstIterator end() const { return data() + size(); }
};
# 44 "/usr/local/qt-2.2.1/include/qcstring.h" 2
# 78 "/usr/local/qt-2.2.1/include/qcstring.h"
void *qmemmove( void *dst, const void *src, uint len );
char *qstrdup( const char * );
inline uint cstrlen( const char *str )
{ return strlen(str); }
inline uint qstrlen( const char *str )
{ return str ? strlen(str) : 0; }
inline char *cstrcpy( char *dst, const char *src )
{ return strcpy(dst,src); }
inline char *qstrcpy( char *dst, const char *src )
{ return src ? strcpy(dst, src) : 0; }
char *qstrncpy( char *dst, const char *src, uint len );
inline int cstrcmp( const char *str1, const char *str2 )
{ return strcmp(str1,str2); }
inline int qstrcmp( const char *str1, const char *str2 )
{ return (str1 && str2) ? strcmp(str1,str2) : (int)((long)str2 - (long)str1); }
inline int cstrncmp( const char *str1, const char *str2, uint len )
{ return strncmp(str1,str2,len); }
inline int qstrncmp( const char *str1, const char *str2, uint len )
{ return (str1 && str2) ? strncmp(str1,str2,len) :
(int)((long)str2 - (long)str1); }
int qstricmp( const char *, const char * );
int qstrnicmp( const char *, const char *, uint len );
# 147 "/usr/local/qt-2.2.1/include/qcstring.h"
Q_UINT16 qChecksum( const char *s, uint len );
typedef QArray<char> QByteArray;
QDataStream &operator<<( QDataStream &, const QByteArray & );
QDataStream &operator>>( QDataStream &, QByteArray & );
# 173 "/usr/local/qt-2.2.1/include/qcstring.h"
class QRegExp;
class QCString : public QByteArray
{
public:
QCString() {}
QCString( int size );
QCString( const QCString &s ) : QByteArray( s ) {}
QCString( const char *str );
QCString( const char *str, uint maxlen );
QCString &operator=( const QCString &s );
QCString &operator=( const char *str );
bool isNull() const;
bool isEmpty() const;
uint length() const;
bool resize( uint newlen );
bool truncate( uint pos );
bool fill( char c, int len = -1 );
QCString copy() const;
QCString &sprintf( const char *format, ... );
int find( char c, int index=0, bool cs=TRUE ) const;
int find( const char *str, int index=0, bool cs=TRUE ) const;
int find( const QRegExp &, int index=0 ) const;
int findRev( char c, int index=-1, bool cs=TRUE) const;
int findRev( const char *str, int index=-1, bool cs=TRUE) const;
int findRev( const QRegExp &, int index=-1 ) const;
int contains( char c, bool cs=TRUE ) const;
int contains( const char *str, bool cs=TRUE ) const;
int contains( const QRegExp & ) const;
QCString left( uint len ) const;
QCString right( uint len ) const;
QCString mid( uint index, uint len=0xffffffff) const;
QCString leftJustify( uint width, char fill=' ', bool trunc=FALSE)const;
QCString rightJustify( uint width, char fill=' ',bool trunc=FALSE)const;
QCString lower() const;
QCString upper() const;
QCString stripWhiteSpace() const;
QCString simplifyWhiteSpace() const;
QCString &insert( uint index, const char * );
QCString &insert( uint index, char );
QCString &append( const char * );
QCString &prepend( const char * );
QCString &remove( uint index, uint len );
QCString &replace( uint index, uint len, const char * );
QCString &replace( const QRegExp &, const char * );
short toShort( bool *ok=0 ) const;
ushort toUShort( bool *ok=0 ) const;
int toInt( bool *ok=0 ) const;
uint toUInt( bool *ok=0 ) const;
long toLong( bool *ok=0 ) const;
ulong toULong( bool *ok=0 ) const;
float toFloat( bool *ok=0 ) const;
double toDouble( bool *ok=0 ) const;
QCString &setStr( const char *s );
QCString &setNum( short );
QCString &setNum( ushort );
QCString &setNum( int );
QCString &setNum( uint );
QCString &setNum( long );
QCString &setNum( ulong );
QCString &setNum( float, char f='g', int prec=6 );
QCString &setNum( double, char f='g', int prec=6 );
bool setExpand( uint index, char c );
operator const char *() const;
QCString &operator+=( const char *str );
QCString &operator+=( char c );
};
QDataStream &operator<<( QDataStream &, const QCString & );
QDataStream &operator>>( QDataStream &, QCString & );
inline QCString &QCString::operator=( const QCString &s )
{ return (QCString&)assign( s ); }
inline QCString &QCString::operator=( const char *str )
{ return (QCString&)duplicate( str, qstrlen(str)+1 ); }
inline bool QCString::isNull() const
{ return data() == 0; }
inline bool QCString::isEmpty() const
{ return data() == 0 || *data() == '\0'; }
inline uint QCString::length() const
{ return qstrlen( data() ); }
inline bool QCString::truncate( uint pos )
{ return resize(pos+1); }
inline QCString QCString::copy() const
{ return QCString( data() ); }
inline QCString &QCString::prepend( const char *s )
{ return insert(0,s); }
inline QCString &QCString::append( const char *s )
{ return operator+=(s); }
inline QCString &QCString::setNum( short n )
{ return setNum((long)n); }
inline QCString &QCString::setNum( ushort n )
{ return setNum((ulong)n); }
inline QCString &QCString::setNum( int n )
{ return setNum((long)n); }
inline QCString &QCString::setNum( uint n )
{ return setNum((ulong)n); }
inline QCString &QCString::setNum( float n, char f, int prec )
{ return setNum((double)n,f,prec); }
inline QCString::operator const char *() const
{ return (const char *)data(); }
inline bool operator==( const QCString &s1, const QCString &s2 )
{ return qstrcmp(s1.data(),s2.data()) == 0; }
inline bool operator==( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) == 0; }
inline bool operator==( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) == 0; }
inline bool operator!=( const QCString &s1, const QCString &s2 )
{ return qstrcmp(s1.data(),s2.data()) != 0; }
inline bool operator!=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) != 0; }
inline bool operator!=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) != 0; }
inline bool operator<( const QCString &s1, const QCString& s2 )
{ return qstrcmp(s1.data(),s2.data()) < 0; }
inline bool operator<( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) < 0; }
inline bool operator<( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) < 0; }
inline bool operator<=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) <= 0; }
inline bool operator<=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) <= 0; }
inline bool operator>( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) > 0; }
inline bool operator>( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) > 0; }
inline bool operator>=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) >= 0; }
inline bool operator>=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) >= 0; }
inline QCString operator+( const QCString &s1, const QCString &s2 )
{
QCString tmp( s1.data() );
tmp += s2;
return tmp;
}
inline QCString operator+( const QCString &s1, const char *s2 )
{
QCString tmp( s1.data() );
tmp += s2;
return tmp;
}
inline QCString operator+( const char *s1, const QCString &s2 )
{
QCString tmp( s1 );
tmp += s2;
return tmp;
}
inline QCString operator+( const QCString &s1, char c2 )
{
QCString tmp( s1.data() );
tmp += c2;
return tmp;
}
inline QCString operator+( char c1, const QCString &s2 )
{
QCString tmp;
tmp += c1;
tmp += s2;
return tmp;
}
# 44 "/usr/local/qt-2.2.1/include/qstring.h" 2
class QRegExp;
class QString;
class QCharRef;
class QChar {
public:
QChar();
QChar( char c );
QChar( uchar c );
QChar( uchar c, uchar r );
QChar( const QChar& c );
QChar( ushort rc );
QChar( short rc );
QChar( uint rc );
QChar( int rc );
static const QChar null;
static const QChar replacement;
static const QChar byteOrderMark;
static const QChar byteOrderSwapped;
static const QChar nbsp;
enum Category
{
NoCategory,
Mark_NonSpacing,
Mark_SpacingCombining,
Mark_Enclosing,
Number_DecimalDigit,
Number_Letter,
Number_Other,
Separator_Space,
Separator_Line,
Separator_Paragraph,
Other_Control,
Other_Format,
Other_Surrogate,
Other_PrivateUse,
Other_NotAssigned,
Letter_Uppercase,
Letter_Lowercase,
Letter_Titlecase,
Letter_Modifier,
Letter_Other,
Punctuation_Connector,
Punctuation_Dask,
Punctuation_Open,
Punctuation_Close,
Punctuation_InitialQuote,
Punctuation_FinalQuote,
Punctuation_Other,
Symbol_Math,
Symbol_Currency,
Symbol_Modifier,
Symbol_Other
};
enum Direction
{
DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
};
enum Decomposition
{
Single, Canonical, Font, NoBreak, Initial, Medial,
Final, Isolated, Circle, Super, Sub, Vertical,
Wide, Narrow, Small, Square, Compat, Fraction
};
enum Joining
{
OtherJoining, Dual, Right, Center
};
int digitValue() const;
QChar lower() const;
QChar upper() const;
Category category() const;
Direction direction() const;
Joining joining() const;
bool mirrored() const;
QChar mirroredChar() const;
QString decomposition() const;
Decomposition decompositionTag() const;
char latin1() const { return rw ? 0 : cl; }
ushort unicode() const { return (rw << 8) | cl; }
operator char() const { return latin1(); }
bool isNull() const { return unicode()==0; }
bool isPrint() const;
bool isPunct() const;
bool isSpace() const;
bool isMark() const;
bool isLetter() const;
bool isNumber() const;
bool isLetterOrNumber() const;
bool isDigit() const;
uchar& cell() { return cl; }
uchar& row() { return rw; }
uchar cell() const { return cl; }
uchar row() const { return rw; }
static bool networkOrdered() { return (int)net_ordered == 1; }
friend inline int operator==( char ch, QChar c );
friend inline int operator==( QChar c, char ch );
friend inline int operator==( QChar c1, QChar c2 );
friend inline int operator!=( QChar c1, QChar c2 );
friend inline int operator!=( char ch, QChar c );
friend inline int operator!=( QChar c, char ch );
friend inline int operator<=( QChar c, char ch );
friend inline int operator<=( char ch, QChar c );
friend inline int operator<=( QChar c1, QChar c2 );
private:
uchar rw;
uchar cl;
enum { net_ordered = 1 };
# 202 "/usr/local/qt-2.2.1/include/qstring.h"
};
inline QChar::QChar()
{
rw = 0; cl = 0;
}
inline QChar::QChar( char c )
{
rw = 0; cl = (uchar)c;
}
inline QChar::QChar( uchar c )
{
rw = 0; cl = c;
}
inline QChar::QChar( uchar c, uchar r )
{
rw = r; cl = c;
}
inline QChar::QChar( const QChar& c )
{
rw = c.rw; cl = c.cl;
}
inline QChar::QChar( ushort rc )
{
rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
}
inline QChar::QChar( short rc )
{
rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
}
inline QChar::QChar( uint rc )
{
rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
}
inline QChar::QChar( int rc )
{
rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
}
inline int operator==( char ch, QChar c )
{
return ch == c.cl && !c.rw;
}
inline int operator==( QChar c, char ch )
{
return ch == c.cl && !c.rw;
}
inline int operator==( QChar c1, QChar c2 )
{
return c1.cl == c2.cl
&& c1.rw == c2.rw;
}
inline int operator!=( QChar c1, QChar c2 )
{
return c1.cl != c2.cl
|| c1.rw != c2.rw;
}
inline int operator!=( char ch, QChar c )
{
return ch != c.cl || c.rw;
}
inline int operator!=( QChar c, char ch )
{
return ch != c.cl || c.rw;
}
inline int operator<=( QChar c, char ch )
{
return !(ch < c.cl || c.rw);
}
inline int operator<=( char ch, QChar c )
{
return ch <= c.cl || c.rw;
}
inline int operator<=( QChar c1, QChar c2 )
{
return c1.rw > c2.rw
? FALSE
: c1.rw < c2.rw
? TRUE
: c1.cl <= c2.cl;
}
inline int operator>=( QChar c, char ch ) { return ch <= c; }
inline int operator>=( char ch, QChar c ) { return c <= ch; }
inline int operator>=( QChar c1, QChar c2 ) { return c2 <= c1; }
inline int operator<( QChar c, char ch ) { return !(ch<=c); }
inline int operator<( char ch, QChar c ) { return !(c<=ch); }
inline int operator<( QChar c1, QChar c2 ) { return !(c2<=c1); }
inline int operator>( QChar c, char ch ) { return !(ch>=c); }
inline int operator>( char ch, QChar c ) { return !(c>=ch); }
inline int operator>( QChar c1, QChar c2 ) { return !(c2>=c1); }
struct QStringData : public QShared {
QStringData() :
unicode(0), ascii(0), len(0), maxl(0), dirtyascii(0) { ref(); }
QStringData(QChar *u, uint l, uint m) :
unicode(u), ascii(0), len(l), maxl(m), dirtyascii(0) { }
~QStringData() { if ( unicode ) delete[] ((char*)unicode);
if ( ascii ) delete[] ascii; }
void deleteSelf();
QChar *unicode;
char *ascii;
uint len;
uint maxl:30;
uint dirtyascii:1;
};
class QString
{
public:
QString();
QString( QChar );
QString( const QString & );
QString( const QByteArray& );
QString( const QChar* unicode, uint length );
QString( const char *str );
~QString();
QString &operator=( const QString & );
QString &operator=( const char * );
QString &operator=( const QCString& );
QString &operator=( QChar c );
QString &operator=( char c );
static const QString null;
bool isNull() const;
bool isEmpty() const;
uint length() const;
void truncate( uint pos );
void fill( QChar c, int len = -1 );
QString copy() const;
QString arg(long a, int fieldwidth=0, int base=10) const;
QString arg(ulong a, int fieldwidth=0, int base=10) const;
QString arg(int a, int fieldwidth=0, int base=10) const;
QString arg(uint a, int fieldwidth=0, int base=10) const;
QString arg(short a, int fieldwidth=0, int base=10) const;
QString arg(ushort a, int fieldwidth=0, int base=10) const;
QString arg(char a, int fieldwidth=0) const;
QString arg(QChar a, int fieldwidth=0) const;
QString arg(const QString& a, int fieldwidth=0) const;
QString arg(double a, int fieldwidth=0, char fmt='g', int prec=-1) const;
QString &sprintf( const char* format, ... )
__attribute__ ((format (printf, 2, 3)))
;
int find( QChar c, int index=0, bool cs=TRUE ) const;
int find( char c, int index=0, bool cs=TRUE ) const;
int find( const QString &str, int index=0, bool cs=TRUE ) const;
int find( const QRegExp &, int index=0 ) const;
int find( const char* str, int index=0 ) const;
int findRev( QChar c, int index=-1, bool cs=TRUE) const;
int findRev( char c, int index=-1, bool cs=TRUE) const;
int findRev( const QString &str, int index=-1, bool cs=TRUE) const;
int findRev( const QRegExp &, int index=-1 ) const;
int findRev( const char* str, int index=-1 ) const;
int contains( QChar c, bool cs=TRUE ) const;
int contains( char c, bool cs=TRUE ) const
{ return contains(QChar(c), cs); }
int contains( const char* str, bool cs=TRUE ) const;
int contains( const QString &str, bool cs=TRUE ) const;
int contains( const QRegExp & ) const;
QString left( uint len ) const;
QString right( uint len ) const;
QString mid( uint index, uint len=0xffffffff) const;
QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const;
QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const;
QString lower() const;
QString upper() const;
QString stripWhiteSpace() const;
QString simplifyWhiteSpace() const;
QString &insert( uint index, const QString & );
QString &insert( uint index, const QChar*, uint len );
QString &insert( uint index, QChar );
QString &insert( uint index, char c ) { return insert(index,QChar(c)); }
QString &append( char );
QString &append( QChar );
QString &append( const QString & );
QString &prepend( char );
QString &prepend( QChar );
QString &prepend( const QString & );
QString &remove( uint index, uint len );
QString &replace( uint index, uint len, const QString & );
QString &replace( uint index, uint len, const QChar*, uint clen );
QString &replace( const QRegExp &, const QString & );
short toShort( bool *ok=0, int base=10 ) const;
ushort toUShort( bool *ok=0, int base=10 ) const;
int toInt( bool *ok=0, int base=10 ) const;
uint toUInt( bool *ok=0, int base=10 ) const;
long toLong( bool *ok=0, int base=10 ) const;
ulong toULong( bool *ok=0, int base=10 ) const;
float toFloat( bool *ok=0 ) const;
double toDouble( bool *ok=0 ) const;
QString &setNum( short, int base=10 );
QString &setNum( ushort, int base=10 );
QString &setNum( int, int base=10 );
QString &setNum( uint, int base=10 );
QString &setNum( long, int base=10 );
QString &setNum( ulong, int base=10 );
QString &setNum( float, char f='g', int prec=6 );
QString &setNum( double, char f='g', int prec=6 );
static QString number( long, int base=10 );
static QString number( ulong, int base=10);
static QString number( int, int base=10 );
static QString number( uint, int base=10);
static QString number( double, char f='g', int prec=6 );
void setExpand( uint index, QChar c );
QString &operator+=( const QString &str );
QString &operator+=( QChar c );
QString &operator+=( char c );
QChar at( uint i ) const
{ return i<d->len ? d->unicode[i] : QChar::null; }
QChar operator[]( int i ) const { return at((uint)i); }
QCharRef at( uint i );
QCharRef operator[]( int i );
QChar constref(uint i) const
{ return at(i); }
QChar& ref(uint i)
{
if (d->count!=1 || i>=d->len)
subat(i);
d->dirtyascii=1;
return d->unicode[i];
}
const QChar* unicode() const { return d->unicode; }
const char* ascii() const;
const char* latin1() const;
static QString fromLatin1(const char*, int len=-1);
QCString utf8() const;
static QString fromUtf8(const char*, int len=-1);
QCString local8Bit() const;
static QString fromLocal8Bit(const char*, int len=-1);
bool operator!() const;
operator const char *() const { return latin1(); }
QString &setUnicode( const QChar* unicode, uint len );
QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len );
QString &setLatin1( const char*, int len=-1 );
int compare( const QString& s ) const;
static int compare( const QString& s1, const QString& s2 )
{ return s1.compare(s2); }
friend QDataStream &operator>>( QDataStream &, QString & );
void compose();
QChar::Direction basicDirection();
QString visual(int index = 0, int len = -1);
const char* data() const { return latin1(); }
bool startsWith( const QString& ) const;
private:
QString( int size, bool dummy );
void deref();
void real_detach();
void setLength( uint pos );
void subat( uint );
bool findArg(int& pos, int& len) const;
static QChar* asciiToUnicode( const char*, uint * len, uint maxlen=(uint)-1 );
static QChar* asciiToUnicode( const QByteArray&, uint * len );
static char* unicodeToAscii( const QChar*, uint len );
QStringData *d;
static QStringData* shared_null;
static QStringData* makeSharedNull();
friend class QConstString;
QString(QStringData* dd, bool ) : d(dd) { }
};
class QCharRef {
friend class QString;
QString& s;
uint p;
QCharRef(QString* str, uint pos) : s(*str), p(pos) { }
public:
ushort unicode() const { return s.constref(p).unicode(); }
char latin1() const { return s.constref(p).latin1(); }
QCharRef operator=(char c ) { s.ref(p)=c; return *this; }
QCharRef operator=(uchar c ) { s.ref(p)=c; return *this; }
QCharRef operator=(QChar c ) { s.ref(p)=c; return *this; }
QCharRef operator=(const QCharRef& c ) { s.ref(p)=c.unicode(); return *this; }
QCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; }
QCharRef operator=(short rc ) { s.ref(p)=rc; return *this; }
QCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; }
QCharRef operator=(int rc ) { s.ref(p)=rc; return *this; }
operator QChar () const { return s.constref(p); }
bool isNull() const { return unicode()==0; }
bool isPrint() const { return s.constref(p).isPrint(); }
bool isPunct() const { return s.constref(p).isPunct(); }
bool isSpace() const { return s.constref(p).isSpace(); }
bool isMark() const { return s.constref(p).isMark(); }
bool isLetter() const { return s.constref(p).isLetter(); }
bool isNumber() const { return s.constref(p).isNumber(); }
bool isLetterOrNumber() { return s.constref(p).isLetterOrNumber(); }
bool isDigit() const { return s.constref(p).isDigit(); }
int digitValue() const { return s.constref(p).digitValue(); }
QChar lower() { return s.constref(p).lower(); }
QChar upper() { return s.constref(p).upper(); }
QChar::Category category() const { return s.constref(p).category(); }
QChar::Direction direction() const { return s.constref(p).direction(); }
QChar::Joining joining() const { return s.constref(p).joining(); }
bool mirrored() const { return s.constref(p).mirrored(); }
QChar mirroredChar() const { return s.constref(p).mirroredChar(); }
QString decomposition() const { return s.constref(p).decomposition(); }
QChar::Decomposition decompositionTag() const { return s.constref(p).decompositionTag(); }
uchar cell() const { return s.constref(p).cell(); }
uchar row() const { return s.constref(p).row(); }
};
inline QCharRef QString::at( uint i ) { return QCharRef(this,i); }
inline QCharRef QString::operator[]( int i ) { return at((uint)i); }
class QConstString : private QString {
public:
QConstString( QChar* unicode, uint length );
~QConstString();
const QString& string() const { return *this; }
};
QDataStream &operator<<( QDataStream &, const QString & );
QDataStream &operator>>( QDataStream &, QString & );
# 641 "/usr/local/qt-2.2.1/include/qstring.h"
inline QString::QString() :
d(shared_null ? shared_null : makeSharedNull())
{
d->ref();
}
inline QString::~QString()
{
if ( d->deref() ) {
if ( d == shared_null )
shared_null = 0;
d->deleteSelf();
}
}
inline QString &QString::operator=( QChar c )
{ return *this = QString(c); }
inline QString &QString::operator=( char c )
{ return *this = QString(QChar(c)); }
inline bool QString::isNull() const
{ return unicode() == 0; }
inline bool QString::operator!() const
{ return isNull(); }
inline uint QString::length() const
{ return d->len; }
inline bool QString::isEmpty() const
{ return length() == 0; }
inline QString QString::copy() const
{ return QString( *this ); }
inline QString &QString::prepend( const QString & s )
{ return insert(0,s); }
inline QString &QString::prepend( QChar c )
{ return insert(0,c); }
inline QString &QString::prepend( char c )
{ return insert(0,c); }
inline QString &QString::append( const QString & s )
{ return operator+=(s); }
inline QString &QString::append( QChar c )
{ return operator+=(c); }
inline QString &QString::append( char c )
{ return operator+=(c); }
inline QString &QString::setNum( short n, int base )
{ return setNum((long)n, base); }
inline QString &QString::setNum( ushort n, int base )
{ return setNum((ulong)n, base); }
inline QString &QString::setNum( int n, int base )
{ return setNum((long)n, base); }
inline QString &QString::setNum( uint n, int base )
{ return setNum((ulong)n, base); }
inline QString &QString::setNum( float n, char f, int prec )
{ return setNum((double)n,f,prec); }
inline QString QString::arg(int a, int fieldwidth, int base) const
{ return arg((long)a, fieldwidth, base); }
inline QString QString::arg(uint a, int fieldwidth, int base) const
{ return arg((ulong)a, fieldwidth, base); }
inline QString QString::arg(short a, int fieldwidth, int base) const
{ return arg((long)a, fieldwidth, base); }
inline QString QString::arg(ushort a, int fieldwidth, int base) const
{ return arg((ulong)a, fieldwidth, base); }
inline int QString::find( char c, int index, bool cs ) const
{ return find(QChar(c), index, cs); }
inline int QString::findRev( char c, int index, bool cs) const
{ return findRev( QChar(c), index, cs ); }
inline int QString::find( const char* str, int index ) const
{ return find(QString::fromLatin1(str), index); }
inline int QString::findRev( const char* str, int index ) const
{ return findRev(QString::fromLatin1(str), index); }
bool operator!=( const QString &s1, const QString &s2 );
bool operator<( const QString &s1, const QString &s2 );
bool operator<=( const QString &s1, const QString &s2 );
bool operator==( const QString &s1, const QString &s2 );
bool operator>( const QString &s1, const QString &s2 );
bool operator>=( const QString &s1, const QString &s2 );
bool operator!=( const QString &s1, const char *s2 );
bool operator<( const QString &s1, const char *s2 );
bool operator<=( const QString &s1, const char *s2 );
bool operator==( const QString &s1, const char *s2 );
bool operator>( const QString &s1, const char *s2 );
bool operator>=( const QString &s1, const char *s2 );
bool operator!=( const char *s1, const QString &s2 );
bool operator<( const char *s1, const QString &s2 );
bool operator<=( const char *s1, const QString &s2 );
bool operator==( const char *s1, const QString &s2 );
bool operator>=( const char *s1, const QString &s2 );
inline QString operator+( const QString &s1, const QString &s2 )
{
QString tmp( s1 );
tmp += s2;
return tmp;
}
inline QString operator+( const QString &s1, const char *s2 )
{
QString tmp( s1 );
tmp += QString::fromLatin1(s2);
return tmp;
}
inline QString operator+( const char *s1, const QString &s2 )
{
QString tmp = QString::fromLatin1( s1 );
tmp += s2;
return tmp;
}
inline QString operator+( const QString &s1, QChar c2 )
{
QString tmp( s1 );
tmp += c2;
return tmp;
}
inline QString operator+( const QString &s1, char c2 )
{
QString tmp( s1 );
tmp += c2;
return tmp;
}
inline QString operator+( QChar c1, const QString &s2 )
{
QString tmp;
tmp += c1;
tmp += s2;
return tmp;
}
inline QString operator+( char c1, const QString &s2 )
{
QString tmp;
tmp += c1;
tmp += s2;
return tmp;
}
# 45 "/usr/local/qt-2.2.1/include/qwindowdefs.h" 2
# 46 "/usr/local/qt-2.2.1/include/qnamespace.h" 1
class QColor;
class QCursor;
class Qt {
public:
static const QColor & color0;
static const QColor & color1;
static const QColor & black;
static const QColor & white;
static const QColor & darkGray;
static const QColor & gray;
static const QColor & lightGray;
static const QColor & red;
static const QColor & green;
static const QColor & blue;
static const QColor & cyan;
static const QColor & magenta;
static const QColor & yellow;
static const QColor & darkRed;
static const QColor & darkGreen;
static const QColor & darkBlue;
static const QColor & darkCyan;
static const QColor & darkMagenta;
static const QColor & darkYellow;
enum ButtonState {
NoButton = 0x0000,
LeftButton = 0x0001,
RightButton = 0x0002,
MidButton = 0x0004,
MouseButtonMask = 0x0007,
ShiftButton = 0x0008,
ControlButton = 0x0010,
AltButton = 0x0020,
KeyButtonMask = 0x0038,
Keypad = 0x4000
};
enum Orientation {
Horizontal,
Vertical
};
enum AlignmentFlags {
AlignLeft = 0x0001,
AlignRight = 0x0002,
AlignHCenter = 0x0004,
AlignTop = 0x0008,
AlignBottom = 0x0010,
AlignVCenter = 0x0020,
AlignCenter = AlignVCenter | AlignHCenter,
SingleLine = 0x0040,
DontClip = 0x0080,
ExpandTabs = 0x0100,
ShowPrefix = 0x0200,
WordBreak = 0x0400,
DontPrint = 0x1000
};
enum WidgetState {
WState_Created = 0x00000001,
WState_Disabled = 0x00000002,
WState_Visible = 0x00000004,
WState_ForceHide = 0x00000008,
WState_OwnCursor = 0x00000010,
WState_MouseTracking = 0x00000020,
WState_CompressKeys = 0x00000040,
WState_BlockUpdates = 0x00000080,
WState_InPaintEvent = 0x00000100,
WState_Reparented = 0x00000200,
WState_ConfigPending = 0x00000400,
WState_Resized = 0x00000800,
WState_AutoMask = 0x00001000,
WState_Polished = 0x00002000,
WState_DND = 0x00004000,
WState_Modal = 0x00008000,
WState_Reserved1 = 0x00010000,
WState_Reserved2 = 0x00020000,
WState_Reserved3 = 0x00040000,
WState_Maximized = 0x00080000,
WState_TranslateBackground = 0x00100000,
WState_ForceDisabled = 0x00200000,
WState_Exposed = 0x00400000
};
typedef uint WFlags;
enum WidgetFlags {
WType_TopLevel = 0x00000001,
WType_Modal = 0x00000002,
WType_Popup = 0x00000004,
WType_Desktop = 0x00000008,
WType_Mask = 0x0000000f,
WStyle_Customize = 0x00000010,
WStyle_NormalBorder = 0x00000020,
WStyle_DialogBorder = 0x00000040,
WStyle_NoBorder = 0x00000000,
WStyle_Title = 0x00000080,
WStyle_SysMenu = 0x00000100,
WStyle_Minimize = 0x00000200,
WStyle_Maximize = 0x00000400,
WStyle_MinMax = WStyle_Minimize | WStyle_Maximize,
WStyle_Tool = 0x00000800,
WStyle_StaysOnTop = 0x00001000,
WStyle_Dialog = 0x00002000,
WStyle_ContextHelp = 0x00004000,
WStyle_NoBorderEx = 0x00008000,
WStyle_Mask = 0x0000fff0,
WDestructiveClose = 0x00010000,
WPaintDesktop = 0x00020000,
WPaintUnclipped = 0x00040000,
WPaintClever = 0x00080000,
WResizeNoErase = 0x00100000,
WMouseNoMask = 0x00200000,
WNorthWestGravity = 0x00400000,
WRepaintNoErase = 0x00800000,
WX11BypassWM = 0x01000000,
WGroupLeader = 0x02000000
};
enum ImageConversionFlags {
ColorMode_Mask = 0x00000003,
AutoColor = 0x00000000,
ColorOnly = 0x00000003,
MonoOnly = 0x00000002,
AlphaDither_Mask = 0x0000000c,
ThresholdAlphaDither = 0x00000000,
OrderedAlphaDither = 0x00000004,
DiffuseAlphaDither = 0x00000008,
NoAlpha = 0x0000000c,
Dither_Mask = 0x00000030,
DiffuseDither = 0x00000000,
OrderedDither = 0x00000010,
ThresholdDither = 0x00000020,
DitherMode_Mask = 0x000000c0,
AutoDither = 0x00000000,
PreferDither = 0x00000040,
AvoidDither = 0x00000080
};
enum BGMode {
TransparentMode,
OpaqueMode
};
enum PaintUnit {
PixelUnit,
LoMetricUnit,
HiMetricUnit,
LoEnglishUnit,
HiEnglishUnit,
TwipsUnit
};
enum GUIStyle {
MacStyle,
WindowsStyle,
Win3Style,
PMStyle,
MotifStyle
};
enum Modifier {
SHIFT = 0x00200000,
CTRL = 0x00400000,
ALT = 0x00800000,
MODIFIER_MASK = 0x00e00000,
UNICODE_ACCEL = 0x10000000,
ASCII_ACCEL = UNICODE_ACCEL
};
enum Key {
Key_Escape = 0x1000,
Key_Tab = 0x1001,
Key_Backtab = 0x1002, Key_BackTab = Key_Backtab,
Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace,
Key_Return = 0x1004,
Key_Enter = 0x1005,
Key_Insert = 0x1006,
Key_Delete = 0x1007,
Key_Pause = 0x1008,
Key_Print = 0x1009,
Key_SysReq = 0x100a,
Key_Home = 0x1010,
Key_End = 0x1011,
Key_Left = 0x1012,
Key_Up = 0x1013,
Key_Right = 0x1014,
Key_Down = 0x1015,
Key_Prior = 0x1016, Key_PageUp = Key_Prior,
Key_Next = 0x1017, Key_PageDown = Key_Next,
Key_Shift = 0x1020,
Key_Control = 0x1021,
Key_Meta = 0x1022,
Key_Alt = 0x1023,
Key_CapsLock = 0x1024,
Key_NumLock = 0x1025,
Key_ScrollLock = 0x1026,
Key_F1 = 0x1030,
Key_F2 = 0x1031,
Key_F3 = 0x1032,
Key_F4 = 0x1033,
Key_F5 = 0x1034,
Key_F6 = 0x1035,
Key_F7 = 0x1036,
Key_F8 = 0x1037,
Key_F9 = 0x1038,
Key_F10 = 0x1039,
Key_F11 = 0x103a,
Key_F12 = 0x103b,
Key_F13 = 0x103c,
Key_F14 = 0x103d,
Key_F15 = 0x103e,
Key_F16 = 0x103f,
Key_F17 = 0x1040,
Key_F18 = 0x1041,
Key_F19 = 0x1042,
Key_F20 = 0x1043,
Key_F21 = 0x1044,
Key_F22 = 0x1045,
Key_F23 = 0x1046,
Key_F24 = 0x1047,
Key_F25 = 0x1048,
Key_F26 = 0x1049,
Key_F27 = 0x104a,
Key_F28 = 0x104b,
Key_F29 = 0x104c,
Key_F30 = 0x104d,
Key_F31 = 0x104e,
Key_F32 = 0x104f,
Key_F33 = 0x1050,
Key_F34 = 0x1051,
Key_F35 = 0x1052,
Key_Super_L = 0x1053,
Key_Super_R = 0x1054,
Key_Menu = 0x1055,
Key_Hyper_L = 0x1056,
Key_Hyper_R = 0x1057,
Key_Help = 0x1058,
Key_Space = 0x20,
Key_Any = Key_Space,
Key_Exclam = 0x21,
Key_QuoteDbl = 0x22,
Key_NumberSign = 0x23,
Key_Dollar = 0x24,
Key_Percent = 0x25,
Key_Ampersand = 0x26,
Key_Apostrophe = 0x27,
Key_ParenLeft = 0x28,
Key_ParenRight = 0x29,
Key_Asterisk = 0x2a,
Key_Plus = 0x2b,
Key_Comma = 0x2c,
Key_Minus = 0x2d,
Key_Period = 0x2e,
Key_Slash = 0x2f,
Key_0 = 0x30,
Key_1 = 0x31,
Key_2 = 0x32,
Key_3 = 0x33,
Key_4 = 0x34,
Key_5 = 0x35,
Key_6 = 0x36,
Key_7 = 0x37,
Key_8 = 0x38,
Key_9 = 0x39,
Key_Colon = 0x3a,
Key_Semicolon = 0x3b,
Key_Less = 0x3c,
Key_Equal = 0x3d,
Key_Greater = 0x3e,
Key_Question = 0x3f,
Key_At = 0x40,
Key_A = 0x41,
Key_B = 0x42,
Key_C = 0x43,
Key_D = 0x44,
Key_E = 0x45,
Key_F = 0x46,
Key_G = 0x47,
Key_H = 0x48,
Key_I = 0x49,
Key_J = 0x4a,
Key_K = 0x4b,
Key_L = 0x4c,
Key_M = 0x4d,
Key_N = 0x4e,
Key_O = 0x4f,
Key_P = 0x50,
Key_Q = 0x51,
Key_R = 0x52,
Key_S = 0x53,
Key_T = 0x54,
Key_U = 0x55,
Key_V = 0x56,
Key_W = 0x57,
Key_X = 0x58,
Key_Y = 0x59,
Key_Z = 0x5a,
Key_BracketLeft = 0x5b,
Key_Backslash = 0x5c,
Key_BracketRight = 0x5d,
Key_AsciiCircum = 0x5e,
Key_Underscore = 0x5f,
Key_QuoteLeft = 0x60,
Key_BraceLeft = 0x7b,
Key_Bar = 0x7c,
Key_BraceRight = 0x7d,
Key_AsciiTilde = 0x7e,
Key_nobreakspace = 0x0a0,
Key_exclamdown = 0x0a1,
Key_cent = 0x0a2,
Key_sterling = 0x0a3,
Key_currency = 0x0a4,
Key_yen = 0x0a5,
Key_brokenbar = 0x0a6,
Key_section = 0x0a7,
Key_diaeresis = 0x0a8,
Key_copyright = 0x0a9,
Key_ordfeminine = 0x0aa,
Key_guillemotleft = 0x0ab,
Key_notsign = 0x0ac,
Key_hyphen = 0x0ad,
Key_registered = 0x0ae,
Key_macron = 0x0af,
Key_degree = 0x0b0,
Key_plusminus = 0x0b1,
Key_twosuperior = 0x0b2,
Key_threesuperior = 0x0b3,
Key_acute = 0x0b4,
Key_mu = 0x0b5,
Key_paragraph = 0x0b6,
Key_periodcentered = 0x0b7,
Key_cedilla = 0x0b8,
Key_onesuperior = 0x0b9,
Key_masculine = 0x0ba,
Key_guillemotright = 0x0bb,
Key_onequarter = 0x0bc,
Key_onehalf = 0x0bd,
Key_threequarters = 0x0be,
Key_questiondown = 0x0bf,
Key_Agrave = 0x0c0,
Key_Aacute = 0x0c1,
Key_Acircumflex = 0x0c2,
Key_Atilde = 0x0c3,
Key_Adiaeresis = 0x0c4,
Key_Aring = 0x0c5,
Key_AE = 0x0c6,
Key_Ccedilla = 0x0c7,
Key_Egrave = 0x0c8,
Key_Eacute = 0x0c9,
Key_Ecircumflex = 0x0ca,
Key_Ediaeresis = 0x0cb,
Key_Igrave = 0x0cc,
Key_Iacute = 0x0cd,
Key_Icircumflex = 0x0ce,
Key_Idiaeresis = 0x0cf,
Key_ETH = 0x0d0,
Key_Ntilde = 0x0d1,
Key_Ograve = 0x0d2,
Key_Oacute = 0x0d3,
Key_Ocircumflex = 0x0d4,
Key_Otilde = 0x0d5,
Key_Odiaeresis = 0x0d6,
Key_multiply = 0x0d7,
Key_Ooblique = 0x0d8,
Key_Ugrave = 0x0d9,
Key_Uacute = 0x0da,
Key_Ucircumflex = 0x0db,
Key_Udiaeresis = 0x0dc,
Key_Yacute = 0x0dd,
Key_THORN = 0x0de,
Key_ssharp = 0x0df,
Key_agrave = 0x0e0,
Key_aacute = 0x0e1,
Key_acircumflex = 0x0e2,
Key_atilde = 0x0e3,
Key_adiaeresis = 0x0e4,
Key_aring = 0x0e5,
Key_ae = 0x0e6,
Key_ccedilla = 0x0e7,
Key_egrave = 0x0e8,
Key_eacute = 0x0e9,
Key_ecircumflex = 0x0ea,
Key_ediaeresis = 0x0eb,
Key_igrave = 0x0ec,
Key_iacute = 0x0ed,
Key_icircumflex = 0x0ee,
Key_idiaeresis = 0x0ef,
Key_eth = 0x0f0,
Key_ntilde = 0x0f1,
Key_ograve = 0x0f2,
Key_oacute = 0x0f3,
Key_ocircumflex = 0x0f4,
Key_otilde = 0x0f5,
Key_odiaeresis = 0x0f6,
Key_division = 0x0f7,
Key_oslash = 0x0f8,
Key_ugrave = 0x0f9,
Key_uacute = 0x0fa,
Key_ucircumflex = 0x0fb,
Key_udiaeresis = 0x0fc,
Key_yacute = 0x0fd,
Key_thorn = 0x0fe,
Key_ydiaeresis = 0x0ff,
Key_unknown = 0xffff
};
enum ArrowType {
UpArrow,
DownArrow,
LeftArrow,
RightArrow
};
enum RasterOp {
CopyROP,
OrROP,
XorROP,
NotAndROP,
EraseROP=NotAndROP,
NotCopyROP,
NotOrROP,
NotXorROP,
AndROP, NotEraseROP=AndROP,
NotROP,
ClearROP,
SetROP,
NopROP,
AndNotROP,
OrNotROP,
NandROP,
NorROP, LastROP=NorROP
};
enum PenStyle {
NoPen,
SolidLine,
DashLine,
DotLine,
DashDotLine,
DashDotDotLine,
MPenStyle = 0x0f
};
enum PenCapStyle {
FlatCap = 0x00,
SquareCap = 0x10,
RoundCap = 0x20,
MPenCapStyle = 0x30
};
enum PenJoinStyle {
MiterJoin = 0x00,
BevelJoin = 0x40,
RoundJoin = 0x80,
MPenJoinStyle = 0xc0
};
enum BrushStyle {
NoBrush,
SolidPattern,
Dense1Pattern,
Dense2Pattern,
Dense3Pattern,
Dense4Pattern,
Dense5Pattern,
Dense6Pattern,
Dense7Pattern,
HorPattern,
VerPattern,
CrossPattern,
BDiagPattern,
FDiagPattern,
DiagCrossPattern,
CustomPattern=24
};
enum WindowsVersion {
WV_32s = 0x0001,
WV_95 = 0x0002,
WV_98 = 0x0003,
WV_DOS_based = 0x000f,
WV_NT = 0x0010,
WV_2000 = 0x0020,
WV_NT_based = 0x00f0
};
enum UIEffect {
UI_General,
UI_AnimateMenu,
UI_FadeMenu,
UI_AnimateCombo,
UI_AnimateTooltip,
UI_FadeTooltip
};
static const QCursor & arrowCursor;
static const QCursor & upArrowCursor;
static const QCursor & crossCursor;
static const QCursor & waitCursor;
static const QCursor & ibeamCursor;
static const QCursor & sizeVerCursor;
static const QCursor & sizeHorCursor;
static const QCursor & sizeBDiagCursor;
static const QCursor & sizeFDiagCursor;
static const QCursor & sizeAllCursor;
static const QCursor & blankCursor;
static const QCursor & splitVCursor;
static const QCursor & splitHCursor;
static const QCursor & pointingHandCursor;
static const QCursor & forbiddenCursor;
enum TextFormat {
PlainText,
RichText,
AutoText
};
};
class QInternal {
public:
enum PaintDeviceFlags {
UndefinedDevice = 0x00,
Widget = 0x01,
Pixmap = 0x02,
Printer = 0x03,
Picture = 0x04,
System = 0x05,
DeviceTypeMask = 0x0f,
ExternalDevice = 0x10
};
};
# 46 "/usr/local/qt-2.2.1/include/qwindowdefs.h" 2
class QPaintDevice;
class QPaintDeviceMetrics;
class QWidget;
class QWidgetMapper;
class QDialog;
class QColor;
class QColorGroup;
class QPalette;
class QCursor;
class QPoint;
class QSize;
class QRect;
class QPointArray;
class QPainter;
class QRegion;
class QFont;
class QFontMetrics;
class QFontInfo;
class QPen;
class QBrush;
class QWMatrix;
class QPixmap;
class QBitmap;
class QMovie;
class QImage;
class QImageIO;
class QPicture;
class QPrinter;
class QAccel;
class QTimer;
class QTime;
class QClipboard;
class QWidgetList;
class QWidgetListIt;
# 118 "/usr/local/qt-2.2.1/include/qwindowdefs.h"
typedef unsigned int WId;
typedef unsigned int HANDLE;
typedef struct _XDisplay Display;
typedef union _XEvent XEvent;
typedef struct _XGC *GC;
typedef struct _XRegion *Region;
Display *qt_xdisplay();
int qt_xscreen();
WId qt_xrootwin();
GC qt_xget_readonly_gc( bool monochrome=FALSE );
GC qt_xget_temp_gc( bool monochrome=FALSE );
# 144 "/usr/local/qt-2.2.1/include/qwindowdefs.h"
class QApplication;
typedef Q_INT32 QCOORD;
const QCOORD QCOORD_MAX = 2147483647;
const QCOORD QCOORD_MIN = -QCOORD_MAX - 1;
typedef unsigned int QRgb;
char *qAppName();
typedef void (*Q_CleanUpFunction)();
void qAddPostRoutine( Q_CleanUpFunction );
void qRemovePostRoutine( Q_CleanUpFunction );
void *qt_find_obj_child( QObject *, const char *, const char * );
# 42 "/usr/local/qt-2.2.1/include/qthread.h" 2
# 5 "serverthread.h" 2
# 43 "/usr/local/qt-2.2.1/include/qlist.h" 1
# 43 "/usr/local/qt-2.2.1/include/qglist.h" 1
# 46 "/usr/local/qt-2.2.1/include/qcollection.h" 1
class QGVector;
class QGList;
class QGDict;
class QCollection
{
public:
bool autoDelete() const { return del_item; }
void setAutoDelete( bool enable ) { del_item = enable; }
virtual uint count() const = 0;
virtual void clear() = 0;
typedef void *Item;
protected:
QCollection() { del_item = FALSE; }
QCollection(const QCollection &) { del_item = FALSE; }
virtual ~QCollection() {}
bool del_item;
virtual Item newItem( Item );
virtual void deleteItem( Item );
};
# 43 "/usr/local/qt-2.2.1/include/qglist.h" 2
class QLNode
{
friend class QGList;
friend class QGListIterator;
public:
QCollection::Item getData() { return data; }
private:
QCollection::Item data;
QLNode *prev;
QLNode *next;
QLNode( QCollection::Item d ) { data = d; }
};
class QGList : public QCollection
{
friend class QGListIterator;
friend class QGVector;
public:
uint count() const;
QDataStream &read( QDataStream & );
QDataStream &write( QDataStream & ) const;
protected:
QGList();
QGList( const QGList & );
virtual ~QGList();
QGList &operator=( const QGList & );
bool operator==( const QGList& ) const;
void inSort( QCollection::Item );
void append( QCollection::Item );
bool insertAt( uint index, QCollection::Item );
void relinkNode( QLNode * );
bool removeNode( QLNode * );
bool remove( QCollection::Item = 0 );
bool removeRef( QCollection::Item = 0 );
bool removeFirst();
bool removeLast();
bool removeAt( uint index );
QCollection::Item takeNode( QLNode * );
QCollection::Item take();
QCollection::Item takeAt( uint index );
QCollection::Item takeFirst();
QCollection::Item takeLast();
void sort();
void clear();
int findRef( QCollection::Item, bool = TRUE );
int find( QCollection::Item, bool = TRUE );
uint containsRef( QCollection::Item ) const;
uint contains( QCollection::Item ) const;
QCollection::Item at( uint index );
int at() const;
QLNode *currentNode() const;
QCollection::Item get() const;
QCollection::Item cfirst() const;
QCollection::Item clast() const;
QCollection::Item first();
QCollection::Item last();
QCollection::Item next();
QCollection::Item prev();
void toVector( QGVector * ) const;
virtual int compareItems( QCollection::Item, QCollection::Item );
virtual QDataStream &read( QDataStream &, QCollection::Item & );
virtual QDataStream &write( QDataStream &, QCollection::Item ) const;
private:
void prepend( QCollection::Item );
void heapSortPushDown( QCollection::Item* heap, int first, int last );
QLNode *firstNode;
QLNode *lastNode;
QLNode *curNode;
int curIndex;
uint numNodes;
QGList *iterators;
QLNode *locate( uint );
QLNode *unlink();
};
inline uint QGList::count() const
{
return numNodes;
}
inline bool QGList::removeFirst()
{
first();
return remove();
}
inline bool QGList::removeLast()
{
last();
return remove();
}
inline int QGList::at() const
{
return curIndex;
}
inline QCollection::Item QGList::at( uint index )
{
QLNode *n = locate( index );
return n ? n->data : 0;
}
inline QLNode *QGList::currentNode() const
{
return curNode;
}
inline QCollection::Item QGList::get() const
{
return curNode ? curNode->data : 0;
}
inline QCollection::Item QGList::cfirst() const
{
return firstNode ? firstNode->data : 0;
}
inline QCollection::Item QGList::clast() const
{
return lastNode ? lastNode->data : 0;
}
QDataStream &operator>>( QDataStream &, QGList & );
QDataStream &operator<<( QDataStream &, const QGList & );
class QGListIterator
{
friend class QGList;
protected:
QGListIterator( const QGList & );
QGListIterator( const QGListIterator & );
QGListIterator &operator=( const QGListIterator & );
~QGListIterator();
bool atFirst() const;
bool atLast() const;
QCollection::Item toFirst();
QCollection::Item toLast();
QCollection::Item get() const;
QCollection::Item operator()();
QCollection::Item operator++();
QCollection::Item operator+=(uint);
QCollection::Item operator--();
QCollection::Item operator-=(uint);
protected:
QGList *list;
private:
QLNode *curNode;
};
inline bool QGListIterator::atFirst() const
{
return curNode == list->firstNode;
}
inline bool QGListIterator::atLast() const
{
return curNode == list->lastNode;
}
inline QCollection::Item QGListIterator::get() const
{
return curNode ? curNode->data : 0;
}
# 43 "/usr/local/qt-2.2.1/include/qlist.h" 2
template<class type> class QList : public QGList
{
public:
QList() {}
QList( const QList<type> &l ) : QGList(l) {}
~QList() { clear(); }
QList<type> &operator=(const QList<type> &l)
{ return (QList<type>&)QGList::operator=(l); }
bool operator==( const QList<type> &list ) const
{ return QGList::operator==( list ); }
uint count() const { return QGList::count(); }
bool isEmpty() const { return QGList::count() == 0; }
bool insert( uint i, const type *d){ return QGList::insertAt(i,(QCollection::Item)d); }
void inSort( const type *d ) { QGList::inSort((QCollection::Item)d); }
void prepend( const type *d ) { QGList::insertAt(0,(QCollection::Item)d); }
void append( const type *d ) { QGList::append((QCollection::Item)d); }
bool remove( uint i ) { return QGList::removeAt(i); }
bool remove() { return QGList::remove((QCollection::Item)0); }
bool remove( const type *d ) { return QGList::remove((QCollection::Item)d); }
bool removeRef( const type *d ) { return QGList::removeRef((QCollection::Item)d); }
void removeNode( QLNode *n ) { QGList::removeNode(n); }
bool removeFirst() { return QGList::removeFirst(); }
bool removeLast() { return QGList::removeLast(); }
type *take( uint i ) { return (type *)QGList::takeAt(i); }
type *take() { return (type *)QGList::take(); }
type *takeNode( QLNode *n ) { return (type *)QGList::takeNode(n); }
void clear() { QGList::clear(); }
void sort() { QGList::sort(); }
int find( const type *d ) { return QGList::find((QCollection::Item)d); }
int findNext( const type *d ) { return QGList::find((QCollection::Item)d,FALSE); }
int findRef( const type *d ) { return QGList::findRef((QCollection::Item)d); }
int findNextRef( const type *d ){ return QGList::findRef((QCollection::Item)d,FALSE);}
uint contains( const type *d ) const { return QGList::contains((QCollection::Item)d); }
uint containsRef( const type *d ) const
{ return QGList::containsRef((QCollection::Item)d); }
type *at( uint i ) { return (type *)QGList::at(i); }
int at() const { return QGList::at(); }
type *current() const { return (type *)QGList::get(); }
QLNode *currentNode() const { return QGList::currentNode(); }
type *getFirst() const { return (type *)QGList::cfirst(); }
type *getLast() const { return (type *)QGList::clast(); }
type *first() { return (type *)QGList::first(); }
type *last() { return (type *)QGList::last(); }
type *next() { return (type *)QGList::next(); }
type *prev() { return (type *)QGList::prev(); }
void toVector( QGVector *vec )const{ QGList::toVector(vec); }
private:
void deleteItem( QCollection::Item d );
};
template<> inline void QList<void>::deleteItem( QCollection::Item )
{
}
template<class type> inline void QList<type>::deleteItem( QCollection::Item d )
{
if ( del_item ) delete (type *)d;
}
template<class type> class QListIterator : public QGListIterator
{
public:
QListIterator(const QList<type> &l) :QGListIterator((QGList &)l) {}
~QListIterator() {}
uint count() const { return list->count(); }
bool isEmpty() const { return list->count() == 0; }
bool atFirst() const { return QGListIterator::atFirst(); }
bool atLast() const { return QGListIterator::atLast(); }
type *toFirst() { return (type *)QGListIterator::toFirst(); }
type *toLast() { return (type *)QGListIterator::toLast(); }
operator type *() const { return (type *)QGListIterator::get(); }
type *operator*() { return (type *)QGListIterator::get(); }
type *current() const { return (type *)QGListIterator::get(); }
type *operator()() { return (type *)QGListIterator::operator()();}
type *operator++() { return (type *)QGListIterator::operator++(); }
type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);}
type *operator--() { return (type *)QGListIterator::operator--(); }
type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);}
QListIterator<type>& operator=(const QListIterator<type>&it)
{ QGListIterator::operator=(it); return *this; }
};
# 6 "serverthread.h" 2
# 4 "user.h" 1
class serverThread;
class User
{
private:
char *name;
serverThread *thread;
public:
User( char *name, serverThread *thread );
inline char *getName();
inline serverThread *getThread();
};
# 7 "serverthread.h" 2
class serverThread : public QThread
{
private:
int client;
static QList<User> usersList;
char *name;
char *destination;
char *message;
char *origMessage;
bool loggedIn;
public:
serverThread( int sockfd );
virtual void run();
int readLine( char *ptr );
int writeLine( char *ptr );
User *mydata;
};
# 6 "server.h" 2
class chatServer : public Sock
{
private:
int sock;
int port;
char name[200];
public:
chatServer( char *name, int port );
~chatServer();
void acceptConnections();
};
# 2 "server.cpp" 2
chatServer::chatServer( char *name="Miracle", int port=2739 )
:Sock( true, name, port )
{
qstrcpy( this->name, name );
this->port = port;
sock = serverSocket();
}
void chatServer::acceptConnections()
{
if( sock == -1 )
return -1;
if( listen( sock, 10 ) !== 0 ){
perror( "Could not listen to the socket" );
return -1;
}
while ( true )
{
int newSock=accept( sock, __null, __null );
serverThread *newOne = new serverThread( newSock );
newOne->run();
}
}