PatchworkOS
Loading...
Searching...
No Matches
history.h File Reference
#include <stdint.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  history_t
 

Macros

#define HISTORY_MAX_ENTRY   32
 

Functions

void history_init (history_t *history)
 
void history_deinit (history_t *history)
 
void history_push (history_t *history, const char *entry)
 
const char * history_next (history_t *history)
 
const char * history_previous (history_t *history)
 

Macro Definition Documentation

◆ HISTORY_MAX_ENTRY

#define HISTORY_MAX_ENTRY   32

Definition at line 6 of file history.h.

Function Documentation

◆ history_deinit()

void history_deinit ( history_t history)

Definition at line 12 of file history.c.

References history_t::count, history_t::entries, and free().

Referenced by interactive_shell().

◆ history_init()

void history_init ( history_t history)

Definition at line 6 of file history.c.

References history_t::count, and history_t::index.

Referenced by interactive_shell().

◆ history_next()

const char * history_next ( history_t history)

Definition at line 48 of file history.c.

References history_t::count, history_t::entries, history_t::index, and NULL.

Referenced by interactive_handle_ansi().

◆ history_previous()

const char * history_previous ( history_t history)

Definition at line 60 of file history.c.

References history_t::count, history_t::entries, history_t::index, and NULL.

Referenced by interactive_handle_ansi().

◆ history_push()

void history_push ( history_t history,
const char *  entry 
)