-
Notifications
You must be signed in to change notification settings - Fork 32
Added functionality to access terminal window height (number of lines) #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4be41c4
Update gnatcoll-terminal.adb
fastrgv 301c782
Update gnatcoll-terminal.ads
fastrgv 5802d50
Update terminals.c
fastrgv f778deb
Update gnatcoll-terminal.adb
fastrgv 550c292
Update gnatcoll-terminal.ads
fastrgv 38b8ed9
Update terminals.c
fastrgv 0e0eee0
Update gnatcoll-terminal.ads
fastrgv 97ff1c0
Update terminals.c
fastrgv 68967ef
Update terminals.c
fastrgv 9a9e766
Update terminals.c
fastrgv 9cd0e8b
Update terminals.c
fastrgv 613ca5d
Add files via upload
fastrgv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| ------------------------------------------------------------------------------ | ||
| -- -- | ||
| -- G N A T C O L L -- | ||
| -- -- | ||
| -- Copyright (C) 2006-2019, AdaCore -- | ||
| -- -- | ||
| -- This library is free software; you can redistribute it and/or modify it -- | ||
| -- under terms of the GNU General Public License as published by the Free -- | ||
| -- Software Foundation; either version 3, or (at your option) any later -- | ||
| -- version. This library is distributed in the hope that it will be useful, -- | ||
| -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- | ||
| -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- | ||
| -- -- | ||
| -- As a special exception under Section 7 of GPL version 3, you are granted -- | ||
| -- additional permissions described in the GCC Runtime Library Exception, -- | ||
| -- version 3.1, as published by the Free Software Foundation. -- | ||
| -- -- | ||
| -- You should have received a copy of the GNU General Public License and -- | ||
| -- a copy of the GCC Runtime Library Exception along with this program; -- | ||
| -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- | ||
| -- <http://www.gnu.org/licenses/>. -- | ||
| -- -- | ||
| ------------------------------------------------------------------------------ | ||
|
|
||
|
|
||
| with GNATCOLL.Terminal; use GNATCOLL.Terminal; | ||
| with Ada.Text_IO; use Ada.Text_IO; | ||
|
|
||
| procedure testlines is | ||
| winrows, wincols: integer; | ||
| info: terminal_info; | ||
| begin | ||
| info.init_for_stdout(auto); | ||
| wincols:=get_width(info); | ||
| winrows:=get_lines(info); | ||
|
|
||
| put("Lines:"); | ||
| put(integer'image(winrows)); | ||
| put(", Columns:"); | ||
| put(integer'image(wincols)); | ||
| new_line; | ||
|
|
||
| end testlines; | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the extra blank lines - there should be at most one blank line as separation. (Same goes for lines 452-453.)