Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4323 → Rev 4490

/trunk/kernel/generic/src/console/console.c
61,7 → 61,7
/** Kernel log initialized */
static bool klog_inited = false;
/** First kernel log characters */
static index_t klog_start = 0;
static size_t klog_start = 0;
/** Number of valid kernel log characters */
static size_t klog_len = 0;
/** Number of stored (not printed) kernel log characters */
170,10 → 170,10
* @return Number of characters read.
*
*/
count_t gets(indev_t *indev, char *buf, size_t buflen)
size_t gets(indev_t *indev, char *buf, size_t buflen)
{
size_t offset = 0;
count_t count = 0;
size_t count = 0;
buf[offset] = 0;
wchar_t ch;
226,7 → 226,7
if ((klog_stored > 0) && (stdout) && (stdout->op->write)) {
/* Print charaters stored in kernel log */
index_t i;
size_t i;
for (i = klog_len - klog_stored; i < klog_len; i++)
stdout->op->write(stdout, klog[(klog_start + i) % KLOG_LENGTH], silent);
klog_stored = 0;
/trunk/kernel/generic/src/console/cmd.c
513,7 → 513,7
spinlock_lock(&cmd_lock);
link_t *cur;
count_t len = 0;
size_t len = 0;
for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) {
cmd_info_t *hlp;
hlp = list_get_instance(cur, cmd_info_t, link);
651,7 → 651,7
* call the function.
*/
count_t i;
size_t i;
for (i = 0; i < config.cpu_count; i++) {
if (!cpus[i].active)
continue;
970,7 → 970,7
*/
int cmd_tests(cmd_arg_t *argv)
{
count_t len = 0;
size_t len = 0;
test_t *test;
for (test = tests; test->name != NULL; test++) {
if (str_length(test->name) > len)
/trunk/kernel/generic/src/console/kconsole.c
86,7 → 86,7
LIST_INITIALIZE(cmd_head); /**< Command list. */
 
static wchar_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = {};
static count_t history_pos = 0;
static size_t history_pos = 0;
 
/** Initialize kconsole data structures
*
159,9 → 159,9
}
 
/** Print count times a character */
static void print_cc(wchar_t ch, count_t count)
static void print_cc(wchar_t ch, size_t count)
{
count_t i;
size_t i;
for (i = 0; i < count; i++)
putchar(ch);
}
169,7 → 169,7
/** Try to find a command beginning with prefix */
static const char *cmdtab_search_one(const char *name, link_t **startpos)
{
count_t namelen = str_length(name);
size_t namelen = str_length(name);
spinlock_lock(&cmd_lock);
205,7 → 205,7
{
const char *name = input;
count_t found = 0;
size_t found = 0;
link_t *pos = NULL;
const char *hint;
char output[MAX_CMDLINE];
240,7 → 240,7
{
printf("%s> ", prompt);
count_t position = 0;
size_t position = 0;
wchar_t *current = history[history_pos];
current[0] = 0;
280,7 → 280,7
/* Find the beginning of the word
and copy it to tmp */
count_t beg;
size_t beg;
for (beg = position - 1; (beg > 0) && (!isspace(current[beg]));
beg--);
313,7 → 313,7
/* We have a hint */
size_t off = 0;
count_t i = 0;
size_t i = 0;
while ((ch = str_decode(tmp, &off, STR_NO_LIMIT)) != 0) {
if (!wstr_linsert(current, ch, position + i, MAX_CMDLINE))
break;
542,7 → 542,7
if (str_lcmp(hlp->name, cmdline + start,
max(str_length(hlp->name),
str_nlength(cmdline + start, (count_t) (end - start) - 1))) == 0) {
str_nlength(cmdline + start, (size_t) (end - start) - 1))) == 0) {
cmd = hlp;
break;
}
568,7 → 568,7
*/
bool error = false;
count_t i;
size_t i;
for (i = 0; i < cmd->argc; i++) {
start = end;
if (!parse_argument(cmdline, size, &start, &end)) {
659,7 → 659,7
while (true) {
wchar_t *tmp = clever_readline((char *) prompt, stdin);
count_t len = wstr_length(tmp);
size_t len = wstr_length(tmp);
if (!len)
continue;