Skip to content

Commit

Permalink
New release 0.0.3!
Browse files Browse the repository at this point in the history
  • Loading branch information
joseaverde committed Dec 6, 2020
1 parent 1a15538 commit 584d14e
Show file tree
Hide file tree
Showing 12 changed files with 245 additions and 88 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ old
# DEBUGGING #
gmem.out
Makefile
github
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.3] -
## [0.0.3] - 2020-12-06
### Added
- Added documentation to all parts of the Ansi package.
- Added documentation to all parts of the Ansi package except IO package.
- Added Signal and Input handling.
- Finished implementing surfaces, colours and styles.
- Added support for the non-ansi-compliant windows console CMD, to support older versions of Windows.
- Finished some things marked to do.

### Fixed
- Fixed the format of this changelog.
- Fixed Put(3) procedure in Ansi.Surfaces and added style printing too.
- Fixed native support for older Windows consoles.
- Fixed some bugs and errors found while coding.

### Removed
- Removed the inlining of many of the functions and procedures throughout the package.
- Removed Ansi.Pools, it will be available in a future.


## [0.0.2] - 2020-11-21
Expand Down
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
* TODO TODO comments.
* Update styles in the Put function of Ansi.Surfaces
* Recheck implementations.
* Finish Windows part
25 changes: 23 additions & 2 deletions src/ansi-compliance.ads
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,27 @@ private package Ansi.Compliance is
-- STYLE OPERATIONS --
----------------------
-- This part declares the styling procedures.

--
-- This function returns the code to put a style in standard output without
-- the trailing `ESC[' and the `m'.
--
-- @param Style
-- The style to generate.
--
-- @param Remove
-- If this parameter is set to true, it will return the code to remove the
-- given style.
--
-- @return
-- The code to put the given style, in Windows it returns a null string,
-- though.
--
function Gen_Style (Style : Style_Type;
Remove: Boolean := False)
return Str_Type;
pragma Inline (Gen_Style);
pragma Pure_Function (Gen_Style);

--
-- This procedure is used to set an array of styles into standard output.
Expand Down Expand Up @@ -235,7 +256,7 @@ private package Ansi.Compliance is
-- This procedure moves the position of the cursor up. In windows it uses
-- the Set_Position function if it's non-ansi-compliant.
--
-- @param Rows
-- @param Cols
-- The number of rows to move up.
--
procedure Move_Right (Cols: Positive := 1);
Expand All @@ -245,7 +266,7 @@ private package Ansi.Compliance is
-- This procedure moves the position of the cursor up. In windows it uses
-- the Set_Position function if it's non-ansi-compliant.
--
-- @param Rows
-- @param Cols
-- The number of rows to move up.
--
procedure Move_Left (Cols: Positive := 1);
Expand Down
39 changes: 0 additions & 39 deletions src/ansi-pools.ads

This file was deleted.

12 changes: 12 additions & 0 deletions src/ansi-styles.adb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ package body Ansi.Styles is
-- SURFACE OPERATIONS --
------------------------

function Gen_Style (Style : Style_Type;
Remove: Boolean := False)
return Str_Type is
begin

return Ansi.Compliance.Gen_Style(Style => Style,
Remove => Remove);

end Gen_Style;



procedure Get_Style (Surface: in not null Surface_Type;
Styles : out Style_Array;
Row : Row_Type;
Expand Down
20 changes: 20 additions & 0 deletions src/ansi-styles.ads
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@ package Ansi.Styles is
-- SURFACE OPERATIONS --
------------------------

--
-- This function returns the code used to put a style in a two byte string,
-- for example to put it bright its: ESC[1m, then it returns "_1" (The
-- underscore is a null byte. In windows it returns a null string.
--
-- @param Style
-- The style to put.
--
-- @param Remove
-- If true it returns the code to remove the style.
--
-- @return
-- The string to put to get such style.
--
function Gen_Style (Style : Style_Type;
Remove: Boolean := False)
return Str_Type;
pragma Inline (Gen_Style);
pragma Pure_Function (Gen_Style);

--
-- This procedure returns the style in a certain position of the surface.
--
Expand Down
Loading

0 comments on commit 584d14e

Please sign in to comment.