diff --git a/jtag/ChangeLog b/jtag/ChangeLog index b357efa5..610272e3 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,10 @@ +2003-05-14 Marcel Telka + + * include/part.h (part_t, parts_t): Macros removed. + * src/detect.c: Replaced obsolete types `parts' with `parts_t' and `part' with `part_t'. + * src/part/parse.c: Ditto. + * src/part/part.c: Ditto. + 2003-05-14 Marcel Telka * configure.ac (AC_CONFIG_FILES): Added src/flash/Makefile. diff --git a/jtag/include/part.h b/jtag/include/part.h index 3833744c..56bda921 100644 --- a/jtag/include/part.h +++ b/jtag/include/part.h @@ -36,7 +36,6 @@ #define MAXLEN_PART 20 #define MAXLEN_STEPPING 8 -#define part_t part typedef struct part part_t; struct part { @@ -61,7 +60,6 @@ void part_set_instruction( part_t *p, const char *iname ); void part_set_signal( part_t *p, const char *pname, int out, int val ); int part_get_signal( part_t *p, const char *pname ); -#define parts_t parts typedef struct parts parts_t; struct parts { diff --git a/jtag/src/detect.c b/jtag/src/detect.c index 44fca20a..0747ef2e 100644 --- a/jtag/src/detect.c +++ b/jtag/src/detect.c @@ -156,7 +156,7 @@ find_record( char *filename, tap_register *key, struct id_record *idr ) return r; } -parts * +parts_t * detect_parts( chain_t *chain, char *db_path ) { char data_path[1024]; @@ -167,7 +167,7 @@ detect_parts( chain_t *chain, char *db_path ) tap_register *zeros = register_fill( register_alloc( 32 ), 0 ); tap_register *ones = register_fill( register_alloc( 32 ), 1 ); tap_register *id = register_alloc( 32 ); - parts *ps = parts_alloc(); + parts_t *ps = parts_alloc(); if (!zeros || !ones || !id || !ps) { printf( "%s: out of memory\n", __FUNCTION__ ); @@ -187,7 +187,7 @@ detect_parts( chain_t *chain, char *db_path ) struct id_record idr; char *p; FILE *f; - part *part; + part_t *part; tap_shift_register( chain, zeros, id, 0 ); if (!register_compare( id, zeros )) diff --git a/jtag/src/part/parse.c b/jtag/src/part/parse.c index 18668d0d..0f2e87a4 100644 --- a/jtag/src/part/parse.c +++ b/jtag/src/part/parse.c @@ -38,11 +38,11 @@ get_token( char *buf ) return t; } -part * +part_t * read_part( FILE *f, tap_register *idr ) { int line = 0; - part *part; + part_t *part; if (!f) return NULL; diff --git a/jtag/src/part/part.c b/jtag/src/part/part.c index 806b6174..0ad4c681 100644 --- a/jtag/src/part/part.c +++ b/jtag/src/part/part.c @@ -29,10 +29,10 @@ /* part */ -part * +part_t * part_alloc( void ) { - part *p = malloc( sizeof *p ); + part_t *p = malloc( sizeof *p ); if (!p) return NULL; @@ -51,7 +51,7 @@ part_alloc( void ) } void -part_free( part *p ) +part_free( part_t *p ) { int i; @@ -88,7 +88,7 @@ part_free( part *p ) } instruction * -part_find_instruction( part *p, const char *iname ) +part_find_instruction( part_t *p, const char *iname ) { instruction *i; @@ -106,7 +106,7 @@ part_find_instruction( part *p, const char *iname ) } data_register * -part_find_data_register( part *p, const char *drname ) +part_find_data_register( part_t *p, const char *drname ) { data_register *dr; @@ -123,14 +123,14 @@ part_find_data_register( part *p, const char *drname ) return dr; } -void part_set_instruction( part *p, const char *iname ) +void part_set_instruction( part_t *p, const char *iname ) { if (p) p->active_instruction = part_find_instruction( p, iname ); } void -part_set_signal( part *p, const char *pname, int out, int val ) +part_set_signal( part_t *p, const char *pname, int out, int val ) { signal_t *s; @@ -177,7 +177,7 @@ part_set_signal( part *p, const char *pname, int out, int val ) } int -part_get_signal( part *p, const char *pname ) +part_get_signal( part_t *p, const char *pname ) { signal_t *s; @@ -211,10 +211,10 @@ part_get_signal( part *p, const char *pname ) /* parts */ -parts * +parts_t * parts_alloc( void ) { - parts *ps = malloc( sizeof *ps ); + parts_t *ps = malloc( sizeof *ps ); if (!ps) return NULL; @@ -225,7 +225,7 @@ parts_alloc( void ) } void -parts_free( parts *ps ) +parts_free( parts_t *ps ) { int i; @@ -240,9 +240,9 @@ parts_free( parts *ps ) } int -parts_add_part( parts *ps, part *p ) +parts_add_part( parts_t *ps, part_t *p ) { - part **np = realloc( ps->parts, (ps->len + 1) * sizeof *ps->parts ); + part_t **np = realloc( ps->parts, (ps->len + 1) * sizeof *ps->parts ); if (!np) return 0; @@ -254,7 +254,7 @@ parts_add_part( parts *ps, part *p ) } void -parts_set_instruction( parts *ps, const char *iname ) +parts_set_instruction( parts_t *ps, const char *iname ) { int i; @@ -263,7 +263,7 @@ parts_set_instruction( parts *ps, const char *iname ) } void -parts_print( parts *ps, int header ) +parts_print( parts_t *ps, int header ) { int i; @@ -285,7 +285,7 @@ parts_print( parts *ps, int header ) for (i = 0; i < ps->len; i++) { char *instruction = "(none)"; char *dr = "(none)"; - part *p = ps->parts[i]; + part_t *p = ps->parts[i]; if (p->active_instruction) { instruction = p->active_instruction->name;