diff options
Diffstat (limited to '')
-rw-r--r-- | src/mds-kbdc/builtin-functions.h (renamed from src/mds-kbdc/functions.h) | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mds-kbdc/functions.h b/src/mds-kbdc/builtin-functions.h index 158c0b1..ebe3935 100644 --- a/src/mds-kbdc/functions.h +++ b/src/mds-kbdc/builtin-functions.h @@ -15,8 +15,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MDS_MDS_KBDC_FUNCTIONS_H -#define MDS_MDS_KBDC_FUNCTIONS_H +#ifndef MDS_MDS_KBDC_BUILTIN_FUNCTIONS_H +#define MDS_MDS_KBDC_BUILTIN_FUNCTIONS_H #include "string.h" @@ -25,26 +25,26 @@ #include <stdarg.h> + /** - * Check whether a function is defined. + * Check whether a function is a builtin function * - * @param name The name of the function. - * @param arg_count The number of arguments to pass to the function. - * @return Whether the function is defined for the selected number of arguments. + * @param name The name of the function + * @param arg_count The number of arguments to pass to the function + * @return Whether the described function is a builtin function */ -int function_check_defined(const char32_t* restrict name, size_t arg_count) __attribute__((nonnull)); +int builtin_function_defined(const char* restrict name, size_t arg_count) __attribute__((pure)); /** - * Invoke a function defined in the keyboard layout source code, or that is builtin. + * Invoke a builtin function * - * @param name The name of the function. - * @param arg_count The number of arguments to pass to the function. - * @param ...:char32_t* The arguments to pass, do not end with a sentinel. - * @return The return value of the function, `NULL` on error. + * @param name The name of the function + * @param arg_count The number of arguments to pass to the function + * @param args The arguments to pass + * @return The return value of the function, `NULL` on error */ -char32_t* function_invoke(const char32_t* restrict name, size_t arg_count, ...) __attribute__((nonnull)); +char32_t* builtin_function_invoke(const char* restrict name, size_t arg_count, const char32_t** restrict args); -/* TODO define functions, check if function is built in */ #endif |