2003-08-26 Marcel Telka <marcel@telka.sk>

* src/cmd/print.c (cmd_print_run): Fixed header print format.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@544 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 41c771380b
commit 3fbc4dc041

@ -1,3 +1,7 @@
2003-08-26 Marcel Telka <marcel@telka.sk>
* src/cmd/print.c (cmd_print_run): Fixed header print format.
2003-08-25 Marcel Telka <marcel@telka.sk>
* configure.ac (AC_INIT): Changed package name.

@ -7,6 +7,7 @@ See libbrux/NEWS for more news.
- Altera EPM7128AETC100 (Rojhalat Ibrahim)
* Added additional checks for valid ByteBlaster cable connection and enabled all variants
of the cable (patch 793313, Rojhalat Ibrahim).
* Fixed minor bugs.
jtag-0.5 (2003-08-19):

@ -24,8 +24,10 @@
#include "sysdep.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#include "part.h"
#include "jtag.h"
@ -36,6 +38,8 @@ static int
cmd_print_run( char *params[] )
{
char format[100];
wchar_t wformat[100];
wchar_t wheader[100];
char header[100];
int i;
int noheader = 0;
@ -61,10 +65,14 @@ cmd_print_run( char *params[] )
if (noheader == 0) {
snprintf( format, 100, _(" No. %%-%ds %%-%ds %%-%ds %%-%ds %%-%ds\n"), MAXLEN_MANUFACTURER, MAXLEN_PART, MAXLEN_STEPPING,
MAXLEN_INSTRUCTION, MAXLEN_DATA_REGISTER );
snprintf( header, 100, format, _("Manufacturer"), _("Part"), _("Stepping"), _("Instruction"), _("Register") );
if (mbstowcs( wformat, format, 100 ) == -1)
printf( _("(%d) String conversion failed!\n"), __LINE__ );
swprintf( wheader, 100, wformat, _("Manufacturer"), _("Part"), _("Stepping"), _("Instruction"), _("Register") );
if (wcstombs( header, wheader, 100 ) == -1)
printf( _("(%d) String conversion failed!\n"), __LINE__ );
printf( header );
for (i = 0; i < strlen( header ); i++ )
for (i = 0; i < wcslen( wheader ); i++ )
putchar( '-' );
putchar( '\n' );
}

Loading…
Cancel
Save