+static inline enum msg_category
+msg_class_to_category (enum msg_class class)
+{
+ return class / 3;
+}
+
+static inline enum msg_severity
+msg_class_to_severity (enum msg_class class)
+{
+ return class % 3;
+}
+
+static inline enum msg_class
+msg_class_from_category_and_severity (enum msg_category category,
+ enum msg_severity severity)
+{
+ return category * 3 + severity;
+}
+
+/* A line number and column number within a source file. Both are 1-based. If
+ only a line number is available, 'column' is zero. If neither is available,
+ 'line' and 'column' are zero.
+
+ Column numbers are measured according to the width of characters as shown in
+ a typical fixed-width font, in which CJK characters have width 2 and
+ combining characters have width 0. */
+struct msg_point
+ {
+ int line;
+ int column;
+ };
+
+/* Location of the cause of an error. */
+struct msg_location