This is an automated email from the ASF dual-hosted git repository. pkarashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new d1e46c2d3 compiler.h: Add _ between format|printf|syslog|scanf|strftime and like d1e46c2d3 is described below commit d1e46c2d3e2cd730a453187faa2a03cf6403b221 Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Tue Dec 13 03:06:32 2022 +0800 compiler.h: Add _ between format|printf|syslog|scanf|strftime and like align with other macro naming style Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com> --- examples/sotest/lib/modprint/modprint.c | 2 +- examples/sotest/lib/sotest/sotest.c | 2 +- include/graphics/curses.h | 26 +++++++++++++------------- include/graphics/nxwidgets/cnxstring.hxx | 2 +- include/netutils/telnetc.h | 8 ++++---- interpreters/bas/bas_str.h | 2 +- interpreters/bas/bas_value.h | 2 +- modbus/nuttx/port.h | 4 ++-- netutils/ftpc/ftpc_internal.h | 4 ++-- netutils/ftpd/ftpd.c | 2 +- nshlib/nsh_console.c | 4 ++-- nshlib/nsh_console.h | 4 ++-- system/cle/cle.c | 2 +- system/i2c/i2c_main.c | 2 +- system/i2c/i2ctool.h | 4 ++-- system/spi/spitool.h | 4 ++-- system/vi/vi.c | 2 +- 17 files changed, 38 insertions(+), 38 deletions(-) diff --git a/examples/sotest/lib/modprint/modprint.c b/examples/sotest/lib/modprint/modprint.c index 45bf25e82..bb2793ef1 100644 --- a/examples/sotest/lib/modprint/modprint.c +++ b/examples/sotest/lib/modprint/modprint.c @@ -36,7 +36,7 @@ * Private Function Prototypes ****************************************************************************/ -static void modprint(FAR const char *fmt, ...) printflike(1, 2); +static void modprint(FAR const char *fmt, ...) printf_like(1, 2); /**************************************************************************** * Private Data diff --git a/examples/sotest/lib/sotest/sotest.c b/examples/sotest/lib/sotest/sotest.c index f4143c3b4..da09bf9a7 100644 --- a/examples/sotest/lib/sotest/sotest.c +++ b/examples/sotest/lib/sotest/sotest.c @@ -37,7 +37,7 @@ ****************************************************************************/ #if CONFIG_MODLIB_MAXDEPEND > 0 -void modprint(FAR const char *fmt, ...) printflike(1, 2); +void modprint(FAR const char *fmt, ...) printf_like(1, 2); #endif /**************************************************************************** diff --git a/include/graphics/curses.h b/include/graphics/curses.h index 3c9b79518..5fd19667c 100644 --- a/include/graphics/curses.h +++ b/include/graphics/curses.h @@ -1165,8 +1165,8 @@ int mvinsch(int, int, chtype); int mvinsnstr(int, int, const char *, int); int mvinsstr(int, int, const char *); int mvinstr(int, int, char *); -int mvprintw(int, int, const char *, ...) printflike(3, 4); -int mvscanw(int, int, const char *, ...) scanflike(3, 4); +int mvprintw(int, int, const char *, ...) printf_like(3, 4); +int mvscanw(int, int, const char *, ...) scanf_like(3, 4); int mvvline(int, int, chtype, int); int mvwaddchnstr(WINDOW *, int, int, const chtype *, int); int mvwaddchstr(WINDOW *, int, int, const chtype *); @@ -1188,8 +1188,8 @@ int mvwinsnstr(WINDOW *, int, int, const char *, int); int mvwinsstr(WINDOW *, int, int, const char *); int mvwinstr(WINDOW *, int, int, char *); int mvwin(WINDOW *, int, int); -int mvwprintw(WINDOW *, int, int, const char *, ...) printflike(4, 5); -int mvwscanw(WINDOW *, int, int, const char *, ...) scanflike(4, 5); +int mvwprintw(WINDOW *, int, int, const char *, ...) printf_like(4, 5); +int mvwscanw(WINDOW *, int, int, const char *, ...) scanf_like(4, 5); int mvwvline(WINDOW *, int, int, chtype, int); int napms(int); WINDOW *newpad(int, int); @@ -1209,7 +1209,7 @@ int pair_content(short, short *, short *); int pechochar(WINDOW *, chtype); int pnoutrefresh(WINDOW *, int, int, int, int, int, int); int prefresh(WINDOW *, int, int, int, int, int, int); -int printw(const char *, ...) printflike(1, 2); +int printw(const char *, ...) printf_like(1, 2); int putwin(WINDOW *, FILE *); void qiflush(void); int raw(void); @@ -1220,7 +1220,7 @@ int reset_shell_mode(void); int resetty(void); int ripoffline(int, int (*)(WINDOW *, int)); int savetty(void); -int scanw(const char *, ...) scanflike(1, 2); +int scanw(const char *, ...) scanf_like(1, 2); int scr_dump(const char *); int scr_init(const char *); int scr_restore(const char *); @@ -1265,10 +1265,10 @@ int vid_attr(attr_t, short, void *); int vidputs(chtype, int (*)(int)); int vid_puts(attr_t, short, void *, int (*)(int)); int vline(chtype, int); -int vw_printw(WINDOW *, const char *, va_list) printflike(2, 0); -int vwprintw(WINDOW *, const char *, va_list) printflike(2, 0); -int vw_scanw(WINDOW *, const char *, va_list) scanflike(2, 0); -int vwscanw(WINDOW *, const char *, va_list) scanflike(2, 0); +int vw_printw(WINDOW *, const char *, va_list) printf_like(2, 0); +int vwprintw(WINDOW *, const char *, va_list) printf_like(2, 0); +int vw_scanw(WINDOW *, const char *, va_list) scanf_like(2, 0); +int vwscanw(WINDOW *, const char *, va_list) scanf_like(2, 0); int waddchnstr(WINDOW *, const chtype *, int); int waddchstr(WINDOW *, const chtype *); int waddch(WINDOW *, const chtype); @@ -1311,10 +1311,10 @@ int winsstr(WINDOW *, const char *); int winstr(WINDOW *, char *); int wmove(WINDOW *, int, int); int wnoutrefresh(WINDOW *); -int wprintw(WINDOW *, const char *, ...) printflike(2, 3); +int wprintw(WINDOW *, const char *, ...) printf_like(2, 3); int wredrawln(WINDOW *, int, int); int wrefresh(WINDOW *); -int wscanw(WINDOW *, const char *, ...) scanflike(2, 3); +int wscanw(WINDOW *, const char *, ...) scanf_like(2, 3); int wscrl(WINDOW *, int); int wsetscrreg(WINDOW *, int, int); int wstandend(WINDOW *); @@ -1497,7 +1497,7 @@ char wordchar(void); wchar_t *slk_wlabel(int); #endif -void PDC_debug(const char *, ...) printflike(1, 2); +void PDC_debug(const char *, ...) printf_like(1, 2); int PDC_ungetch(int); int PDC_set_blink(bool); int PDC_set_line_color(short); diff --git a/include/graphics/nxwidgets/cnxstring.hxx b/include/graphics/nxwidgets/cnxstring.hxx index 99755c0e6..056bbd759 100644 --- a/include/graphics/nxwidgets/cnxstring.hxx +++ b/include/graphics/nxwidgets/cnxstring.hxx @@ -510,7 +510,7 @@ namespace NXWidgets * @return New CNxString instance. */ - static CNxString format(const char *fmt, ...) printflike(1, 2); + static CNxString format(const char *fmt, ...) printf_like(1, 2); }; } diff --git a/include/netutils/telnetc.h b/include/netutils/telnetc.h index f084238fe..5a3b00f82 100644 --- a/include/netutils/telnetc.h +++ b/include/netutils/telnetc.h @@ -587,7 +587,7 @@ void telnet_begin_compress2(struct telnet_s *telnet); ****************************************************************************/ int telnet_printf(struct telnet_s *telnet, const char *fmt, ...) - printflike(2, 3); + printf_like(2, 3); /**************************************************************************** * Name: telnet_vprintf @@ -600,7 +600,7 @@ int telnet_printf(struct telnet_s *telnet, const char *fmt, ...) ****************************************************************************/ int telnet_vprintf(struct telnet_s *telnet, const char *fmt, va_list va) - printflike(2, 0); + printf_like(2, 0); /**************************************************************************** * Name: telnet_raw_printf @@ -622,7 +622,7 @@ int telnet_vprintf(struct telnet_s *telnet, const char *fmt, va_list va) ****************************************************************************/ int telnet_raw_printf(struct telnet_s *telnet, const char *fmt, ...) - printflike(2, 3); + printf_like(2, 3); /**************************************************************************** * Name: telnet_raw_vprintf @@ -635,7 +635,7 @@ int telnet_raw_printf(struct telnet_s *telnet, const char *fmt, ...) ****************************************************************************/ int telnet_raw_vprintf(struct telnet_s *telnet, const char *fmt, va_list va) - printflike(2, 0); + printf_like(2, 0); /**************************************************************************** * Name: telnet_begin_newenviron diff --git a/interpreters/bas/bas_str.h b/interpreters/bas/bas_str.h index 97506812c..05e00b1eb 100644 --- a/interpreters/bas/bas_str.h +++ b/interpreters/bas/bas_str.h @@ -65,7 +65,7 @@ int String_appendString(struct String *this, const struct String *app); int String_appendChar(struct String *this, char ch); int String_appendChars(struct String *this, const char *ch); int String_appendPrintf(struct String *this, const char *fmt, ...) - printflike(2, 3); + printf_like(2, 3); int String_insertChar(struct String *this, size_t where, char ch); int String_delete(struct String *this, size_t where, size_t len); void String_ucase(struct String *this); diff --git a/interpreters/bas/bas_value.h b/interpreters/bas/bas_value.h index 68da43967..c33469453 100644 --- a/interpreters/bas/bas_value.h +++ b/interpreters/bas/bas_value.h @@ -103,7 +103,7 @@ double Value_vald(const char *s, char **end, int *overflow); struct Value *Value_new_NIL(struct Value *this); struct Value *Value_new_ERROR(struct Value *this, int code, - const char *error, ...) printflike(3, 4); + const char *error, ...) printf_like(3, 4); struct Value *Value_new_INTEGER(struct Value *this, int n); struct Value *Value_new_REAL(struct Value *this, double n); struct Value *Value_new_STRING(struct Value *this); diff --git a/modbus/nuttx/port.h b/modbus/nuttx/port.h index 2fc4b1657..4b75aceab 100644 --- a/modbus/nuttx/port.h +++ b/modbus/nuttx/port.h @@ -81,7 +81,7 @@ typedef enum void vMBPortEnterCritical(void); void vMBPortExitCritical(void); void vMBPortLog(eMBPortLogLevel eLevel, const char *szModule, - const char *szFmt, ...) printflike(3, 4); + const char *szFmt, ...) printf_like(3, 4); void vMBPortTimerPoll(void); bool xMBPortSerialPoll(void); bool xMBPortSerialSetTimeout(uint32_t dwTimeoutMs); @@ -90,7 +90,7 @@ bool xMBPortSerialSetTimeout(uint32_t dwTimeoutMs); void vMBMasterPortEnterCritical(void); void vMBMasterPortExitCritical(void); void vMBMasterPortLog(eMBPortLogLevel eLevel, const char *szModule, - const char *szFmt, ...) printflike(3, 4); + const char *szFmt, ...) printf_like(3, 4); void vMBMasterPortTimerPoll(void); bool xMBMasterPortSerialPoll(void); bool xMBMasterPortSerialSetTimeout(uint32_t dwTimeoutMs); diff --git a/netutils/ftpc/ftpc_internal.h b/netutils/ftpc/ftpc_internal.h index 5546e889a..c01cb1b69 100644 --- a/netutils/ftpc/ftpc_internal.h +++ b/netutils/ftpc/ftpc_internal.h @@ -227,7 +227,7 @@ EXTERN int ftpc_relogin(FAR struct ftpc_session_s *session); EXTERN void ftpc_reset(struct ftpc_session_s *session); EXTERN int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) - printflike(2, 3); + printf_like(2, 3); EXTERN int fptc_getreply(struct ftpc_session_s *session); EXTERN FAR const char *ftpc_lpwd(void); EXTERN int ftpc_xfrmode(struct ftpc_session_s *session, uint8_t xfrmode); @@ -253,7 +253,7 @@ EXTERN void ftpc_sockcopy(FAR struct ftpc_socket_s *dest, /* Socket I/O helpers */ EXTERN int ftpc_sockprintf(FAR struct ftpc_socket_s *sock, - const char *fmt, ...) printflike(2, 3); + const char *fmt, ...) printf_like(2, 3); EXTERN void ftpc_timeout(wdparm_t arg); /* Transfer helpers */ diff --git a/netutils/ftpd/ftpd.c b/netutils/ftpd/ftpd.c index 946b369ea..f9c10adb1 100644 --- a/netutils/ftpd/ftpd.c +++ b/netutils/ftpd/ftpd.c @@ -111,7 +111,7 @@ static ssize_t ftpd_recv(int sd, FAR void *data, size_t size, int timeout); static ssize_t ftpd_send(int sd, FAR const void *data, size_t size, int timeout); static ssize_t ftpd_response(int sd, int timeout, FAR const char *fmt, ...) - printflike(3, 4); + printf_like(3, 4); static int ftpd_dataopen(FAR struct ftpd_session_s *session); static int ftpd_dataclose(FAR struct ftpd_session_s *session); diff --git a/nshlib/nsh_console.c b/nshlib/nsh_console.c index 7fa918e3c..aa83af8e6 100644 --- a/nshlib/nsh_console.c +++ b/nshlib/nsh_console.c @@ -63,9 +63,9 @@ static void nsh_consolerelease(FAR struct nsh_vtbl_s *vtbl); static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, FAR const void *buffer, size_t nbytes); static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl, - FAR const char *fmt, ...) printflike(2, 3); + FAR const char *fmt, ...) printf_like(2, 3); static int nsh_erroroutput(FAR struct nsh_vtbl_s *vtbl, - FAR const char *fmt, ...) printflike(2, 3); + FAR const char *fmt, ...) printf_like(2, 3); static FAR char *nsh_consolelinebuffer(FAR struct nsh_vtbl_s *vtbl); static void nsh_consoleredirect(FAR struct nsh_vtbl_s *vtbl, int fd, FAR uint8_t *save); diff --git a/nshlib/nsh_console.h b/nshlib/nsh_console.h index 219ff5832..5e1c02cc6 100644 --- a/nshlib/nsh_console.h +++ b/nshlib/nsh_console.h @@ -113,9 +113,9 @@ struct nsh_vtbl_s ssize_t (*write)(FAR struct nsh_vtbl_s *vtbl, FAR const void *buffer, size_t nbytes); int (*error)(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, ...) - printflike(2, 3); + printf_like(2, 3); int (*output)(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, ...) - printflike(2, 3); + printf_like(2, 3); FAR char *(*linebuffer)(FAR struct nsh_vtbl_s *vtbl); void (*redirect)(FAR struct nsh_vtbl_s *vtbl, int fd, FAR uint8_t *save); void (*undirect)(FAR struct nsh_vtbl_s *vtbl, FAR uint8_t *save); diff --git a/system/cle/cle.c b/system/cle/cle.c index 0ec857718..fb2f7e433 100644 --- a/system/cle/cle.c +++ b/system/cle/cle.c @@ -153,7 +153,7 @@ struct cle_s ****************************************************************************/ #if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 0 -static void cle_debug(FAR const char *fmt, ...) printflike(1, 2); +static void cle_debug(FAR const char *fmt, ...) printf_like(1, 2); #endif /* Low-level display and data entry functions */ diff --git a/system/i2c/i2c_main.c b/system/i2c/i2c_main.c index b8f011dc1..cfe0f3706 100644 --- a/system/i2c/i2c_main.c +++ b/system/i2c/i2c_main.c @@ -414,7 +414,7 @@ int main(int argc, FAR char *argv[]) * ****************************************************************************/ -int i2ctool_printf(FAR struct i2ctool_s *i2ctool, const char *fmt, ...) +int i2ctool_printf(FAR struct i2ctool_s *i2ctool, FAR const char *fmt, ...) { va_list ap; int ret; diff --git a/system/i2c/i2ctool.h b/system/i2c/i2ctool.h index e1596457a..4abc6ba8d 100644 --- a/system/i2c/i2ctool.h +++ b/system/i2c/i2ctool.h @@ -170,8 +170,8 @@ extern const char g_i2cxfrerror[]; ssize_t i2ctool_write(FAR struct i2ctool_s *i2ctool, FAR const void *buffer, size_t nbytes); -int i2ctool_printf(FAR struct i2ctool_s *i2ctool, const char *fmt, ...) - printflike(2, 3); +int i2ctool_printf(FAR struct i2ctool_s *i2ctool, + FAR const char *fmt, ...) printf_like(2, 3); void i2ctool_flush(FAR struct i2ctool_s *i2ctool); void i2ctool_hexdump(FILE *outstream, void *addr, int len); diff --git a/system/spi/spitool.h b/system/spi/spitool.h index 7af9f7953..a750fca6b 100644 --- a/system/spi/spitool.h +++ b/system/spi/spitool.h @@ -176,8 +176,8 @@ extern const char g_spixfrerror[]; ssize_t spitool_exchange(FAR struct spitool_s *spitool, FAR const void *outbuffer, size_t noutbytes, FAR void *inbuffer, size_t ninbytes); -int spitool_printf(FAR struct spitool_s *spitool, const char *fmt, ...) - printflike(2, 3); +int spitool_printf(FAR struct spitool_s *spitool, + FAR const char *fmt, ...) printf_like(2, 3); void spitool_flush(FAR struct spitool_s *spitool); /* Command handlers */ diff --git a/system/vi/vi.c b/system/vi/vi.c index eb89307c9..369a3937a 100644 --- a/system/vi/vi.c +++ b/system/vi/vi.c @@ -391,7 +391,7 @@ static void vi_clrscreen(FAR struct vi_s *vi); /* Final Line display */ static void vi_printf(FAR struct vi_s *vi, FAR const char *prefix, - FAR const char *fmt, ...) printflike(3, 4); + FAR const char *fmt, ...) printf_like(3, 4); /* Line positioning */