OpenCores
URL https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [cli/] [cli/] [sys_cli.c] - Diff between revs 24 and 28

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 24 Rev 28
Line 34... Line 34...
#include "sys_error.h"
#include "sys_error.h"
 
 
 
 
 
 
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/
 
void clear_screen(void)
 
{
 
  PRINTF_MACRO("\033[H\033[J");
 
}
 
 
 
 
 
/*-----------------------------------------------------------*/
#ifdef ANSI_ESCAPE_CODE
#ifdef ANSI_ESCAPE_CODE
#define ASCII_ESC '\x1b'
#define ASCII_ESC '\x1b'
 
 
static void send_csi( char c )
static void send_csi( char c )
{
{
Line 229... Line 236...
      bytes_read = (unsigned int)read( STDIN_FILENO, (void *)in_buffer, sizeof(in_buffer) );
      bytes_read = (unsigned int)read( STDIN_FILENO, (void *)in_buffer, sizeof(in_buffer) );
      cli_ptr = cli_edit_buffer( in_buffer, NULL, bytes_read );
      cli_ptr = cli_edit_buffer( in_buffer, NULL, bytes_read );
    }
    }
 
 
    if( out_buffer[0] == '\0' )
    if( out_buffer[0] == '\0' )
    {
 
      PRINTF_MACRO( " NULL String! Command ignored\r\n" );
 
      last_return_value = EXIT_FAILURE;
      last_return_value = EXIT_FAILURE;
    }
 
 
 
    while( last_return_value != EXIT_FAILURE )
    while( last_return_value != EXIT_FAILURE )
    {
    {
      cli_ptr = strtok( out_buffer, " \t" );
      cli_ptr = strtok( out_buffer, " \t" );
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2020 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.