diff options
Diffstat (limited to 'include/libnslayout/error.h')
-rw-r--r-- | include/libnslayout/error.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/include/libnslayout/error.h b/include/libnslayout/error.h index 5e7b87a..ee8a428 100644 --- a/include/libnslayout/error.h +++ b/include/libnslayout/error.h @@ -8,8 +8,8 @@ * Layout object handling */ -#ifndef nslayout_error_h_ -#define nslayout_error_h_ +#ifndef nsl_error_h_ +#define nsl_error_h_ #ifdef __cplusplus extern "C" @@ -17,27 +17,27 @@ extern "C" #endif /** - * Number of bits in an `nslayout_error` that indicate the source of the error. + * Number of bits in an `nsl_error` that indicate the source of the error. */ -#define NSLAYOUT_ERROR_PROV 8 +#define NSL_ERROR_PROV 8 /** * Libnslayout return codes * - * NSLAYOUT_OK indicates no error. + * NSL_OK indicates no error. */ -typedef enum nslayout_error { +typedef enum nsl_error { /** No error code */ - NSLAYOUT_OK = 0, + NSL_OK = 0, /** Error provenance (bits 0..7) */ - NSLAYOUT_NSLAYOUT = (1 << 0), - NSLAYOUT_LIBDOM = (1 << 1), - NSLAYOUT_LIBCSS = (1 << 2), + NSL_NSLAYOUT = (1 << 0), + NSL_LIBDOM = (1 << 1), + NSL_LIBCSS = (1 << 2), /** LibNSLayout errors (bits 8..31) */ - NSLAYOUT_NO_MEM = (1 << NSLAYOUT_ERROR_PROV) | NSLAYOUT_NSLAYOUT, -} nslayout_error; + NSL_NO_MEM = (1 << NSL_ERROR_PROV) | NSL_NSLAYOUT, +} nsl_error; /** @@ -46,9 +46,9 @@ typedef enum nslayout_error { * \param[in] err Error code to test * \return error provenance */ -static inline nslayout_error nslayout_error_provenance(nslayout_error err) +static inline nsl_error nsl_error_provenance(nsl_error err) { - return err & ((1 << NSLAYOUT_ERROR_PROV) - 1); + return err & ((1 << NSL_ERROR_PROV) - 1); } @@ -58,9 +58,9 @@ static inline nslayout_error nslayout_error_provenance(nslayout_error err) * \param[in] err Error code to test * \return true iff error is from libnslayout */ -static inline bool nslayout_error_is_layout(nslayout_error err) +static inline bool nsl_error_is_layout(nsl_error err) { - return err & NSLAYOUT_NSLAYOUT; + return err & NSL_NSLAYOUT; } @@ -70,9 +70,9 @@ static inline bool nslayout_error_is_layout(nslayout_error err) * \param[in] err Error code to test * \return true iff error is from libdom */ -static inline bool nslayout_error_is_libdom(nslayout_error err) +static inline bool nsl_error_is_libdom(nsl_error err) { - return err & NSLAYOUT_LIBDOM; + return err & NSL_LIBDOM; } /** @@ -81,9 +81,9 @@ static inline bool nslayout_error_is_libdom(nslayout_error err) * \param[in] err Error code to test * \return true iff error is from libcss */ -static inline bool nslayout_error_is_libcss(nslayout_error err) +static inline bool nsl_error_is_libcss(nsl_error err) { - return err & NSLAYOUT_LIBCSS; + return err & NSL_LIBCSS; } /** @@ -92,7 +92,7 @@ static inline bool nslayout_error_is_libcss(nslayout_error err) * \param[in] err Error code to convert * \return libnslayout error */ -static inline nslayout_error nslayout_error_to_layout(nslayout_error err) +static inline nsl_error nsl_error_to_layout(nsl_error err) { return err; } @@ -103,7 +103,7 @@ static inline nslayout_error nslayout_error_to_layout(nslayout_error err) * \param[in] err Error code to convert * \return dom exception */ -static inline dom_exception nslayout_error_to_libdom(nslayout_error err) +static inline dom_exception nsl_error_to_libdom(nsl_error err) { return err >> 8; } @@ -114,7 +114,7 @@ static inline dom_exception nslayout_error_to_libdom(nslayout_error err) * \param[in] err Error code to convert * \return libcss error */ -static inline css_error nslayout_error_to_libcss(nslayout_error err) +static inline css_error nsl_error_to_libcss(nsl_error err) { return err >> 8; } |