Browse Source

queue: remove inttypes clutter from core header

dev/timer
René Kijewski 9 years ago
parent
commit
7035ae0051
  1. 10
      core/include/queue.h
  2. 4
      core/queue.c
  3. 1
      tests/test_thread_msg/main.c

10
core/include/queue.h

@ -21,16 +21,6 @@
#include <stddef.h>
#include <stdint.h>
#include <inttypes.h>
/* mspgcc bug : PRIxxx macros not defined before mid-2011 versions */
/**
* @brief Macro for printing 32 bit format specifier
* @def PRIu32
*/
#ifndef PRIu32
#define PRIu32 "lu"
#endif
/**
* data type for queue nodes

4
core/queue.c

@ -105,12 +105,12 @@ void queue_print(queue_node_t *node)
while (node->next != NULL) {
node = node->next;
printf("Data: %u Priority: %" PRIu32 "\n", node->data, node->priority);
printf("Data: %u Priority: %lu\n", node->data, (unsigned long) node->priority);
}
}
void queue_print_node(queue_node_t *node)
{
printf("Data: %u Priority: %" PRIu32 " Next: %u\n", (unsigned int)node->data, node->priority, (unsigned int)node->next);
printf("Data: %u Priority: %lu Next: %u\n", (unsigned int) node->data, (unsigned long) node->priority, (unsigned int)node->next);
}
#endif

1
tests/test_thread_msg/main.c

@ -19,6 +19,7 @@
*/
#include <stdio.h>
#include <inttypes.h>
#include "thread.h"
#include "msg.h"

Loading…
Cancel
Save