#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <ctype.h>
#include <fcntl.h>
#include <string.h>
#include <dirent.h>
#include <setjmp.h>
#include <glib.h>
#include <stdarg.h>
#include <regex.h>
#include <zlib.h>
Go to the source code of this file.
Defines | |
| #define | VA_COPY(dest, src) (dest) = (src) |
| #define | SRC_PREFIX "src/" |
| Common prefix to remove in filenames. | |
| #define | _WHERE_ __FILE__ |
| #define | G_FREE_NULL(p) |
| #define | RCSID(x) static const char rcsid[] = "@(#) " x |
| #define | HAVE_GCC(major, minor) 0 |
| #define | WARN_UNUSED_RESULT |
| #define | WARN_NEED_SENTINEL |
| #define | CMP(a, b) ((a) == (b) ? 0 : (a) > (b) ? 1 : (-1)) |
| #define | STATIC_ASSERT(x) do { switch (0) { case ((x) ? 1 : 0): case 0: break; } } while(0) |
| STATIC_ASSERT() can be used to verify conditions at compile-time e.g. | |
| #define | GTA_VERSION 0 |
| #define | GTA_SUBVERSION 96 |
| #define | GTA_PATCHLEVEL 0 |
| #define | GTA_REVISION "unstable" |
| unstable, beta, stable | |
| #define | GTA_REVCHAR "u" |
| u - unstable, b - beta, none - stable | |
| #define | GTA_RELEASE "2005-06-09" |
| ISO 8601 format YYYY-MM-DD. | |
| #define | GTA_WEBSITE "http://gtk-gnutella.sourceforge.net/" |
| #define | GTA_INTERFACE "X11" |
| #define | xstr(x) STRINGIFY(x) |
| #define | GTA_VERSION_NUMBER xstr(GTA_VERSION) "." xstr(GTA_SUBVERSION) GTA_REVCHAR |
| #define | GTA_PORT 6346 |
| Default "standard" port. | |
| #define | MAX_HOSTLEN 256 |
| Max length for FQDN host. | |
| #define | SHA1_BASE32_SIZE 32 |
| 160 bits in base32 representation | |
| #define | SHA1_RAW_SIZE 20 |
| 160 bits in binary representation | |
| #define | g_snprintf DONT_CALL_g_snprintf |
| #define | g_vsnprintf DONT_CALL_g_vsnprintf |
| #define | textdomain(String) (String) |
| #define | gettext(String) (String) |
| #define | dgettext(Domain, Message) (Message) |
| #define | dcgettext(Domain, Message, Type) (Message) |
| #define | bindtextdomain(Domain, Directory) (Domain) |
| #define | ngettext(Single, Plural, Number) ((Number) == 1 ? (Single) : (Plural)) |
| #define | _(String) (String) |
| #define | N_(String) (String) |
| #define | Q_(String) g_strip_context ((String), (String)) |
| #define | NG_(Single, Plural, Number) ngettext_((Single), (Plural), (Number)) |
Typedefs | |
| typedef guint64 | filesize_t |
| typedef gboolean(* | reclaim_fd_t )(void) |
Functions | |
| static const gchar * | ngettext_ (const gchar *msg1, const gchar *msg2, gulong n) G_GNUC_FORMAT(1) G_GNUC_FORMAT(2) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: do { \ if (p) { \ g_free(p); \ p = NULL; \ } \ } while (0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Default "standard" port.
|
|
|
ISO 8601 format YYYY-MM-DD.
|
|
|
u - unstable, b - beta, none - stable
|
|
|
unstable, beta, stable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Max length for FQDN host.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 bits in base32 representation
|
|
|
160 bits in binary representation
|
|
|
Common prefix to remove in filenames.
|
|
|
STATIC_ASSERT() can be used to verify conditions at compile-time e.g. , that an array has a minimum size. This is better than a run-time assertion because the condition is checked even if the code would seldomly or never reached at run-time. However, this can only be used for static conditions which can be verified at compile-time. N.B.: The trick is using a switch case, if the term is false there are two cases for zero - which is invalid C. This cannot be used outside a function. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
1.4.2