comparison libcore/core/error.h @ 168:aab824406d3d

misc: all printf-like function are name foof and vfoof
author David Demelier <markand@malikania.fr>
date Tue, 20 Oct 2020 15:09:39 +0200
parents 789b23e01f52
children eb0a7ab71023
comparison
equal deleted inserted replaced
167:b9b826cd9832 168:aab824406d3d
37 */ 37 */
38 const char * 38 const char *
39 error(void); 39 error(void);
40 40
41 /** 41 /**
42 * Set the game error with a printf-like format.
43 *
44 * \pre fmt != NULL
45 * \param fmt the format string
46 * \return Always false.
47 */
48 bool
49 errorf(const char *fmt, ...) PLAT_PRINTF(1, 2);
50
51 /**
52 * Similar to \ref errorf.
53 *
54 * \pre fmt != NULL
55 * \param fmt the format stinrg
56 * \param ap the variadic arguments pointer
57 * \return Always false.
58 */
59 bool
60 verrorf(const char *fmt, va_list ap) PLAT_PRINTF(1, 0);
61
62 /**
42 * Convenient helper that sets last error from global C errno and then return 63 * Convenient helper that sets last error from global C errno and then return
43 * false. 64 * false.
44 * 65 *
45 * \return Always false. 66 * \return Always false.
46 */ 67 */
47 bool 68 bool
48 error_errno(void); 69 error_errno(void);
49 70
50 /**
51 * Set the game error with a printf-like format.
52 *
53 * \pre fmt != NULL
54 * \param fmt the format string
55 * \return Always false.
56 */
57 bool
58 error_printf(const char *fmt, ...) PLAT_PRINTF(1, 2);
59
60 /**
61 * Similar to \ref error_printf.
62 *
63 * \pre fmt != NULL
64 * \param fmt the format stinrg
65 * \param ap the variadic arguments pointer
66 * \return Always false.
67 */
68 bool
69 error_vprintf(const char *fmt, va_list ap) PLAT_PRINTF(1, 0);
70
71 #endif /* !MOLKO_ERROR_H */ 71 #endif /* !MOLKO_ERROR_H */