/*++ /* NAME /* compat_level 3 /* SUMMARY /* compatibility_level support /* SYNOPSIS /* #include <compat_level.h> /* /* void compat_level_relop_register(void) /* /* long compat_level_from_string( /* const char *str, /* void PRINTFLIKE(1, 2) (*msg_fn)(const char *,...)) /* /* long compat_level_from_numbers( /* long major, /* long minor, /* long patch, /* void PRINTFLIKE(1, 2) (*msg_fn)(const char *,...)) /* /* const char *compat_level_to_string( /* long compat_level, /* void PRINTFLIKE(1, 2) (*msg_fn)(const char *,...)) /* AUXULIARY FUNCTIONS /* long compat_level_from_major_minor( /* long major, /* long minor, /* void PRINTFLIKE(1, 2) (*msg_fn)(const char *,...)) /* /* long compat_level_from_major( /* long major, /* void PRINTFLIKE(1, 2) (*msg_fn)(const char *,...)) /* DESCRIPTION /* This module supports compatibility level syntax with /* "major.minor.patch" but will also accept the shorter forms /* "major.minor" and "major" (missing members default to zero). /* Compatibility levels with multiple numbers cannot be compared /* as strings or as floating-point numbers (for example, "3.10" /* would be smaller than "3.9"). /* /* The major number can range from [0..2047] inclusive (11 /* bits) or more, while the minor and patch numbers can range /* from [0..1023] inclusive (10 bits). /* /* compat_level_from_string() converts a compatibility level /* from string form to numerical form for easy comparison. /* Valid input results in a non-negative result. In case of /* error, compat_level_from_string() reports the problem with /* the provided function, and returns -1 if that function does /* not terminate execution. /* /* compat_level_from_numbers() creates an internal-form /* compatibility level from distinct numbers. Valid input /* results in a non-negative result. In case of error, /* compat_level_from_numbers() reports the problem with the /* provided function, and returns -1 if that function does not /* terminate execution. /* /* The functions compat_level_from_major_minor() and /* compat_level_from_major() are helpers that default the missing /* information to zeroes. /* /* compat_level_to_string() converts a compatibility level /* from numerical form to canonical string form. Valid input /* results in a non-null result. In case of error, /* compat_level_to_string() reports the problem with the /* provided function, and returns a null pointer if that /* function does not terminate execution. /* /* compat_level_relop_register() registers a mac_expand() callback /* that registers operators such as <=level, >level, that compare /* compatibility levels. This function should be called before /* loading parameter settings from main.cf. /* DIAGNOSTICS /* info, .., panic: bad compatibility_level syntax. /* BUGS /* The patch and minor fields range from 0..1023 (10 bits) while /* the major field ranges from 0..COMPAT_MAJOR_SHIFT47 or more /* (11 bits or more). /* /* This would be a great use case for functions returning /* StatusOr<compat_level_t> or StatusOr<string>, but is it a bit /* late for a port to C++. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.