input.c File Reference

Input functions. More...

#include "io.h"
#include "thread.h"
#include "int.h"
#include "errnums.h"

Functions

int getc_try (void)
 Check for character in the keyboard buffer availible.
int getc (void)
 Reads char from keyboard buffer, else blocks calling thread and waits for keypress.
int gets (char *str, const size_t len)
 Read at most len-1 characters from keyboard, reading is terminated by '
' character.

Variables

thread_t input_queue


Detailed Description

Input functions.


Function Documentation

int getc ( void   ) 

Reads char from keyboard buffer, else blocks calling thread and waits for keypress.

Returns:
character from keyboard buffer

int getc_try ( void   ) 

Check for character in the keyboard buffer availible.

Returns:
EWOULDBLOCK on empty keyboard buffer, EOK else

int gets ( char *  str,
const size_t  len 
)

Read at most len-1 characters from keyboard, reading is terminated by '
' character.

Parameters:
str - null terminated returned string
len - maximum length of str buffer
Returns:
EINVAL for len equal to 0, else str length (without trailing zero)


Generated on Wed Nov 15 17:25:43 2006 for Kalisto by  doxygen 1.4.7