Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2525 → Rev 2526

/trunk/uspace/lib/libc/include/libadt/hash_table.h
55,23 → 55,25
struct hash_table_operations {
/** Hash function.
*
* @param key Array of keys needed to compute hash index. All keys must be passed.
* @param key Array of keys needed to compute hash index. All keys
* must be passed.
*
* @return Index into hash table.
* @return Index into hash table.
*/
hash_index_t (* hash)(unsigned long key[]);
/** Hash table item comparison function.
*
* @param key Array of keys that will be compared with item. It is not necessary to pass all keys.
* @param key Array of keys that will be compared with item. It is
* not necessary to pass all keys.
*
* @return true if the keys match, false otherwise.
* @return true if the keys match, false otherwise.
*/
int (*compare)(unsigned long key[], hash_count_t keys, link_t *item);
 
/** Hash table item removal callback.
*
* @param item Item that was removed from the hash table.
* @param item Item that was removed from the hash table.
*/
void (*remove_callback)(link_t *item);
};
/trunk/uspace/lib/libc/include/ctype.h
35,9 → 35,19
#ifndef LIBC_CTYPE_H_
#define LIBC_CTYPE_H_
 
static inline int islower(int c)
{
return ((c >= 'a') && (c <= 'z'));
}
 
static inline int isupper(int c)
{
return ((c >= 'A') && (c <= 'Z'));
}
 
static inline int isalpha(int c)
{
return (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')));
return (islower(c) || isupper(c));
}
 
static inline int isdigit(int c)