

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
5 messages in net.java.dev.jna.usersRe: [jna-users] Java Structure code g...| From | Sent On | Attachments |
|---|---|---|
| Argyn | Sep 5, 2008 12:39 pm | |
| Paul Loy | Sep 10, 2008 2:02 am | |
| Timothy Wall | Sep 10, 2008 5:06 am | |
| Argyn | Sep 10, 2008 1:20 pm | |
| Argyn | Sep 10, 2008 1:23 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [jna-users] Java Structure code generator from C++ .h files | Actions... |
|---|---|---|
| From: | Paul Loy (pa...@keteracel.com) | |
| Date: | Sep 10, 2008 2:02:10 am | |
| List: | net.java.dev.jna.users | |
If I was goping to approach this I would fist precompile the header files. This will remove the preprocessor directives (the #'s) and replace them with the actual code. Have a look at gcc -E -o test.output test.c
e.g. I did this on a simple test.c:
#include <stdio.h>
#define FOO "hello!" #define SUCCESS 0
int main (void) { printf(FOO); return SUCCESS; }
which gave.... see the end of the email as it's huge. You'll notice that it's now just a big LONG list of function prototypes, typedefs and structs. You can then use ANTLR (http://www.antlr.org/) to parse this file. There will be a grammar somewhere for c++. Then from the tree that ANTLR gives you back, you can generate the JNA mappings. You'll notice in the preprocessor output that there are # comments which start each block of functions, structs or typedefs. You'll need to map these to the relevant libraries.
I only looked at C as I've looked into this a while back. Decided that it was too much work. C++ would be even harder as you'd then have Class prototypes to deal with, not to mention generics... urgh! I would suggest getting a C one working first, mainly because the JNA community would love you, but also because it'll be easier and less frustrating for you.
Preprocessor output:
# 1 "test.c" # 1 "<built-in>" # 1 "<command line>" # 1 "test.c" # 1 "/usr/include/stdio.h" 1 3 4 # 29 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/_ansi.h" 1 3 4 # 15 "/usr/include/_ansi.h" 3 4 # 1 "/usr/include/newlib.h" 1 3 4 # 16 "/usr/include/_ansi.h" 2 3 4 # 1 "/usr/include/sys/config.h" 1 3 4
# 1 "/usr/include/machine/ieeefp.h" 1 3 4 # 5 "/usr/include/sys/config.h" 2 3 4 # 167 "/usr/include/sys/config.h" 3 4 # 1 "/usr/include/cygwin/config.h" 1 3 4 # 168 "/usr/include/sys/config.h" 2 3 4 # 17 "/usr/include/_ansi.h" 2 3 4 # 30 "/usr/include/stdio.h" 2 3 4
# 1 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h" 1 3 4 # 213 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h" 3 4 typedef unsigned int size_t; # 35 "/usr/include/stdio.h" 2 3 4
# 1 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h" 1 3 4 # 44 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 38 "/usr/include/stdio.h" 2 3 4
# 1 "/usr/include/sys/reent.h" 1 3 4 # 13 "/usr/include/sys/reent.h" 3 4 # 1 "/usr/include/_ansi.h" 1 3 4 # 14 "/usr/include/sys/reent.h" 2 3 4 # 1 "/usr/include/sys/_types.h" 1 3 4 # 12 "/usr/include/sys/_types.h" 3 4 # 1 "/usr/include/sys/lock.h" 1 3 4 # 14 "/usr/include/sys/lock.h" 3 4 typedef void *_LOCK_T; # 44 "/usr/include/sys/lock.h" 3 4 void __cygwin_lock_init(_LOCK_T *); void __cygwin_lock_init_recursive(_LOCK_T *); void __cygwin_lock_fini(_LOCK_T *); void __cygwin_lock_lock(_LOCK_T *); int __cygwin_lock_trylock(_LOCK_T *); void __cygwin_lock_unlock(_LOCK_T *); # 13 "/usr/include/sys/_types.h" 2 3 4
typedef long _off_t; __extension__ typedef long long _off64_t;
typedef int _ssize_t;
# 1 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h" 1 3 4 # 354 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h" 3 4 typedef unsigned int wint_t; # 25 "/usr/include/sys/_types.h" 2 3 4
typedef struct { int __count; union { wint_t __wch; unsigned char __wchb[4]; } __value; } _mbstate_t;
typedef _LOCK_T _flock_t;
typedef void *_iconv_t; # 15 "/usr/include/sys/reent.h" 2 3 4
typedef unsigned long __ULong; # 35 "/usr/include/sys/reent.h" 3 4 struct _reent;
struct _Bigint { struct _Bigint *_next; int _k, _maxwds, _sign, _wds; __ULong _x[1]; };
struct __tm { int __tm_sec; int __tm_min; int __tm_hour; int __tm_mday; int __tm_mon; int __tm_year; int __tm_wday; int __tm_yday; int __tm_isdst; };
struct _on_exit_args { void * _fnargs[32]; void * _dso_handle[32];
__ULong _fntypes;
__ULong _is_cxa; }; # 87 "/usr/include/sys/reent.h" 3 4 struct _atexit { struct _atexit *_next; int _ind;
void (*_fns[32])(void); struct _on_exit_args _on_exit_args; }; # 103 "/usr/include/sys/reent.h" 3 4 struct __sbuf { unsigned char *_base; int _size; };
typedef long _fpos_t;
typedef _off64_t _fpos64_t; # 168 "/usr/include/sys/reent.h" 3 4 struct __sFILE { unsigned char *_p; int _r; int _w; short _flags; short _file; struct __sbuf _bf; int _lbfsize;
void * _cookie;
_ssize_t __attribute__((__cdecl__)) (*_read) (struct _reent *, void *, char *, int);
_ssize_t __attribute__((__cdecl__)) (*_write) (struct _reent *, void *, const char *, int);
_fpos_t __attribute__((__cdecl__)) (*_seek) (struct _reent *, void *, _fpos_t, int); int __attribute__((__cdecl__)) (*_close) (struct _reent *, void *);
struct __sbuf _ub; unsigned char *_up; int _ur;
unsigned char _ubuf[3]; unsigned char _nbuf[1];
struct __sbuf _lb;
int _blksize; int _offset;
struct _reent *_data;
_flock_t _lock;
};
struct __sFILE64 { unsigned char *_p; int _r; int _w; short _flags; short _file; struct __sbuf _bf; int _lbfsize;
struct _reent *_data;
void * _cookie;
_ssize_t __attribute__((__cdecl__)) (*_read) (struct _reent *, void *, char *, int);
_ssize_t __attribute__((__cdecl__)) (*_write) (struct _reent *, void *, const char *, int);
_fpos_t __attribute__((__cdecl__)) (*_seek) (struct _reent *, void *, _fpos_t, int); int __attribute__((__cdecl__)) (*_close) (struct _reent *, void *);
struct __sbuf _ub; unsigned char *_up; int _ur;
unsigned char _ubuf[3]; unsigned char _nbuf[1];
struct __sbuf _lb;
int _blksize; int _flags2;
_off64_t _offset; _fpos64_t __attribute__((__cdecl__)) (*_seek64) (struct _reent *, void *, _fpos64_t, int);
_flock_t _lock;
}; typedef struct __sFILE64 __FILE;
struct _glue { struct _glue *_next; int _niobs; __FILE *_iobs; }; # 294 "/usr/include/sys/reent.h" 3 4 struct _rand48 { unsigned short _seed[3]; unsigned short _mult[3]; unsigned short _add;
}; # 569 "/usr/include/sys/reent.h" 3 4 struct _reent { int _errno;
__FILE *_stdin, *_stdout, *_stderr;
int _inc; char _emergency[25];
int _current_category; const char *_current_locale;
int __sdidinit;
void __attribute__((__cdecl__)) (*__cleanup) (struct _reent *);
struct _Bigint *_result; int _result_k; struct _Bigint *_p5s; struct _Bigint **_freelist;
int _cvtlen; char *_cvtbuf;
union { struct { unsigned int _unused_rand; char * _strtok_last; char _asctime_buf[26]; struct __tm _localtime_buf; int _gamma_signgam; __extension__ unsigned long long _rand_next; struct _rand48 _r48; _mbstate_t _mblen_state; _mbstate_t _mbtowc_state; _mbstate_t _wctomb_state; char _l64a_buf[8]; char _signal_buf[24]; int _getdate_err; _mbstate_t _mbrlen_state; _mbstate_t _mbrtowc_state; _mbstate_t _mbsrtowcs_state; _mbstate_t _wcrtomb_state; _mbstate_t _wcsrtombs_state; } _reent;
struct {
unsigned char * _nextf[30]; unsigned int _nmalloc[30]; } _unused; } _new;
struct _atexit *_atexit; struct _atexit _atexit0;
void (**(_sig_func))(int);
struct _glue __sglue; __FILE __sf[3]; }; # 803 "/usr/include/sys/reent.h" 3 4 extern struct _reent *_impure_ptr ; extern struct _reent *const _global_impure_ptr ;
void _reclaim_reent (struct _reent *);
struct _reent * __attribute__((__cdecl__)) __getreent (void); # 46 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/sys/types.h" 1 3 4 # 25 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/machine/_types.h" 1 3 4 # 26 "/usr/include/machine/_types.h" 3 4 typedef signed char __int8_t ; typedef unsigned char __uint8_t ; # 36 "/usr/include/machine/_types.h" 3 4 typedef signed short __int16_t; typedef unsigned short __uint16_t; # 46 "/usr/include/machine/_types.h" 3 4 typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; # 58 "/usr/include/machine/_types.h" 3 4 typedef signed int __int32_t; typedef unsigned int __uint32_t; # 76 "/usr/include/machine/_types.h" 3 4 typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; # 99 "/usr/include/machine/_types.h" 3 4 typedef signed long long __int64_t; typedef unsigned long long __uint64_t; # 26 "/usr/include/sys/types.h" 2 3 4 # 69 "/usr/include/sys/types.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h" 1 3 4 # 151 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h" 3 4 typedef int ptrdiff_t; # 325 "/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h" 3 4 typedef short unsigned int wchar_t; # 70 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/machine/types.h" 1 3 4 # 19 "/usr/include/machine/types.h" 3 4 typedef long int __off_t; typedef int __pid_t;
__extension__ typedef long long int __loff_t; # 71 "/usr/include/sys/types.h" 2 3 4 # 92 "/usr/include/sys/types.h" 3 4 typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long;
typedef unsigned short ushort; typedef unsigned int uint;
typedef unsigned long clock_t;
typedef long time_t;
struct timespec { time_t tv_sec; long tv_nsec; };
struct itimerspec { struct timespec it_interval; struct timespec it_value; };
typedef long daddr_t; typedef char * caddr_t; # 180 "/usr/include/sys/types.h" 3 4 typedef int pid_t;
typedef _ssize_t ssize_t; # 203 "/usr/include/sys/types.h" 3 4 typedef unsigned short nlink_t; # 225 "/usr/include/sys/types.h" 3 4 typedef long fd_mask;
typedef struct _types_fd_set { fd_mask fds_bits[(((64)+(((sizeof (fd_mask) * 8))-1))/((sizeof (fd_mask) * 8)))]; } _types_fd_set; # 256 "/usr/include/sys/types.h" 3 4 typedef unsigned long clockid_t;
typedef unsigned long timer_t;
typedef unsigned long useconds_t; typedef long suseconds_t;
# 1 "/usr/include/sys/features.h" 1 3 4 # 269 "/usr/include/sys/types.h" 2 3 4 # 373 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/cygwin/types.h" 1 3 4 # 20 "/usr/include/cygwin/types.h" 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 21 "/usr/include/cygwin/types.h" 2 3 4 # 1 "/usr/include/stdint.h" 1 3 4 # 18 "/usr/include/stdint.h" 3 4 typedef signed char int8_t; typedef short int16_t; typedef long int32_t; typedef long long int64_t;
typedef unsigned char uint8_t; typedef unsigned short uint16_t;
typedef unsigned long uint32_t;
typedef unsigned long long uint64_t;
typedef signed char int_least8_t; typedef short int_least16_t; typedef long int_least32_t; typedef long long int_least64_t;
typedef unsigned char uint_least8_t; typedef unsigned short uint_least16_t; typedef unsigned long uint_least32_t; typedef unsigned long long uint_least64_t;
typedef signed char int_fast8_t; typedef long int_fast16_t; typedef long int_fast32_t; typedef long long int_fast64_t;
typedef unsigned char uint_fast8_t; typedef unsigned long uint_fast16_t; typedef unsigned long uint_fast32_t; typedef unsigned long long uint_fast64_t;
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long long intmax_t; typedef unsigned long long uintmax_t; # 22 "/usr/include/cygwin/types.h" 2 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 23 "/usr/include/cygwin/types.h" 2 3 4
typedef struct timespec timespec_t;
typedef struct timespec timestruc_t;
typedef _off64_t off_t;
typedef __loff_t loff_t;
typedef short __dev16_t; typedef unsigned long __dev32_t;
typedef __dev32_t dev_t;
typedef long blksize_t;
typedef long __blkcnt32_t; typedef long long __blkcnt64_t;
typedef __blkcnt64_t blkcnt_t;
typedef unsigned long fsblkcnt_t;
typedef unsigned long fsfilcnt_t;
typedef unsigned short __uid16_t; typedef unsigned long __uid32_t;
typedef __uid32_t uid_t;
typedef unsigned short __gid16_t; typedef unsigned long __gid32_t;
typedef __gid32_t gid_t;
typedef unsigned long __ino32_t; typedef unsigned long long __ino64_t;
typedef __ino64_t ino_t; # 118 "/usr/include/cygwin/types.h" 3 4 typedef unsigned long id_t; # 140 "/usr/include/cygwin/types.h" 3 4 struct flock { short l_type; short l_whence; off_t l_start; off_t l_len;
pid_t l_pid;
};
typedef long long key_t;
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;
typedef void *vm_object_t;
typedef unsigned char u_int8_t;
typedef __uint16_t u_int16_t;
typedef __uint32_t u_int32_t;
typedef __uint64_t u_int64_t;
typedef __int32_t register_t;
typedef char *addr_t;
typedef unsigned mode_t;
typedef struct __pthread_t {char __dummy;} *pthread_t; typedef struct __pthread_mutex_t {char __dummy;} *pthread_mutex_t;
typedef struct __pthread_key_t {char __dummy;} *pthread_key_t; typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t; typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t; typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t; typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t;
typedef struct { pthread_mutex_t mutex; int state; } pthread_once_t; typedef struct __pthread_rwlock_t {char __dummy;} *pthread_rwlock_t; typedef struct __pthread_rwlockattr_t {char __dummy;} *pthread_rwlockattr_t; # 374 "/usr/include/sys/types.h" 2 3 4 # 47 "/usr/include/stdio.h" 2 3 4
typedef __FILE FILE;
typedef _fpos64_t fpos_t; # 65 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/sys/stdio.h" 1 3 4 # 14 "/usr/include/sys/stdio.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 15 "/usr/include/sys/stdio.h" 2 3 4 # 35 "/usr/include/sys/stdio.h" 3 4
# 66 "/usr/include/stdio.h" 2 3 4 # 170 "/usr/include/stdio.h" 3 4 FILE * __attribute__((__cdecl__)) tmpfile (void); char * __attribute__((__cdecl__)) tmpnam (char *); int __attribute__((__cdecl__)) fclose (FILE *); int __attribute__((__cdecl__)) fflush (FILE *); FILE * __attribute__((__cdecl__)) freopen (const char *, const char *, FILE *); void __attribute__((__cdecl__)) setbuf (FILE *, char *); int __attribute__((__cdecl__)) setvbuf (FILE *, char *, int, size_t); int __attribute__((__cdecl__)) fprintf (FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) fscanf (FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
int __attribute__((__cdecl__)) printf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int __attribute__((__cdecl__)) scanf (const char *, ...) __attribute__ ((__format__ (__scanf__, 1, 2)));
int __attribute__((__cdecl__)) sscanf (const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
int __attribute__((__cdecl__)) vfprintf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) vprintf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0)));
int __attribute__((__cdecl__)) vsprintf (char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) fgetc (FILE *); char * __attribute__((__cdecl__)) fgets (char *, int, FILE *); int __attribute__((__cdecl__)) fputc (int, FILE *); int __attribute__((__cdecl__)) fputs (const char *, FILE *); int __attribute__((__cdecl__)) getc (FILE *); int __attribute__((__cdecl__)) getchar (void); char * __attribute__((__cdecl__)) gets (char *); int __attribute__((__cdecl__)) putc (int, FILE *); int __attribute__((__cdecl__)) putchar (int); int __attribute__((__cdecl__)) puts (const char *); int __attribute__((__cdecl__)) ungetc (int, FILE *); size_t __attribute__((__cdecl__)) fread (void *, size_t _size, size_t _n, FILE *); size_t __attribute__((__cdecl__)) fwrite (const void * , size_t _size, size_t _n, FILE *);
int __attribute__((__cdecl__)) fgetpos (FILE *, fpos_t *);
int __attribute__((__cdecl__)) fseek (FILE *, long, int);
int __attribute__((__cdecl__)) fsetpos (FILE *, const fpos_t *);
long __attribute__((__cdecl__)) ftell ( FILE *); void __attribute__((__cdecl__)) rewind (FILE *); void __attribute__((__cdecl__)) clearerr (FILE *); int __attribute__((__cdecl__)) feof (FILE *); int __attribute__((__cdecl__)) ferror (FILE *); void __attribute__((__cdecl__)) perror (const char *);
FILE * __attribute__((__cdecl__)) fopen (const char *_name, const char *_type); int __attribute__((__cdecl__)) sprintf (char *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) remove (const char *); int __attribute__((__cdecl__)) rename (const char *, const char *);
int __attribute__((__cdecl__)) fseeko (FILE *, off_t, int); off_t __attribute__((__cdecl__)) ftello ( FILE *);
int __attribute__((__cdecl__)) asiprintf (char **, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) asprintf (char **, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) diprintf (int, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) dprintf (int, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) fcloseall (void); int __attribute__((__cdecl__)) fiprintf (FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) fiscanf (FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
int __attribute__((__cdecl__)) iprintf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int __attribute__((__cdecl__)) iscanf (const char *, ...) __attribute__ ((__format__ (__scanf__, 1, 2)));
int __attribute__((__cdecl__)) siprintf (char *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) siscanf (const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
int __attribute__((__cdecl__)) snprintf (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) sniprintf (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
char * __attribute__((__cdecl__)) tempnam (const char *, const char *); int __attribute__((__cdecl__)) vasiprintf (char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) vasprintf (char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) vdiprintf (int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) vdprintf (int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) vsniprintf (char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) vsnprintf (char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) vfiprintf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) vfiscanf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
int __attribute__((__cdecl__)) vfscanf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
int __attribute__((__cdecl__)) viprintf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0)));
int __attribute__((__cdecl__)) vsiprintf (char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) viscanf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 1, 0)));
int __attribute__((__cdecl__)) vscanf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 1, 0)));
int __attribute__((__cdecl__)) vsiscanf (const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
int __attribute__((__cdecl__)) vsscanf (const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0))); # 306 "/usr/include/stdio.h" 3 4 FILE * __attribute__((__cdecl__)) fdopen (int, const char *);
int __attribute__((__cdecl__)) fileno (FILE *); int __attribute__((__cdecl__)) getw (FILE *); int __attribute__((__cdecl__)) pclose (FILE *); FILE * __attribute__((__cdecl__)) popen (const char *, const char *); int __attribute__((__cdecl__)) putw (int, FILE *); void __attribute__((__cdecl__)) setbuffer (FILE *, char *, int); int __attribute__((__cdecl__)) setlinebuf (FILE *); int __attribute__((__cdecl__)) getc_unlocked (FILE *); int __attribute__((__cdecl__)) getchar_unlocked (void); void __attribute__((__cdecl__)) flockfile (FILE *); int __attribute__((__cdecl__)) ftrylockfile (FILE *); void __attribute__((__cdecl__)) funlockfile (FILE *); int __attribute__((__cdecl__)) putc_unlocked (int, FILE *); int __attribute__((__cdecl__)) putchar_unlocked (int);
int __attribute__((__cdecl__)) _asiprintf_r (struct _reent *, char **, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) _asprintf_r (struct _reent *, char **, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) _diprintf_r (struct _reent *, int, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) _dprintf_r (struct _reent *, int, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) _fclose_r (struct _reent *, FILE *); int __attribute__((__cdecl__)) _fcloseall_r (struct _reent *); FILE * __attribute__((__cdecl__)) _fdopen_r (struct _reent *, int, const char *); int __attribute__((__cdecl__)) _fflush_r (struct _reent *, FILE *); char * __attribute__((__cdecl__)) _fgets_r (struct _reent *, char *, int, FILE *); int __attribute__((__cdecl__)) _fiprintf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) _fiscanf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));
FILE * __attribute__((__cdecl__)) _fopen_r (struct _reent *, const char *, const char *); int __attribute__((__cdecl__)) _fprintf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) _fputc_r (struct _reent *, int, FILE *); int __attribute__((__cdecl__)) _fputs_r (struct _reent *, const char *, FILE *); size_t __attribute__((__cdecl__)) _fread_r (struct _reent *, void *, size_t _size, size_t _n, FILE *); int __attribute__((__cdecl__)) _fscanf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));
int __attribute__((__cdecl__)) _fseek_r (struct _reent *, FILE *, long, int); long __attribute__((__cdecl__)) _ftell_r (struct _reent *, FILE *); size_t __attribute__((__cdecl__)) _fwrite_r (struct _reent *, const void * , size_t _size, size_t _n, FILE *); int __attribute__((__cdecl__)) _getc_r (struct _reent *, FILE *); int __attribute__((__cdecl__)) _getc_unlocked_r (struct _reent *, FILE *); int __attribute__((__cdecl__)) _getchar_r (struct _reent *); int __attribute__((__cdecl__)) _getchar_unlocked_r (struct _reent *); char * __attribute__((__cdecl__)) _gets_r (struct _reent *, char *); int __attribute__((__cdecl__)) _iprintf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) _iscanf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
int __attribute__((__cdecl__)) _mkstemp_r (struct _reent *, char *); char * __attribute__((__cdecl__)) _mktemp_r (struct _reent *, char *); void __attribute__((__cdecl__)) _perror_r (struct _reent *, const char *); int __attribute__((__cdecl__)) _printf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
int __attribute__((__cdecl__)) _putc_r (struct _reent *, int, FILE *); int __attribute__((__cdecl__)) _putc_unlocked_r (struct _reent *, int, FILE *); int __attribute__((__cdecl__)) _putchar_unlocked_r (struct _reent *, int); int __attribute__((__cdecl__)) _putchar_r (struct _reent *, int); int __attribute__((__cdecl__)) _puts_r (struct _reent *, const char *); int __attribute__((__cdecl__)) _remove_r (struct _reent *, const char *); int __attribute__((__cdecl__)) _rename_r (struct _reent *, const char *_old, const char *_new);
int __attribute__((__cdecl__)) _scanf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));
int __attribute__((__cdecl__)) _siprintf_r (struct _reent *, char *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) _siscanf_r (struct _reent *, const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));
int __attribute__((__cdecl__)) _sniprintf_r (struct _reent *, char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));
int __attribute__((__cdecl__)) _snprintf_r (struct _reent *, char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));
int __attribute__((__cdecl__)) _sprintf_r (struct _reent *, char *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
int __attribute__((__cdecl__)) _sscanf_r (struct _reent *, const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));
char * __attribute__((__cdecl__)) _tempnam_r (struct _reent *, const char *, const char *); FILE * __attribute__((__cdecl__)) _tmpfile_r (struct _reent *); char * __attribute__((__cdecl__)) _tmpnam_r (struct _reent *, char *); int __attribute__((__cdecl__)) _ungetc_r (struct _reent *, int, FILE *); int __attribute__((__cdecl__)) _vasiprintf_r (struct _reent *, char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) _vasprintf_r (struct _reent *, char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) _vdiprintf_r (struct _reent *, int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) _vdprintf_r (struct _reent *, int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) _vfiprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) _vfprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) _viprintf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) _vprintf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
int __attribute__((__cdecl__)) _vsiprintf_r (struct _reent *, char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) _vsprintf_r (struct _reent *, char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));
int __attribute__((__cdecl__)) _vsniprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));
int __attribute__((__cdecl__)) _vsnprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));
int __attribute__((__cdecl__)) _vfiscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));
int __attribute__((__cdecl__)) _vfscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));
int __attribute__((__cdecl__)) _viscanf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
int __attribute__((__cdecl__)) _vscanf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
int __attribute__((__cdecl__)) _vsscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));
int __attribute__((__cdecl__)) _vsiscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));
ssize_t __attribute__((__cdecl__)) __getdelim (char **, size_t *, int, FILE *); ssize_t __attribute__((__cdecl__)) __getline (char **, size_t *, FILE *); # 460 "/usr/include/stdio.h" 3 4 int __attribute__((__cdecl__)) __srget_r (struct _reent *, FILE *); int __attribute__((__cdecl__)) __swbuf_r (struct _reent *, int, FILE *);
FILE *__attribute__((__cdecl__)) funopen (const void * _cookie, int (*readfn)(void * _cookie, char *_buf, int _n), int (*writefn)(void * _cookie, const char *_buf, int _n), fpos_t (*seekfn)(void * _cookie, fpos_t _off, int _whence), int (*closefn)(void * _cookie)); # 516 "/usr/include/stdio.h" 3 4 extern __inline__ __attribute__ ((__always_inline__)) int __sgetc_r(struct _reent *__ptr, FILE *__p) { int __c = (--(__p)->_r < 0 ? __srget_r(__ptr, __p) : (int)(*(__p)->_p++)); if ((__p->_flags & 0x4000) && (__c == '\r')) { int __c2 = (--(__p)->_r < 0 ? __srget_r(__ptr, __p) : (int)(*(__p)->_p++)); if (__c2 == '\n') __c = __c2; else ungetc(__c2, __p); } return __c; } # 598 "/usr/include/stdio.h" 3 4
# 2 "test.c" 2
int main (void) { printf("hello!"); return 0; }
--
--------------------------------------------- Paul Loy pa...@keteracel.com http://www.keteracel.com/paul







