~ubuntu-branches/ubuntu/precise/ncurses/precise

« back to all changes in this revision

Viewing changes to Ada95/samples/ncurses2-attr_test.adb

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-11 16:40:32 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081111164032-dudxd0hy2im0f2bj
Tags: 5.7-2ubuntu1
* Merge from debian unstable, remaining changes:
  - On amd64, use /{,usr/}lib32 instead of /emul/ia32-linux/.
  - Link using -Bsymbolic-functions.
  - Don't install the upstream changelog in the runtime library packages.

* Install wide-character patches into /{,usr/}lib32 as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
--                                 B O D Y                                  --
8
8
--                                                                          --
9
9
------------------------------------------------------------------------------
 
10
-- Copyright (c) 2000-2007,2008 Free Software Foundation, Inc.              --
10
11
--                                                                          --
11
12
-- Permission is hereby granted, free of charge, to any person obtaining a  --
12
13
-- copy of this software and associated documentation files (the            --
35
35
------------------------------------------------------------------------------
36
36
--  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
37
37
--  Version Control
 
38
--  $Revision: 1.9 $
 
39
--  $Date: 2008/07/26 18:47:26 $
38
40
--  Binding Version 01.00
39
41
------------------------------------------------------------------------------
40
42
with ncurses2.util; use ncurses2.util;
178
178
         end if;
179
179
         m := rest mod 2;
180
180
         rest := rest / 2;
 
181
         if 1 = m then
 
182
            a.Protected_Character := True;
 
183
         end if;
181
184
         m := rest mod 2;
182
185
         rest := rest / 2;
183
186
         if 1 = m then
287
287
      begin
288
288
         --  row := 2; -- weird, row is set to 0 without this.
289
289
         --  TODO delete the above line, it was a gdb quirk that confused me
290
 
         if Has_Colors then declare
291
 
            pair : constant Color_Pair :=
 
290
         if Has_Colors then
 
291
            declare pair : constant Color_Pair :=
292
292
              Color_Pair (fg * Color_Number (Number_Of_Colors) + bg);
293
 
         begin
294
 
            --  Go though each color pair. Assume that the number of
295
 
            --  Redefinable_Color_Pairs is 8*8 with predefined Colors 0..7
296
 
            if not pairs (pair) then
297
 
               Init_Pair (pair, fg, bg);
298
 
               pairs (pair) := True;
299
 
            end if;
300
 
            normal.Color := pair;
301
 
         end;
 
293
            begin
 
294
               --  Go though each color pair. Assume that the number of
 
295
               --  Redefinable_Color_Pairs is 8*8 with predefined Colors 0..7
 
296
               if not pairs (pair) then
 
297
                  Init_Pair (pair, fg, bg);
 
298
                  pairs (pair) := True;
 
299
               end if;
 
300
               normal.Color := pair;
 
301
            end;
302
302
         end if;
303
303
         Set_Background (Ch => normal);
304
304
         Erase;