1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef HC_GEN_TYPES_H 10 #define HC_GEN_TYPES_H 11 12 #define ALIGN_SIZE 4 13 #define TAB " " 14 #define TAB_SIZE 4 15 #define OPCODE_BYTE_WIDTH 1 16 17 #define BYTE_SIZE 1 18 #define WORD_SIZE 2 19 #define DWORD_SIZE 4 20 #define QWORD_SIZE 8 21 22 #define UNIX_SEPARATOR '/' 23 #define WIN_SEPARATOR '\\' 24 25 #ifdef OS_WIN 26 #define OS_SEPARATOR WIN_SEPARATOR 27 #else 28 #define OS_SEPARATOR UNIX_SEPARATOR 29 #endif 30 31 namespace OHOS { 32 namespace Hardware { 33 enum HcsErrorNo { 34 NOERR = 0, /* No error */ 35 EFAIL, /* Process fail */ 36 EOOM, /* Out of memory */ 37 EOPTION, /* Option error */ 38 EREOPENF, /* Reopen argument */ 39 EINVALF, /* Invalid file */ 40 EINVALARG, /* Invalid argument */ 41 EDECOMP, /* Decompile error */ 42 EOUTPUT, /* Output error */ 43 EASTWALKBREAK, /* Break ast walk */ 44 }; 45 } // namespace Hardware 46 } // namespace OHOS 47 48 #endif // HC_GEN_TYPES_H 49