File: efi-string-table.h

package info (click to toggle)
stubble 3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 836 kB
  • sloc: ansic: 6,119; python: 599; makefile: 40
file content (13 lines) | stat: -rw-r--r-- 628 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once

#include "macro-fundamental.h"

#define _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope)          \
        scope const char* name##_to_string(type i) {                    \
                assert(i >= 0 && i < (type) ELEMENTSOF(name##_table));  \
                return name##_table[i];                                 \
        }

#define DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type) _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,)
#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(name,type) _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,static)