42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
ansi.c File Reference

The file containing the ansi functions. More...

Functions

void move_cursor (int *pos, char *str, char **str2)
 Move the cursor.
 
int ctrl (char c, int *pos, char *str, char **str2)
 Handle the control key.
 
int backspace (char c, int *pos, char *str, char **str2)
 Handle the backspace key.
 

Detailed Description

The file containing the ansi functions.

Function Documentation

◆ backspace()

int backspace ( char c,
int * pos,
char * str,
char ** str2 )

Handle the backspace key.

Parameters
cThe character
posThe position of the cursor
strThe string
str2The second string
Returns
int 0 if success, 1 otherwise

◆ ctrl()

int ctrl ( char c,
int * pos,
char * str,
char ** str2 )

Handle the control key.

Parameters
cThe character
posThe position of the cursor
strThe string
str2The second string
Returns
int 0 if success, 1 otherwise

◆ move_cursor()

void move_cursor ( int * pos,
char * str,
char ** str2 )

Move the cursor.

Parameters
streamThe stream
posThe position of the cursor
strThe string
str2The second string
Returns
void