📄 tree.h
字号:
/* * Copyright (C) 2008 dhewg, #wiidev efnet * based on code by: * Copyright (C) 2005 Janusz Dziemidowicz (rraptorr@nails.eu.org) * * this file is part of wiifuse * http://wiibrew.org/index.php?title=Wiifuse * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#ifndef _TREE_H_#define _TREE_H_#include "global.h"enum tree_type { TREE_RAW_FILE = 0, TREE_FILE, TREE_DIR, TREE_MEM, TREE_UINT, TREE_HEX_UINT8, TREE_HEX_UINT16, TREE_HEX_UINT32, TREE_HEX_UINT64, TREE_CHAR, TREE_STRING, TREE_SYMLINK};struct tree { u32 part; enum tree_type type; char *name; u64 v1; u64 v2; u16 nsubdirs; struct tree *sub; struct tree *next;};struct tree *tree_add_dir (u32 part, struct tree *root, const char *name);struct tree *tree_add_filler (u32 part, struct tree *root, const char *name);struct tree *tree_add_raw_file (u32 part, struct tree *root, const char *name, u64 offset, u64 size);struct tree *tree_add_file (u32 part, struct tree *root, const char *name, u64 offset, u64 size);struct tree *tree_add_mem (u32 part, struct tree *root, const char *name, void *ptr, size_t size);struct tree *tree_add_char (u32 part, struct tree *root, const char *name, const char c);struct tree *tree_add_bool (u32 part, struct tree *root, const char *name, const u8 b);struct tree *tree_add_string (u32 part, struct tree *root, const char *name, const char *str, size_t size);struct tree *tree_add_hex_uint8 (u32 part, struct tree *root, const char *name, const u8 value);struct tree *tree_add_hex_uint16 (u32 part, struct tree *root, const char *name, const u16 value);struct tree *tree_add_hex_uint32 (u32 part, struct tree *root, const char *name, const u32 value);struct tree *tree_add_hex_uint64 (u32 part, struct tree *root, const char *name, const u64 value);struct tree *tree_add_uint (u32 part, struct tree *root, const char *name, const u64 value);struct tree *tree_add_symlink (u32 part, struct tree *root, const char *name, const char *dst);struct tree *tree_find_entry (struct tree *root, const char *path);void tree_free (struct tree *root);struct tree *tree_empty (void);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -