; ltrace.conf
;
; ~/.ltrace.conf will also be read, if it exists. The -F option may be
; used to suppress the automatic inclusion of both this file and
; ~/.ltrace.conf, and load a different config file or config files
; instead.
;
; See ltrace.conf(5) for description of syntax of this file.

; arpa/inet.h
typedef in_addr = struct(hex(uint));
int inet_aton(string, +in_addr*);
hex(uint) inet_addr(string);
hex(uint) inet_network(string);
string inet_ntoa(in_addr);
in_addr inet_makeaddr(hex(int), hex(int));
hex(uint) inet_lnaof(in_addr);
hex(uint) inet_netof(in_addr);

; bfd.h
void bfd_init();
int bfd_set_default_target(string);
addr bfd_scan_vma(string, addr, int);
addr bfd_openr(string,string);
int bfd_check_format(addr,int);

; ctype.h
char tolower(char);
char toupper(char);
addr __ctype_b_loc();
addr __ctype_tolower_loc();
addr __ctype_toupper_loc();
ulong __ctype_get_mb_cur_max();

; curses.h
int waddch(addr, char);
int mvprintw(int, int, format);
int wmove(addr, int, int);
int waddnstr(addr, string, int);
string tgoto(string, int, int);

; dirent.h
int closedir(addr);
addr opendir(string);
addr readdir(addr);
addr readdir64(addr);

; dlfcn.h
addr  dlopen(string, int);
string dlerror();
addr  dlsym(addr, string);
int dlclose(addr);

; errno.h
addr __errno_location();

; fcntl.h
int open(string,int,octal);		; WARNING: 3rd argument may not be there
int open64(string,int,octal);		; WARNING: 3rd argument may not be there

; fnmatch.h
int fnmatch(string, string, int);

; getopt.h
int getopt_long(int,addr,string,addr,int*);
int getopt_long_only(int,addr,string,addr,addr);

; grp.h
void endgrent();
addr getgrnam(string);
void setgrent();
addr getgrent();

; libintl.h
string __dcgettext(string,string,int);
string bindtextdomain(string, string);
string textdomain(string);

; libio.h
char _IO_getc(file);
int _IO_putc(char,file);

; locale.h
string setlocale(enum(LC_CTYPE=0, LC_NUMERIC=1, LC_TIME=2, LC_COLLATE=3, LC_MONETARY=4, LC_MESSAGES=5, LC_ALL=6, LC_PAPER=7, LC_NAME=8, LC_ADDRESS=9, LC_TELEPHONE=10, LC_MEASUREMENT=11, LC_IDENTIFICATION=12), string);

; mcheck.h
void mtrace();
void muntrace();

; mqueue.h
int mq_open(string, int, octal, addr);  ; WARNING: 3rd and 4th arguments may not be there
int mq_close(int);
int mq_unlink(string);
int mq_getattr(int, addr);
int mq_setattr(int, addr, addr);
int mq_notify(int, addr);
int mq_send(int, string3, ulong, uint);
int mq_timedsend(int, string3, ulong, uint, addr);
long mq_receive(int, +string0, ulong, addr);
long mq_timedreceive(int, +string0, ulong, addr, addr);

; netdb.h
void endhostent();
void endnetent();
void endnetgrent();
void endprotoent();
void endservent();
void freeaddrinfo(addr);
string gai_strerror(int);
int getaddrinfo(string, string, addr, addr);
addr gethostbyaddr(string, uint, int);
addr gethostbyname(string);
addr gethostent();
int getnameinfo(addr, uint, string, uint, string, uint, uint);
addr getnetbyaddr(uint, int);
addr getnetbyname(string);
addr getnetent();
int getnetgrent(addr, addr, addr);
addr getprotobyname(string);
addr getprotobynumber(int);
addr getprotoent();
addr getservbyname(string, string);
addr getservbyport(int, string);
addr getservent();
void herror(string);
string hstrerror(int);
int rcmd(addr, ushort, string, string, string, addr);
int rcmd_af(addr, ushort, string, string, string, addr, int);
int rexec(addr, int, string, string, string, addr);
int rexec_af(addr, int, string, string, string, addr, int);
int rresvport (addr);
int rresvport_af (addr, int);
int ruserok(string, int, string, string);
int ruserok_af(string, int, string, string, int);
void sethostent(int);
void setnetent(int);
int setnetgrent(string);
void setprotoent(int);
void setservent(int);

; netinet/in.h
uint ntohs(uint);

; pcap.h
string pcap_lookupdev(addr);
addr pcap_open_live(string, int, int, int, addr);
int pcap_snapshot(addr);
int pcap_lookupnet(string, addr, addr, addr);
int pcap_compile(addr, addr, string, int, addr);

; pwd.h
string getpass(string);
void endpwent();
addr getpwnam(string);
void setpwent();

; readline/readline.h
string readline(string);

; signal.h
typedef signum = enum(SIGHUP=1, SIGINT=2, SIGQUIT=3, SIGILL=4, SIGTRAP=5, SIGABRT=6, SIGBUS=7, SIGFPE=8, SIGKILL=9, SIGUSR1=10, SIGSEGV=11, SIGUSR2=12, SIGPIPE=13, SIGALRM=14, SIGTERM=15, SIGSTKFLT=16, SIGCHLD=17, SIGCONT=18, SIGSTOP=19, SIGTSTP=20, SIGTTIN=21, SIGTTOU=22, SIGURG=23, SIGXCPU=24, SIGXFSZ=25, SIGVTALRM=26, SIGPROF=27, SIGWINCH=28, SIGIO=29, SIGPWR=30, SIGSYS=31, SIGRTMIN_0=32, SIGRTMIN_1=33, SIGRTMIN_2=34, SIGRTMIN_3=35, SIGRTMIN_4=36, SIGRTMIN_5=37, SIGRTMIN_6=38, SIGRTMIN_7=39, SIGRTMIN_8=40, SIGRTMIN_9=41, SIGRTMIN_10=42, SIGRTMIN_11=43, SIGRTMIN_12=44, SIGRTMIN_13=45, SIGRTMIN_14=46, SIGRTMIN_15=47, SIGRTMIN_16=48, SIGRTMIN_17=49, SIGRTMIN_18=50, SIGRTMIN_19=51, SIGRTMIN_20=52, SIGRTMIN_21=53, SIGRTMIN_22=54, SIGRTMIN_23=55, SIGRTMIN_24=56, SIGRTMIN_25=57, SIGRTMIN_26=58, SIGRTMIN_27=59, SIGRTMIN_28=60, SIGRTMIN_29=61, SIGRTMIN_30=62, SIGRTMIN_31=63);
typedef sigset_t = bitvec(ulong);
; elm3 should be flags
typedef sigaction = struct(addr, sigset_t, hex(int), addr);
int kill(int, signum);
int sigemptyset(+sigset_t*);
int sigaddset(+sigset_t*, signum);
int sigdelset(+sigset_t*, signum);
int sigfillset(+sigset_t*);
int sigismember(sigset_t*, signum);
addr signal(signum,addr);
int sigaction(signum, sigaction*, +sigaction*);
int sigprocmask(enum(SIG_BLOCK=1, SIG_UNBLOCK=2, SIG_SETMASK=3), sigset_t*, +sigset_t*);
int sigpending(+sigset_t*);
int sigsuspend(sigset_t*);
int sigisemptyset(sigset_t*);
int sigorset(+sigset_t*, sigset_t*, sigset_t*);
int sigandset(+sigset_t*, sigset_t*, sigset_t*);

; stdio.h
int fclose(file);
int feof(file);
int ferror(file);
int fflush(file);
char fgetc(file);
addr fgets(+string, int, file);
int fileno(file);
file fopen(string,string);
file fopen64(string,string);
int fprintf(file,format);
int fputc(char,file);
int fputs(string,file);
ulong fread(addr,ulong,ulong,file);
ulong fread_unlocked(addr,ulong,ulong,file);
ulong fwrite(string,ulong,ulong,file);
ulong fwrite_unlocked(string,ulong,ulong,file);
int pclose(addr);
void perror(string);
addr popen(string, string);
int printf(format);
int puts(string);
int remove(string);
int snprintf(+string2,ulong,format);
int sprintf(+string,format);
string tempnam(string,string);
int vfprintf(file,string,addr);
int vsnprintf(+string2,ulong,string,addr);
int setvbuf(file,addr,int,ulong);
void setbuf(file,addr);
void setbuffer(file,addr,ulong);
void setlinebuf(file);
int rename(string,string);

; stdlib.h
long __strtol_internal(string,addr,int);
ulong __strtoul_internal(string,addr,int);
int atexit(addr);
addr bsearch(string, addr, ulong, ulong, addr);
addr calloc(ulong, ulong);
void exit(int);
void free(addr);
string getenv(string);
int putenv(string);
int setenv(string,string,int);
void unsetenv(string);
addr malloc(ulong);
void qsort(addr,ulong,ulong,addr);
int random();
addr realloc(addr,ulong);
void srandom(uint);
int system(string);

; string.h
void bcopy(addr,addr,ulong);
void bzero(addr,ulong);
string basename(string);
string index(string,char);
addr memchr(string,char,ulong);
addr memcpy(addr,string(array(char, arg3)*),ulong);
addr memmove(addr,string(array(char, arg3)*),ulong);
addr memset(addr,char,long);
string rindex(string,char);
addr stpcpy(addr,string);
int strcasecmp(string, string);
string strcat(string, string);
string strchr(string,char);
int strcoll(string,string);
ulong strlen(string);
int strcmp(string,string);
addr strcpy(addr,string);
addr strdup(string);
string strerror(int);
int strncmp(string,string,ulong);
addr strncpy(addr,string3,ulong);
string strrchr(string,char);
string strsep(addr,string);
ulong strspn(string,string);
ulong strcspn(string,string);
string strstr(string,string);
string strtok(string, string);

; sys/ioctl.h
int ioctl(int, int, addr);

; sys/socket.h
int socket(int,int,int);

; sys/stat.h
int __fxstat(int,int,addr);
int __xstat(int,string,addr);
int __lxstat(int,string,addr);
int __fxstat64(int,int,addr);
int __xstat64(int,string,addr);
int __lxstat64(int,string,addr);
int chmod(string,octal);
int fchmod(int,octal);
int mkfifo(string,octal);
octal umask(octal);

; sys/utsname.h
int uname(addr);

; sys/vfs.h
int statfs(string,addr);

; syslog.h
void closelog();
void openlog(string,int,int);
void syslog(int,format);

; term.h
int tputs(string, int, addr);

; termios.h
int tcgetattr(int,addr);
int tcsetattr(int,int,addr);

; time.h
string ctime(addr);
int gettimeofday(addr, addr);
addr gmtime(addr);
addr localtime(addr);
ulong strftime(+string2,ulong,string,addr);
long time(addr);

; unistd.h
void _exit(int);
int access(string, int);
uint alarm(uint);
int chdir(string);
int chown(string,int,int);
int close(int);
string crypt(string,string);
int dup2(int,int);
int execlp(string,string,addr,addr,addr);
int execv(string,addr);
int fchdir(int);
int fork();
int ftruncate(int,ulong);
string2 getcwd(addr,ulong);
int getdomainname(+string2,ulong);
int geteuid();
int getegid();
int getgid();
int gethostname(+string2,ulong);
string getlogin();
int getopt(int,addr,string);
int getpid();
int getppid();
int getuid();
int getpgrp();
int setpgrp();
int getpgid(int);
int isatty(int);
int link(string,string);
int mkdir(string,octal);
long read(int, +string[retval], ulong);
int rmdir(string);
int seteuid(uint);
int setgid(int);
int sethostname(+string2,ulong);
int setpgid(int,int);
int setreuid(uint, uint);
int setuid(int);
uint sleep(uint);
int symlink(string,string);
int sync();
int truncate(string,ulong);
string ttyname(int);
int unlink(string);
void usleep(uint);
long write(int, string3, ulong);
addr sbrk(long);
int getpagesize();
long lseek(int,long,int);
int pipe(addr);

; utmp.h
void endutent();
addr getutent();
void setutent();

; wchar.h
int fwide(addr, int);

; sys/wait.h
int wait(addr);
int waitpid(int,addr,int);

; X11/Xlib.h
void XCloseDisplay(addr);
int XMapWindow(addr,addr);
addr XOpenDisplay(string);

; sys/acl.h
int acl_add_perm(addr,uint);
int acl_calc_mask(addr);
int acl_clear_perms(addr);
int acl_copy_entry(addr,addr);
int acl_copy_ext(addr,addr,int);
addr acl_copy_int(addr);
int acl_create_entry(addr,addr);
int acl_delete_def_file(string);
int acl_delete_entry(addr,addr);
int acl_delete_perm(addr,uint);
addr acl_dup(addr);
int acl_free(addr);
addr acl_from_text(string);
int acl_get_entry(addr,int,addr);
addr acl_get_fd(int);
addr acl_get_file(string,int);
int acl_get_permset(addr,addr);
addr acl_get_qualifier(addr);
int acl_get_tag_type(addr,addr);
addr acl_init(int);
int acl_set_fd(int,addr);
int acl_set_file(string,int,addr);
int acl_set_permset(addr,addr);
int acl_set_qualifier(addr,addr);
int acl_set_tag_type(addr,int);
int acl_size(addr);
string acl_to_text(addr,addr);
int acl_valid(addr);

; acl/libacl.h
int acl_check(addr,addr);
int acl_cmp(addr,addr);
int acl_entries(addr);
int acl_equiv_mode(addr,addr);
string acl_error(int);
int acl_extended_fd(int);
int acl_extended_file(string);
addr acl_from_mode(octal);
int acl_get_perm(addr,uint);
string acl_to_any_text(addr,string,char,int);

; other symbols not included above
long a64l(string);
string l64a(long);
void abort();
int abs(int);
long labs(long);

typedef mntent = struct(string, string, string, string, int, int);
int addmntent(file, mntent*);
int endmntent(file);
int __endmntent(file);
file setmntent(string,string);
file __setmntent(string,string);
mntent *getmntent(addr);
mntent *getmntent_r(file, +mntent*, string, int);
mntent *__getmntent_r(file, +mntent*, string, int);
string hasmntopt(mntent*, string);

; SYSCALLS
addr  SYS_brk(addr);
int   SYS_close(int);
int   SYS_execve(string,addr,addr);
void  SYS_exit(int);
void  SYS_exit_group(int);
int   SYS_fork();
int   SYS_getcwd(+string2,ulong);
int   SYS_getpid();
;addr SYS_mmap(addr,ulong,int,int,int,long);
int   SYS_munmap(addr,ulong);
int   SYS_open(string,int,octal);
int   SYS_personality(uint);
long  SYS_read(int,+string0,ulong);
int   SYS_stat(string,addr);
octal SYS_umask(octal);
int   SYS_uname(addr);
long  SYS_write(int,string3,ulong);
int   SYS_sync();
int   SYS_setxattr(string,string,addr,uint,int);
int   SYS_lsetxattr(string,string,addr,uint,int);
int   SYS_fsetxattr(int,string,addr,uint,int);
int   SYS_getxattr(string,string,addr,uint);
int   SYS_lgetxattr(string,string,addr,uint);
int   SYS_fgetxattr(int,string,addr,uint);
int   SYS_listxattr(string,addr,uint);
int   SYS_llistxattr(string,addr,uint);
int   SYS_flistxattr(int,addr,uint);
int   SYS_removexattr(string,string);
int   SYS_lremovexattr(string,string);
int   SYS_fremovexattr(int,string);
int   SYS_chdir(string);
int   SYS_fchdir(int);
int   SYS_chmod(string,octal);
int   SYS_fchmod(int,octal);
int   SYS_chown(string,int,int);
int   SYS_fchown(int,int,int);
int   SYS_lchown(string,int,int);
int   SYS_chroot(string);
int   SYS_dup(int);
int   SYS_dup2(int,int);
int   SYS_fdatasync(int);
int   SYS_fsync(int);
int   SYS_getpriority(int,int);
int   SYS_setpriority(int,int,int);
int   SYS_getrlimit(int,addr);
int   SYS_setrlimit(int,addr);
int   SYS_gettimeofday(addr,addr);
int   SYS_settimeofday(addr,addr);
int   SYS_setfsgid(int);
int   SYS_setfsuid(int);
int   SYS_getuid();
int   SYS_setuid(int);
int   SYS_getgid();
int   SYS_setgid(int);
int   SYS_getsid(int);
int   SYS_setsid(int);
int   SYS_setreuid(int,int);
int   SYS_setregid(int,int);
int   SYS_geteuid();
int   SYS_getegid();
int   SYS_setpgid(int,int);
int   SYS_getresuid(addr,addr,addr);
int   SYS_setresuid(int,int,int);
int   SYS_getresgid(addr,addr,addr);
int   SYS_setresgid(int,int,int);
int   SYS_kill(int,int);
int   SYS_link(string,string);
int   SYS_madvise(addr,ulong,int);
int   SYS_mkdir(string,octal);
int   SYS_mknod(string,octal,int);
int   SYS_msync(addr,ulong,int);
int   SYS_nice(int);
int   SYS_poll(addr,uint,int);
int   SYS_readdir(uint,addr,uint);
int   SYS_readlink(string,string,ulong);
int   SYS_reboot(int,int,int,addr);
int   SYS_rename(string,string);
int   SYS_rmdir(string);
int   SYS_sigaltstack(addr,addr);
int   SYS_statfs(string,addr);
int   SYS_fstatfs(int,addr);
int   SYS_fstat(int,addr);
int   SYS_lstat(string,addr);
int   SYS_stime(addr);
int   SYS_symlink(string, string);
int   SYS_sysinfo(addr);
int   SYS_syslog(int,string,int);
int   SYS_truncate(string,long);
int   SYS_ftruncate(int,long);
int   SYS_mount(string,string,string,ulong,addr);
int   SYS_umount(string);
int   SYS_umount2(string,int);
int   SYS_unlink(string);
int   SYS_utime(string,addr);
long  SYS_lseek(int,long,int);
addr  SYS_signal(int,addr);
int   SYS_sigaction(int,addr,addr);
int   SYS_pause();
int   SYS_sigpending(addr);
int   SYS_sigprocmask(int,addr,addr);
int   SYS_sigqueue(int,int,addr);
int   SYS_sigsuspend(addr);
int   SYS_wait(addr);
int   SYS_waitpid(int,addr,int);
ulong SYS_readv(int,addr,int);
ulong SYS_writev(int,addr,int);
int   SYS_mprotect(addr,int,int);
int   SYS_access(string,octal);
