source: rtems/testsuites/sptests/spprintk/init.c @ 380c61a

4.104.115
Last change on this file since 380c61a was 2f2da91, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/24/09 at 06:14:30

Eliminate unused vars.

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[4f7b4a8]1/*
[02ba7ca]2 *  Exercise Printk
3 *
[4f7b4a8]4 *  COPYRIGHT (c) 1989-2009.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#include <tmacros.h>
15
16rtems_task Init(
17  rtems_task_argument argument
[02ba7ca]18)
19{
[51dc1b3f]20  printk( "\n\n*** TEST PRINTK ***\n" );
[02ba7ca]21
[046f4715]22  putk( "This is a test of putk\n" );
23
[02ba7ca]24  printk( "bad format -- %%q in parentheses (%q)\n" );
25
[51dc1b3f]26  printk( "bad format -- %%lq in parentheses (%lq)\n", 0x1234 );
27
28  printk( "%%O octal upper case 16 -- %O\n", 16 );
29  printk( "%%o octal lower case of 16 -- %O\n", 16 );
30  printk( "%%I of 16 -- %I\n", 16 );
31  printk( "%%i of 16 -- %i\n", 16 );
32  printk( "%%D of 16 -- %D\n", 16 );
33  printk( "%%d of 16 -- %d\n", 16 );
[4f67befd]34  printk( "%%-3d of 16 -- %-3d\n", 16 );
[51dc1b3f]35  printk( "%%U of 16 -- %U\n", 16 );
36  printk( "%%u of 16 -- %u\n", 16 );
37  printk( "%%X of 16 -- %X\n", 16 );
38  printk( "%%x of 16 -- %x\n", 16 );
39  printk( "%%p of 0x1234 -- %p\n", (void *)0x1234 );
[4f67befd]40
41  /* negative numbers */
42  printk( "%%d of -16 -- %d\n", -16 );
43  printk( "%%d of -16 -- %-3d\n", -16 );
44  printk( "%%u of -16 -- %u\n", -16 );
45
46  /* string formats */
[51dc1b3f]47  printk( "%%s of Mary Had a Little Lamb -- (%s)\n",
48          "Mary Had a Little Lamb" );
49  printk( "%%s of NULL -- (%s)\n", NULL );
[4f67befd]50  printk( "%%12s of joel -- (%20s)\n", "joel" );
51  printk( "%%4s of joel -- (%4s)\n", "joel" );
52  printk( "%%-12s of joel -- (%-20s)\n", "joel" );
53  printk( "%%-4s of joel -- (%-4s)\n", "joel" );
54  printk( "%%c of X -- (%c)\n", 'X' );
55
[51dc1b3f]56
[046f4715]57  printk( "*** END OF TEST PRINTK ***\n" );
[02ba7ca]58  rtems_test_exit( 0 );
59}
[4f7b4a8]60
61/* configuration information */
62
63#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
64
[02ba7ca]65#define CONFIGURE_MAXIMUM_TASKS           1
66
[4f7b4a8]67#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
68
[02ba7ca]69#define CONFIGURE_INIT
[4f7b4a8]70
71#include <rtems/confdefs.h>
72
Note: See TracBrowser for help on using the repository browser.