From 4c84d7b760ceb1e140c1cfc0fa64289ca4d243ed Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 30 Mar 2004 11:12:01 +0000 Subject: 2004-03-30 Ralf Corsepius * fileio/init.c, fileio/system.h, ticker/system.h, ticker/tasks.c, unlimited/init.c, unlimited/test1.c, unlimited/test2.c, unlimited/test3.c: Convert to using c99 fixed size types. --- testsuites/samples/ChangeLog | 6 ++++++ testsuites/samples/fileio/init.c | 10 +++++----- testsuites/samples/fileio/system.h | 4 ++-- testsuites/samples/ticker/system.h | 4 ++-- testsuites/samples/ticker/tasks.c | 2 +- testsuites/samples/unlimited/init.c | 4 ++-- testsuites/samples/unlimited/test1.c | 2 +- testsuites/samples/unlimited/test2.c | 12 ++++++------ testsuites/samples/unlimited/test3.c | 6 +++--- 9 files changed, 28 insertions(+), 22 deletions(-) diff --git a/testsuites/samples/ChangeLog b/testsuites/samples/ChangeLog index b85d400299..088d639459 100644 --- a/testsuites/samples/ChangeLog +++ b/testsuites/samples/ChangeLog @@ -1,3 +1,9 @@ +2004-03-30 Ralf Corsepius + + * fileio/init.c, fileio/system.h, ticker/system.h, ticker/tasks.c, + unlimited/init.c, unlimited/test1.c, unlimited/test2.c, + unlimited/test3.c: Convert to using c99 fixed size types. + 2004-03-25 Ralf Corsepius * configure.ac: Add 2nd arg to RTEMS_TOP. diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c index 1cb82a011d..5fafd446d6 100644 --- a/testsuites/samples/fileio/init.c +++ b/testsuites/samples/fileio/init.c @@ -163,7 +163,7 @@ void fileio_list_file(void) { char fname[1024]; char *buf_ptr = NULL; - unsigned32 flen = 0; + uint32_t flen = 0; int fd = -1; ssize_t n; size_t buf_size = 100; @@ -225,7 +225,7 @@ void fileio_list_file(void) /* * convert a size string (like 34K or 12M) to actual byte count */ -boolean fileio_str2size(const char *str,unsigned32 *res_ptr) +boolean fileio_str2size(const char *str,uint32_t *res_ptr) { boolean failed = FALSE; unsigned long size; @@ -254,8 +254,8 @@ void fileio_write_file(void) { char fname[1024]; char tmp_str[32]; - unsigned32 file_size = 0; - unsigned32 buf_size = 0; + uint32_t file_size = 0; + uint32_t buf_size = 0; size_t curr_pos,bytes_to_copy; int fd = -1; ssize_t n; @@ -415,7 +415,7 @@ void fileio_read_file(void) { char fname[1024]; char tmp_str[32]; - unsigned32 buf_size = 0; + uint32_t buf_size = 0; size_t curr_pos; int fd = -1; ssize_t n; diff --git a/testsuites/samples/fileio/system.h b/testsuites/samples/fileio/system.h index 9c35b83da3..105e44c200 100644 --- a/testsuites/samples/fileio/system.h +++ b/testsuites/samples/fileio/system.h @@ -93,7 +93,7 @@ int rtems_bdbuf_configuration_size =( sizeof(rtems_bdbuf_configuration) #define put_name( _name, _crlf ) \ do { \ - rtems_unsigned32 c0, c1, c2, c3; \ + uint32_t c0, c1, c2, c3; \ \ c0 = ((_name) >> 24) & 0xff; \ c1 = ((_name) >> 16) & 0xff; \ @@ -111,7 +111,7 @@ int rtems_bdbuf_configuration_size =( sizeof(rtems_bdbuf_configuration) * static inline routine to make obtaining ticks per second easier. */ -static inline rtems_unsigned32 get_ticks_per_second( void ) +static inline uint32_t get_ticks_per_second( void ) { rtems_interval ticks_per_second; (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second ); return ticks_per_second; diff --git a/testsuites/samples/ticker/system.h b/testsuites/samples/ticker/system.h index 2139bc1403..fa231d56e4 100644 --- a/testsuites/samples/ticker/system.h +++ b/testsuites/samples/ticker/system.h @@ -73,7 +73,7 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */ #define put_name( _name, _crlf ) \ do { \ - rtems_unsigned32 c0, c1, c2, c3; \ + uint32_t c0, c1, c2, c3; \ \ c0 = ((_name) >> 24) & 0xff; \ c1 = ((_name) >> 16) & 0xff; \ @@ -91,7 +91,7 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */ * static inline routine to make obtaining ticks per second easier. */ -static inline rtems_unsigned32 get_ticks_per_second( void ) +static inline uint32_t get_ticks_per_second( void ) { rtems_interval ticks_per_second; (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second ); return ticks_per_second; diff --git a/testsuites/samples/ticker/tasks.c b/testsuites/samples/ticker/tasks.c index 4ba35f61c1..e59557ed91 100644 --- a/testsuites/samples/ticker/tasks.c +++ b/testsuites/samples/ticker/tasks.c @@ -27,7 +27,7 @@ rtems_task Test_task( { rtems_id tid; rtems_time_of_day time; - rtems_unsigned32 task_index; + uint32_t task_index; rtems_status_code status; status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c index 925d4589b3..eeebf4b1ac 100644 --- a/testsuites/samples/unlimited/init.c +++ b/testsuites/samples/unlimited/init.c @@ -37,7 +37,7 @@ rtems_task Init( { rtems_task_priority old_priority; rtems_mode old_mode; - rtems_unsigned32 task; + uint32_t task; /* lower the task priority to allow created tasks to execute */ @@ -80,7 +80,7 @@ void destory_all_tasks( const char *who ) { - rtems_unsigned32 task; + uint32_t task; /* * If the id is not zero, signal the task to delete. diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c index 89e46a54a9..09e67a6191 100644 --- a/testsuites/samples/unlimited/test1.c +++ b/testsuites/samples/unlimited/test1.c @@ -26,7 +26,7 @@ void test1() { boolean auto_extend; rtems_status_code result; - rtems_unsigned32 task_count = 0; + uint32_t task_count = 0; Objects_Information *the_information; char c1 = 'a'; diff --git a/testsuites/samples/unlimited/test2.c b/testsuites/samples/unlimited/test2.c index c892315143..fe2f86ebeb 100644 --- a/testsuites/samples/unlimited/test2.c +++ b/testsuites/samples/unlimited/test2.c @@ -27,10 +27,10 @@ void test2() { rtems_status_code result; - rtems_unsigned32 remove_task; - rtems_unsigned32 task; - rtems_unsigned32 block; - rtems_unsigned32 task_count = 0; + uint32_t remove_task; + uint32_t task; + uint32_t block; + uint32_t task_count = 0; rtems_id removed_ids[TASK_ALLOCATION_SIZE * 2]; char c1 = 'a'; @@ -126,7 +126,7 @@ void test2() for (task = 0; task < (TASK_ALLOCATION_SIZE * 2); task++) { rtems_name name; - rtems_unsigned32 id_slot; + uint32_t id_slot; /* * Find a free slot in the task id table. @@ -202,7 +202,7 @@ void test2() if (remove_task == (TASK_ALLOCATION_SIZE * 2)) { - rtems_unsigned32 allocated_id; + uint32_t allocated_id; for (allocated_id = 0; allocated_id < MAX_TASKS; allocated_id++) if ((task_id[id_slot] == task_id[allocated_id]) && (id_slot != allocated_id)) diff --git a/testsuites/samples/unlimited/test3.c b/testsuites/samples/unlimited/test3.c index f3624d72ad..5ae799066f 100644 --- a/testsuites/samples/unlimited/test3.c +++ b/testsuites/samples/unlimited/test3.c @@ -27,9 +27,9 @@ void test3() { rtems_status_code result; - rtems_unsigned32 remove_task; - rtems_unsigned32 block; - rtems_unsigned32 task_count = 0; + uint32_t remove_task; + uint32_t block; + uint32_t task_count = 0; char c1 = 'a'; char c2 = 'a'; -- cgit v1.2.3