URL
https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk
Subversion Repositories qaz_libs
Compare Revisions
- This comparison shows the changes necessary to convert path
/qaz_libs
- from Rev 18 to Rev 17
- ↔ Reverse comparison
Rev 18 → Rev 17
/trunk/cli/sys_cmd.c
15,7 → 15,7
|
for(i = 0; cli_commands[i].func != NULL; i++); |
|
cli_no_of_commands = i; |
cli_no_of_commands = 1; |
} |
|
|
/trunk/cli/sys_cli.c
8,12 → 8,10
#include "sys_cmd.h" |
#include "sys_error.h" |
|
#define ASCII_ESC '\x1b' |
|
|
/*-----------------------------------------------------------*/ |
#ifdef ANSI_ESCAPE_CODE |
#define ASCII_ESC '\x1b' |
|
static void send_csi( char c ) |
{ |
putchar( ASCII_ESC ); |
20,9 → 18,6
putchar( '[' ); |
putchar( c ); |
} |
#else |
static void send_csi( char c ) {}; |
#endif |
|
|
/*-----------------------------------------------------------*/ |
31,11 → 26,8
static char *out_ptr; |
static char *begin_ptr; |
static char *end_ptr; |
|
#ifdef ANSI_ESCAPE_CODE |
static char prev_char; |
static unsigned int csi; |
#endif |
|
unsigned int i; |
|
45,10 → 37,8
begin_ptr = out_buffer; |
end_ptr = out_buffer + INPUT_LINE_LENGTH; |
|
#ifdef ANSI_ESCAPE_CODE |
prev_char = 0; |
csi = 0; |
#endif |
} |
|
for( i = 0 ; i < line_length ; i++ ) |
59,7 → 49,7
*end_ptr = '\0'; |
return( NULL ); |
} |
|
|
if( out_ptr < begin_ptr ) |
sys_error_fatal( FATAL_ERROR_CLI ); |
|
88,10 → 78,10
{ |
putchar( ' ' ); |
send_csi( '\a' ); |
} |
} |
|
break; |
|
#ifdef ANSI_ESCAPE_CODE |
case ASCII_ESC: |
break; |
|
99,8 → 89,8
if( prev_char == ASCII_ESC ) |
{ |
csi = 1; |
} else |
{ |
} else |
{ |
*out_ptr = in_buffer[i]; |
out_ptr++; |
} |
155,7 → 145,6
out_ptr++; |
} |
break; |
#endif |
|
default: |
*out_ptr = in_buffer[i]; |
163,9 → 152,7
break; |
} |
|
#ifdef ANSI_ESCAPE_CODE |
prev_char = in_buffer[i]; |
#endif |
} |
|
return( out_ptr ); |
184,9 → 171,9
char *cli_argv[MAX_CLI_ARGC]; |
struct cli_cmd_tab_t *cli_cmd; |
unsigned int bytes_read; |
|
|
cli_init(); |
|
|
PRINTF_MACRO( "\r\n" ); |
|
for( ;; ) |
241,7 → 228,7
} |
|
PRINTF_MACRO( "\r\n" ); |
|
|
last_return_value = cli_cmd->func( cli_argc, (const char **)cli_argv ); |
break; |
} |
/trunk/cli/sys_cmd.h
10,8 → 10,6
|
#include <xil_printf.h> |
|
// #define ANSI_ESCAPE_CODE |
|
#define PRINTF_MACRO xil_printf |
// #define PRINTF_MACRO iprintf |
|