From a025e83e5ab10147861334fd94682fdd20fb69d2 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sun, 22 Nov 2020 15:00:23 +0100 Subject: [PATCH] charsets: define charset enum explicitly as flags --- src/mm-charsets.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mm-charsets.h b/src/mm-charsets.h index c064eef5..14a8b375 100644 --- a/src/mm-charsets.h +++ b/src/mm-charsets.h @@ -19,16 +19,16 @@ #include typedef enum { - MM_MODEM_CHARSET_UNKNOWN = 0x00000000, - MM_MODEM_CHARSET_GSM = 0x00000001, - MM_MODEM_CHARSET_IRA = 0x00000002, - MM_MODEM_CHARSET_8859_1 = 0x00000004, - MM_MODEM_CHARSET_UTF8 = 0x00000008, - MM_MODEM_CHARSET_UCS2 = 0x00000010, - MM_MODEM_CHARSET_PCCP437 = 0x00000020, - MM_MODEM_CHARSET_PCDN = 0x00000040, - MM_MODEM_CHARSET_HEX = 0x00000080, - MM_MODEM_CHARSET_UTF16 = 0x00000100, + MM_MODEM_CHARSET_UNKNOWN = 0, + MM_MODEM_CHARSET_GSM = 1 << 0, + MM_MODEM_CHARSET_IRA = 1 << 1, + MM_MODEM_CHARSET_8859_1 = 1 << 2, + MM_MODEM_CHARSET_UTF8 = 1 << 3, + MM_MODEM_CHARSET_UCS2 = 1 << 4, + MM_MODEM_CHARSET_PCCP437 = 1 << 5, + MM_MODEM_CHARSET_PCDN = 1 << 6, + MM_MODEM_CHARSET_HEX = 1 << 7, + MM_MODEM_CHARSET_UTF16 = 1 << 8, } MMModemCharset; const gchar *mm_modem_charset_to_string (MMModemCharset charset);