source: rtems/c/src/ada-tests/sptests/spname01/sptest.adb @ f619250

4.115
Last change on this file since f619250 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1--
2--  SPTEST / BODY
3--
4--  DESCRIPTION:
5--
6--  This package is the implementation of the Ada Task Name test of the RTEMS
7--  Ada Single Processor Test Suite.
8--
9--  DEPENDENCIES:
10--
11-- 
12--
13--  COPYRIGHT (c) 1989-2009.
14--  On-Line Applications Research Corporation (OAR).
15--
16--  The license and distribution terms for this file may in
17--  the file LICENSE in this distribution or at
18--  http://www.rtems.com/license/LICENSE.
19--
20
21with RTEMS;
22with TEST_SUPPORT;
23with TEXT_IO;
24with System; use System;  -- for Null Pointer comparison
25
26package body SPTEST is
27
28   task body AdaTask is
29      Status     : RTEMS.Status_Codes;
30      Pointer    : RTEMS.Address;
31      StringName : String(1 .. 120) := (1 .. 120 => '*' );
32      NewName    : constant String  := "Josiah";
33   begin
34
35      TEXT_IO.NEW_LINE( 2 );
36      TEXT_IO.PUT_LINE( "*** Ada Task Name TEST ***" );
37
38      RTEMS.Object_Get_Name( RTEMS.Self, StringName, Pointer );
39      if Pointer = RTEMS.Null_Address then
40         TEXT_IO.PUT_LINE( "Object_Get_Name_Failed" );
41      else
42         TEXT_IO.PUT_LINE( "My name is (" & StringName & ")" );
43      end if;
44
45      TEXT_IO.PUT_LINE( "Setting name to (Josiah)" );
46      RTEMS.Object_Set_Name( RTEMS.Self, NewName, Status );
47      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "Object_Set_Name" );
48
49      RTEMS.Object_Get_Name( RTEMS.Self, StringName, Pointer );
50      if Pointer = RTEMS.Null_Address then
51         TEXT_IO.PUT_LINE( "Object_Get_Name_Failed" );
52      else
53         TEXT_IO.PUT_LINE( "My name is (" & StringName & ")" );
54      end if;
55
56      TEXT_IO.PUT_LINE( "*** END OF Ada Task Name TEST ***" );
57
58      RTEMS.SHUTDOWN_EXECUTIVE( 0 );
59
60   end AdaTask;
61
62end SPTEST;
Note: See TracBrowser for help on using the repository browser.