#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 <sys/mman.h>
#include <glib.h>
#include <stdarg.h>
#include <regex.h>
#include <zlib.h>
Go to the source code of this file.
Defines | |
#define | GTA_VERSION 0 /**< major version */ |
major version | |
#define | GTA_SUBVERSION 96 /**< minor version */ |
minor version | |
#define | GTA_PATCHLEVEL 1 /**< patch level or teeny version */ |
patch level or teeny version | |
#define | GTA_REVISION "unstable" /**< unstable, beta, stable */ |
unstable, beta, stable | |
#define | GTA_REVCHAR "u" /**< u - unstable, b - beta, none - stable */ |
u - unstable, b - beta, none - stable | |
#define | GTA_RELEASE "2006-02-03" /**< ISO 8601 format YYYY-MM-DD */ |
ISO 8601 format YYYY-MM-DD. | |
#define | GTA_WEBSITE "http://gtk-gnutella.sourceforge.net/" |
#define | GTA_INTERFACE "X11" |
#define | MAP_FAILED ((void *) -1) |
#define | MAX_IOV_COUNT 16 /**< Unknown, use required minimum */ |
Unknown, use required minimum. | |
#define | VA_COPY(dest, src) (dest) = (src) |
#define | STDIN_FILENO 0 |
#define | STDOUT_FILENO 1 |
#define | STDERR_FILENO 2 |
#define | SRC_PREFIX "src/" /**< Common prefix to remove in filenames */ |
Common prefix to remove in filenames. | |
#define | _WHERE_ __FILE__ |
#define | PACKAGE_EXTRA_SOURCE_DIR PACKAGE_SOURCE_DIR G_DIR_SEPARATOR_S "extra_files" |
#define | G_FREE_NULL(p) |
Calls g_free() and sets the pointer to NULL afterwards. | |
#define | RCSID(x) |
Stores a RCS ID tag inside the object file. | |
#define | HAVE_GCC(major, minor) 0 |
#define | NON_NULL_PARAM(x) |
#define | PRINTF_FUNC_PTR(x, y) |
This is the same G_GNUC_FORMAT() but for function pointers. | |
#define | WARN_UNUSED_RESULT |
#define | WARN_NEED_SENTINEL |
#define | G_LIKELY(x) (x) |
#define | G_UNLIKELY(x) (x) |
#define | CMP(a, b) ((a) == (b) ? 0 : (a) > (b) ? 1 : (-1)) |
CMP() returns the sign of a-b, that means -1, 0, or 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. | |
#define | GTA_VERSION_NUMBER |
#define | GTA_PORT 6346 /**< Default "standard" port */ |
Default "standard" port. | |
#define | MAX_HOSTLEN 256 /**< Max length for FQDN host */ |
Max length for FQDN host. | |
#define | SHA1_BASE32_SIZE 32 /**< 160 bits in base32 representation */ |
160 bits in base32 representation | |
#define | SHA1_RAW_SIZE 20 /**< 160 bits in binary representation */ |
160 bits in binary representation | |
#define | BITPRINT_BASE32_SIZE |
352 bits in base32 representation includes dot between sha1 and tiger | |
#define | BITPRINT_RAW_SIZE 44 /**< 352 bits in binary representation */ |
352 bits in binary representation | |
#define | g_snprintf DONT_CALL_g_snprintf /**< Use gm_snprintf instead */ |
Use gm_snprintf instead. | |
#define | g_vsnprintf DONT_CALL_g_vsnprintf /**< Use gm_vsnprintf instead */ |
Use gm_vsnprintf instead. | |
#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)) |
Short-hand for ngettext(). | |
Typedefs | |
typedef guint64 | filesize_t |
Use filesize_t to hold filesizes. | |
typedef gboolean(* | reclaim_fd_t )(void) |
Functions | |
const gchar * | ngettext_ (const gchar *msg1, const gchar *msg2, gulong n) G_GNUC_FORMAT(1) G_GNUC_FORMAT(2) |
|
|
|
|
|
|
|
Value: 72
|
|
352 bits in binary representation
|
|
CMP() returns the sign of a-b, that means -1, 0, or 1.
|
|
|
|
|
|
Value: G_STMT_START { \
if (p) { \
g_free(p); \
p = NULL; \
} \
} G_STMT_END
You should use this instead of a bare g_free() to prevent double-free bugs and dangling pointers. |
|
|
|
Use gm_snprintf instead.
|
|
|
|
Use gm_vsnprintf instead.
|
|
|
|
|
|
patch level or teeny version
|
|
Default "standard" port.
|
|
ISO 8601 format YYYY-MM-DD.
|
|
u - unstable, b - beta, none - stable
|
|
unstable, beta, stable
|
|
minor version
|
|
major version
|
|
Value: STRINGIFY(GTA_VERSION) "." \ STRINGIFY(GTA_SUBVERSION) "." \ STRINGIFY(GTA_PATCHLEVEL) GTA_REVCHAR |
|
|
|
|
|
|
|
Max length for FQDN host.
|
|
Unknown, use required minimum.
|
|
|
|
Short-hand for ngettext().
|
|
|
|
|
|
|
|
This is the same G_GNUC_FORMAT() but for function pointers. Older versions of GCC do not allow function attributes for function pointers. |
|
|
|
Value: static inline const char * \ get_rcsid(void) \ { \ static const char rcsid[] = "@(#) " x; \ const char *s = rcsid; \ while (*s != '\0') { \ if (*s++ == '$') \ break; \ } \ return s; \ } Every .c source file should use this macro once as `RCSID("<dollar>Id$")' on top. The ID tag is automagically updated each time the file is committed to the CVS repository. The RCS IDs can be looked up from the compiled binary with e.g. `what', `ident' or `strings'. See also rcs(1) and ident(1). |
|
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. For example, it can be used to ensure that an array has a minimum or exact 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use filesize_t to hold filesizes.
|
|
|
|
|