(87 lines)
1 //2 // types.h3 // Copyright 2020 Bruce Hill4 // Released under the MIT license with the Commons Clause5 //6 // This file contains definitions of different types.7 //21 //22 // Datastructure for file/directory entries.23 // entry_t uses intrusive linked lists. This means entries can only belong to24 // one list at a time, in this case the list of selected entries. 'atme' is an25 // indirect pointer to either the 'next' field of the previous list member, or26 // the variable that points to the first list member. In other words,27 // item->next->atme == &item->next and firstitem->atme == &firstitem.28 //32 } selected, hash;35 mode_t linkedmode;44 } entry_t;46 // For keeping track of child processes:48 pid_t pid;51 } running;52 } proc_t;54 // History of paths58 } bb_history_t;60 // Structure for bb program state:62 entry_t *hash[HASH_SIZE];63 entry_t **files;64 entry_t *selected;66 bb_history_t *history;76 proc_t *running_procs;77 } bb_t;79 // Key bindings:84 } binding_t;86 #endif87 // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0