Removed the print_use_colours
feature.
More nuisance than help at this stage; removed.
This commit is contained in:
parent
93c40b7d27
commit
27411689c9
|
@ -99,11 +99,8 @@ int main( int argc, char *argv[] ) {
|
|||
exit( 1 );
|
||||
}
|
||||
|
||||
while ( ( option = getopt( argc, argv, "cpdv:" ) ) != -1 ) {
|
||||
while ( ( option = getopt( argc, argv, "pdv:" ) ) != -1 ) {
|
||||
switch ( option ) {
|
||||
case 'c':
|
||||
print_use_colours = true;
|
||||
break;
|
||||
case 'd':
|
||||
dump_at_end = true;
|
||||
break;
|
||||
|
|
|
@ -27,12 +27,6 @@
|
|||
#include "psse_time.h"
|
||||
#include "vectorspace.h"
|
||||
|
||||
/**
|
||||
* Whether or not we colorise output.
|
||||
* \todo this should be a Lisp symbol binding, not a C variable.
|
||||
*/
|
||||
int print_use_colours = 0;
|
||||
|
||||
/**
|
||||
* print all the characters in the symbol or string indicated by `pointer`
|
||||
* onto this `output`; if `pointer` does not indicate a string or symbol,
|
||||
|
@ -89,18 +83,9 @@ print_list_contents( URL_FILE * output, struct cons_pointer pointer,
|
|||
}
|
||||
|
||||
void print_list( URL_FILE * output, struct cons_pointer pointer ) {
|
||||
if ( print_use_colours ) {
|
||||
url_fwprintf( output, L"%s(%s", "\x1B[31m", "\x1B[39m" );
|
||||
} else {
|
||||
url_fputws( L"(", output );
|
||||
};
|
||||
|
||||
print_list_contents( output, pointer, false );
|
||||
if ( print_use_colours ) {
|
||||
url_fwprintf( output, L"%s)%s", "\x1B[31m", "\x1B[39m" );
|
||||
} else {
|
||||
url_fputws( L")", output );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -178,8 +163,7 @@ struct cons_pointer print( URL_FILE * output, struct cons_pointer pointer ) {
|
|||
print_list( output, pointer );
|
||||
break;
|
||||
case EXCEPTIONTV:
|
||||
url_fwprintf( output, L"\n%sException: ",
|
||||
print_use_colours ? "\x1B[31m" : "" );
|
||||
url_fwuts( L"\nException: ", output );
|
||||
dump_stack_trace( output, pointer );
|
||||
break;
|
||||
case FUNCTIONTV:
|
||||
|
@ -190,17 +174,11 @@ struct cons_pointer print( URL_FILE * output, struct cons_pointer pointer ) {
|
|||
case INTEGERTV:{
|
||||
struct cons_pointer s = integer_to_string( pointer, 10 );
|
||||
inc_ref( s );
|
||||
if ( print_use_colours ) {
|
||||
url_fputws( L"\x1B[34m", output );
|
||||
}
|
||||
print_string_contents( output, s );
|
||||
dec_ref( s );
|
||||
}
|
||||
break;
|
||||
case KEYTV:
|
||||
if ( print_use_colours ) {
|
||||
url_fputws( L"\x1B[1;33m", output );
|
||||
}
|
||||
url_fputws( L":", output );
|
||||
print_string_contents( output, pointer );
|
||||
break;
|
||||
|
@ -254,22 +232,13 @@ struct cons_pointer print( URL_FILE * output, struct cons_pointer pointer ) {
|
|||
buffer[i] = '\0';
|
||||
}
|
||||
}
|
||||
if ( print_use_colours ) {
|
||||
url_fputws( L"\x1B[34m", output );
|
||||
}
|
||||
url_fwprintf( output, L"%s", buffer );
|
||||
free( buffer );
|
||||
break;
|
||||
case STRINGTV:
|
||||
if ( print_use_colours ) {
|
||||
url_fputws( L"\x1B[36m", output );
|
||||
}
|
||||
print_string( output, pointer );
|
||||
break;
|
||||
case SYMBOLTV:
|
||||
if ( print_use_colours ) {
|
||||
url_fputws( L"\x1B[1;33m", output );
|
||||
}
|
||||
print_string_contents( output, pointer );
|
||||
break;
|
||||
case SPECIALTV:
|
||||
|
@ -297,17 +266,11 @@ struct cons_pointer print( URL_FILE * output, struct cons_pointer pointer ) {
|
|||
break;
|
||||
default:
|
||||
fwprintf( stderr,
|
||||
L"%sError: Unrecognised tag value %d (%c%c%c%c)\n",
|
||||
print_use_colours ? "\x1B[31m" : "",
|
||||
cell.tag.value, cell.tag.bytes[0], cell.tag.bytes[1],
|
||||
cell.tag.bytes[2], cell.tag.bytes[3] );
|
||||
L"Error: Unrecognised tag value %d (%4.4s)\n",
|
||||
cell.tag.value, &cell.tag.bytes[0] );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( print_use_colours ) {
|
||||
url_fputws( L"\x1B[39m", output );
|
||||
}
|
||||
|
||||
return pointer;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,5 @@
|
|||
|
||||
struct cons_pointer print( URL_FILE * output, struct cons_pointer pointer );
|
||||
void println( URL_FILE * output );
|
||||
extern int print_use_colours;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue