Skip to content

Commit

Permalink
change <<enum lvls {...}>> to <<typedef enum {...} MessageLevel>>
Browse files Browse the repository at this point in the history
  • Loading branch information
cagney authored and TingPing committed May 26, 2020
1 parent 3459088 commit d874847
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/hexchat_otr.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,12 @@ int hexchat_plugin_deinit (void)
return 1;
}

void otr_log(IRC_CTX *server, const char *nick, enum lvls level, const char *format, ...)
void otr_log(IRC_CTX *server, const char *nick, MessageLevel level, const char *format, ...)
{
/* TODO: Implement me! */
}

void printformat (IRC_CTX *ircctx, const char *nick, enum lvls lvl, int fnum, ...)
void printformat (IRC_CTX *ircctx, const char *nick, MessageLevel lvl, int fnum, ...)
{
va_list params;
va_start (params, fnum);
Expand Down
6 changes: 3 additions & 3 deletions src/hexchat_otr.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ struct _FORMAT_REC

typedef struct _FORMAT_REC FORMAT_REC;

enum lvls
typedef enum
{
MSGLEVEL_CRAP,
MSGLEVEL_MSGS
};
} MessageLevel;

extern hexchat_plugin *ph; /* plugin handle */

Expand All @@ -67,7 +67,7 @@ G_MODULE_EXPORT int hexchat_plugin_init (hexchat_plugin *plugin_handle,
char **plugin_version,
char *arg);
G_MODULE_EXPORT void hexchat_plugin_get_info (char **name, char **desc, char **version, void **reserved);
void printformat (IRC_CTX *ircctx, const char *nick, enum lvls lvl, int fnum, ...);
void printformat (IRC_CTX *ircctx, const char *nick, MessageLevel lvl, int fnum, ...);

#define otr_noticest(formatnum, ...) \
printformat (NULL, NULL, MSGLEVEL_MSGS, formatnum, ##__VA_ARGS__)
Expand Down
2 changes: 1 addition & 1 deletion src/otr.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
otr_log (NULL, NULL, level, format, ##__VA_ARGS__)

void otr_log (IRC_CTX *server, const char *to,
enum lvls level, const char *format, ...);
MessageLevel level, const char *format, ...);

/* own */

Expand Down

0 comments on commit d874847

Please sign in to comment.