<commit_before>/* $chaos: defines.h,v 1.14 2002/10/24 21:35:39 per Exp $ */
/* Author: <NAME> <<EMAIL>> 
           <NAME> <<EMAIL>> */

/* Copyright 2002 chaos development. */
/* Use freely under the terms listed in the file LICENSE. */

/**
 * @file                storm/defines.h
 * @brief               Generic storm defines. 
 */

#ifndef __STORM_DEFINES_H__
#define __STORM_DEFINES_H__

#undef NULL
/**
 * @brief               A pointer to the lowest accessible memory address.
 *
 * This address is not mapped. Therefore, it may be used for
 * specifying an "empty pointer", pointing to nothing -- a very common
 * programming practice.
 */
#define NULL            ((void *) 0)

/**
 * @brief               A true boolean value.
 */
#define TRUE            (1 == 1)

/**
 * @brief               A false boolean value.
 */
#define FALSE           (!TRUE)

/**
 * @brief               The minimum of the two values.
 */
#define MIN(a,b)        ((a) < (b) ? (a) : (b))

/**
 * @brief               The maximum of the two values.
 */
#define MAX(a,b)        ((a) > (b) ? (a) : (b))

/**
 * @brief               A kibibyte.
 */
#define KIB             (1024U)

/**
 * @brief               A mibibyte.
 */
#define MIB             (1024U * KIB)

/**
 * @brief               A gibibyte.
 */
#define GIB             (1024U * MIB)

/**
 * @brief               The stack base for the process.
 */
#define STACK_BASE      0

/**
 * @brief               Use this define to attribute that the function
 *                      will not ever return. 
 */
#define NORETURN        __attribute__ ((noreturn))

/**
 * @brief               Use this define to tell the compiler that an
 *                      argument or variable is not used. 
 */
#define UNUSED          __attribute__ ((unused))

/**
 * @brief               Use this define to mark a function as deprecated.
 */
#define DEPRECATED      __attribute__ ((deprecated))

/**
 * @brief               Use this define to tell the compiler that a
 *                      structure should be packed.
 * 
 * A packed structure uses no padding, which may otherwise be put in
 * by the compiler to get a certain alignment on the data. For some
 * structures that are locked to a specific format (for example a
 * binary file format), such practices are directly harmful and you
 * need to mark such structures as PACKED for the code to work
 * properly..
 */
#define PACKED          __attribute__ ((packed))

/**
 * @brief               The maximum number of servers to start at boot time. 
 */
#define MAX_STARTUP_SERVERS \
                        (32)

/**
 * @brief               The length of a service name.
 */
#define SERVICE_NAME_LENGTH \
                        (32)

/**
 * @brief               The length of a vendor name.
 */
#define SERVICE_VENDOR_LENGTH \
                        (32)

/**
 * @brief               The length of a model name.
 */
#define SERVICE_MODEL_LENGTH \
                        (32)

/**
 * @brief               The length of a unique service ID.
 */<commit_msg>Changed SERVICE_NAME_LENGTH to SERVICE_PROTOCOL_NAME_LENGTH. New define: SERVICE_DEVICE_VENDOR_LENGTH.<commit_after>/* $chaos: defines.h,v 1.14 2002/10/24 21:35:39 per Exp $ */
/* Author: <NAME> <<EMAIL>> 
           <NAME> <<EMAIL>> */

/* Copyright 2002 chaos development. */
/* Use freely under the terms listed in the file LICENSE. */

/**
 * @file                storm/defines.h
 * @brief               Generic storm defines. 
 */

#ifndef __STORM_DEFINES_H__
#define __STORM_DEFINES_H__

#undef NULL
/**
 * @brief               A pointer to the lowest accessible memory address.
 *
 * This address is not mapped. Therefore, it may be used for
 * specifying an "empty pointer", pointing to nothing -- a very common
 * programming practice.
 */
#define NULL            ((void *) 0)

/**
 * @brief               A true boolean value.
 */
#define TRUE            (1 == 1)

/**
 * @brief               A false boolean value.
 */
#define FALSE           (!TRUE)

/**
 * @brief               The minimum of the two values.
 */
#define MIN(a,b)        ((a) < (b) ? (a) : (b))

/**
 * @brief               The maximum of the two values.
 */
#define MAX(a,b)        ((a) > (b) ? (a) : (b))

/**
 * @brief               A kibibyte.
 */
#define KIB             (1024U)

/**
 * @brief               A mibibyte.
 */
#define MIB             (1024U * KIB)

/**
 * @brief               A gibibyte.
 */
#define GIB             (1024U * MIB)

/**
 * @brief               The stack base for the process.
 */
#define STACK_BASE      0

/**
 * @brief               Use this define to attribute that the function
 *                      will not ever return. 
 */
#define NORETURN        __attribute__ ((noreturn))

/**
 * @brief               Use this define to tell the compiler that an
 *                      argument or variable is not used. 
 */
#define UNUSED          __attribute__ ((unused))

/**
 * @brief               Use this define to mark a function as deprecated.
 */
#define DEPRECATED      __attribute__ ((deprecated))

/**
 * @brief               Use this define to tell the compiler that a
 *                      structure should be packed.
 * 
 * A packed structure uses no padding, which may otherwise be put in
 * by the compiler to get a certain alignment on the data. For some
 * structures that are locked to a specific format (for example a
 * binary file format), such practices are directly harmful and you
 * need to mark such structures as PACKED for the code to work
 * properly..
 */
#define PACKED          __attribute__ ((packed))

/**
 * @brief               The maximum number of servers to start at boot time. 
 */
#define MAX_STARTUP_SERVERS \
                        (32)

/**
 * @brief               The length of a protocol name.
 */
#define SERVICE_PROTOCOL_NAME_LENGTH \
                        (32)

/**
 * @brief               The length of a device vendor name.
 */
#define SERVICE_DEVICE_VENDOR_LENGTH \
                        (32)

/**
 * @brief               The length of a service vendor name.
 */
#define SERVICE_VENDOR_LENGTH \
                        (32)

/**
 * @brief               The length of a model name.
 */
#define SERVICE_MODEL_LENGTH \
                        (32)

/**
 * @brief               The length of a unique service ID.
 */
{'fraction_non_alphanumeric': 0.10641998734977862, 'fraction_numerical': 0.01454775458570525, 'mean_word_length': 1.6597981497056349, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2991462', 'n_tokens_mistral': 1832, 'n_tokens_neox': 1743, 'n_words': 674}