1 /* 2 * Copyright (C) 2014 Christian Heckendorf <heckendorfc@gmail.com> 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef EDIT_SHELL_H 19 #define EDIT_SHELL_H 20 21 #include "lex.h" 22 #include "build.h" 23 #include "edit.tab.h" 24 25 #define INIT_MEM(array, size) if(!(array=malloc(sizeof(*(array))*(size))))exit(1); 26 27 #define TOK_NULL 0 28 #define TOK_REDIRECT 0x010000 29 #define TOK_OPERATOR 0x020000 30 #define TOK_RESERVED 0x040000 31 #define TOKEN_MASK 0x00FFFF 32 33 enum edit_shell_select_types{ 34 SEL_SONG=0, 35 SEL_ALBUM, 36 SEL_ARTIST, 37 SEL_PLAYLIST, 38 SEL_TAG, 39 SEL_NULL 40 }; 41 42 extern TokenList *tlist; 43 //extern command_t *start_command; 44 45 int editShell(); 46 47 #endif 48