/*
* The Spar Library - modular math parser
* Copyright (C) 2000,2001 Davide Angelocola <davide178@inwind.it>
*
* 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.
*
* 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _sl_util_h_
#define _sl_util_h_
#include <spar/sl_conf.h>
__BEGIN_DECLS
/**
* @fn static inline int sl_isnumber (char c)
* @brief Checks if the char is a number
* @param c The char to check
* @return Returns true on success, false otherwise
*/
int sl_isnumber (char c);
/**
* @fn static inline int isalpha (char c)
* @brief Checks if the char is a alphabetic char
* @param c The char to check
* @return Returns true on success, false otherwise
*/
int sl_isalpha (char c);
/**
* @fn static inline int isdelim (char c)
* @brief Checks if the char is a delimitator
* @param c The char to check
* @return Returns true on success, false otherwise
*/
int sl_isdelim (char c);
/**
* @fn static inline int iscomment (char c)
* @brief Checks if the char is a comment '#'
* @param c The char to check
* @return Returns true on success, false otherwise
*/
int sl_iscomment (char c);
/**
* @fn static inline int isblank (char c)
* @brief Checks if the char is a blank or tab char
* @param c The char to check
* @return Returns true on success, false otherwise
*/
int sl_isblank (char c);
void *sl_malloc (sl_size bytes);
void *sl_realloc (void *m, sl_size bytes);
void *sl_calloc (sl_size nmenb, sl_size bytes);
void sl_free (void *m, sl_size bytes);
void sl_memory_stats (void);
void sl_string_to_double (char *token, double *r);
const char *sl_strerror (int errno);
__END_DECLS
#endif /* _sl_util_h_ */
syntax highlighted by Code2HTML, v. 0.9.1