diff --git a/source/mycss/syntax/ending.h b/source/mycss/syntax/ending.h new file mode 100644 index 0000000..0812693 --- /dev/null +++ b/source/mycss/syntax/ending.h @@ -0,0 +1,44 @@ +/* + Copyright (C) 2016-2017 Alexander Borisov + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + Author: lex.borisov@gmail.com (Alexander Borisov) +*/ + +#ifndef MyCSS_SYNTAX_ENDING_H +#define MyCSS_SYNTAX_ENDING_H +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "mycss/myosi.h" +#include "mycss/mycss.h" +#include "mycss/entry.h" + +bool mycss_syntax_endings_list_of_rules_return(mycss_entry_t* entry, mycss_token_t* token); +bool mycss_syntax_endings_list_of_rules_qualified_rule_left_qb(mycss_entry_t* entry, mycss_token_t* token); +bool mycss_syntax_endings_list_of_rules_at_rule_qb(mycss_entry_t* entry, mycss_token_t* token); +bool mycss_syntax_endings_component_value_and_simple_block_left_curly_bracket(mycss_entry_t* entry, mycss_token_t* token); +bool mycss_syntax_endings_component_value_and_simple_block_left_square_bracket(mycss_entry_t* entry, mycss_token_t* token); +bool mycss_syntax_endings_component_value_and_simple_block_left_parenthesis(mycss_entry_t* entry, mycss_token_t* token); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* MyCSS_SYNTAX_ENDING_H */ diff --git a/source/mycss/syntax/syntax.h b/source/mycss/syntax/syntax.h new file mode 100644 index 0000000..c04e62e --- /dev/null +++ b/source/mycss/syntax/syntax.h @@ -0,0 +1,40 @@ +/* + Copyright (C) 2016-2017 Alexander Borisov + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + Author: lex.borisov@gmail.com (Alexander Borisov) +*/ + +#ifndef MyCSS_SYNTAX_H +#define MyCSS_SYNTAX_H +#pragma once + +#ifdef __cplusplus +//extern "C" { +#endif + +#include "mycss/myosi.h" +#include "mycss/mycss.h" +#include "mycss/entry.h" +#include "mycss/syntax_ending.h" + +bool mycss_syntax_list_of_rules(mycss_entry_t* entry, mycss_token_t* token, bool last_response); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* MyCSS_SYNTAX_H */ diff --git a/source/mycss/syntax_ending.h b/source/mycss/syntax_ending.h new file mode 100644 index 0000000..7019d44 --- /dev/null +++ b/source/mycss/syntax_ending.h @@ -0,0 +1,39 @@ +/* + Copyright (C) 2016-2017 Alexander Borisov + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + Author: lex.borisov@gmail.com (Alexander Borisov) + */ + +#ifndef MyCSS_SYNTAX_ENDING_H +#define MyCSS_SYNTAX_ENDING_H +#pragma once + +#ifdef __cplusplus +//extern "C" { +#endif + +#include "mycss/myosi.h" +#include "mycss/mycss.h" +#include "mycss/entry.h" + +bool mycss_syntax_list_of_rules(mycss_entry_t* entry, mycss_token_t* token, bool last_response); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* MyCSS_SYNTAX_ENDING_H */ diff --git a/source/myport/posix/mycore/utils/mcsync.c b/source/myport/posix/mycore/utils/mcsync.c index 2e66790..65c5097 100644 --- a/source/myport/posix/mycore/utils/mcsync.c +++ b/source/myport/posix/mycore/utils/mcsync.c @@ -47,7 +47,11 @@ static mcsync_status_t mcsync_static_atomic_unlock(void* spinlock) /* spinlock */ void * mcsync_spin_create(void) { +#ifndef MyCORE_MCSYNC_SPINLOCK_PRESENT + return mcsync_mutex_create(); +#else return mycore_calloc(1, sizeof(int)); +#endif } mcsync_status_t mcsync_spin_init(void* spinlock)