[Git][java-team/jansi-native][upstream] New upstream version 1.8

Emmanuel Bourg gitlab at salsa.debian.org
Mon Nov 26 12:54:52 GMT 2018


Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / jansi-native


Commits:
0c6747dd by Emmanuel Bourg at 2018-11-26T12:47:41Z
New upstream version 1.8
- - - - -


26 changed files:

- − docs/README
- − docs/config.yaml
- − docs/src/downloads/index.page
- − docs/src/images/after-jansi-jna-windows.png
- − docs/src/images/after-jansi-windows.png
- − docs/src/images/before-windows.png
- − docs/src/images/project-icon.png
- − docs/src/images/project-logo-full.png
- − docs/src/images/project-logo.png
- − docs/src/index.page
- − docs/src/metainfo
- − docs/src/styles/default/blog.template
- − docs/src/styles/default/css/site.css
- − docs/src/styles/default/images/rss.gif
- − docs/src/styles/default/images/spot-banner.gif
- − docs/src/styles/default/main.template
- − docs/src/todo.page
- − docs/src/virtual
- pom.xml
- readme.md
- src/main/java/org/fusesource/jansi/internal/CLibrary.java
- src/main/java/org/fusesource/jansi/internal/Kernel32.java
- src/main/java/org/fusesource/jansi/internal/WindowsSupport.java
- + src/main/native-package/src/jansi_isatty.c
- src/main/native-package/src/windows/Makefile
- src/main/native-package/vs2010.vcxproj


Changes:

=====================================
docs/README deleted
=====================================
@@ -1,48 +0,0 @@
----
-# Copyright (C) 2009-2017 the original author(s).
-# 
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-title: Generating the Docs
---- 
-
-Overview
-=============================
-
-We are using [webgen](http://webgen.rubyforge.org/) for generating nice HTML based documentation.
-
-Installing 
------------------------------
-
-You first need ruby and rubygems installed on your system. 
-You should have gems version of 1.3.4 or greater. You can check this via 
-
-gem --version
-
-To update gems do 
-gem update --system 
-
-Then you can install webgen with the following command.
-
-`sudo gem install webgen coderay feedtools haml RedCloth`
-
-Building 
------------------------------
-
-It's as simple as running `webgen` in the current directory.  Output is stored in 
-the `out` directory.
-
-
-
-
-


=====================================
docs/config.yaml deleted
=====================================
@@ -1,20 +0,0 @@
-# Copyright (C) 2009-2017 the original author(s).
-# 
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# The available configuration options can be listed using the `webgen config`
-# command, for example: `webgen config sourcehandler` will list all options starting
-# with sourcehandler.
-
-# lets turn off line numbers
-tag.coderay.line_numbers: false


=====================================
docs/src/downloads/index.page deleted
=====================================
@@ -1,72 +0,0 @@
----
-# Copyright (C) 2009-2017 the original author(s).
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-title: Downloads
-in_menu: true
-sort_info: 1
---- name:overview
-
-# {project_name:}
-Download it Today!
-
---- name:content pipeline:haml,tags
-
-.left
-  %h1 Just need a jar?
-  
-.right
-  Try out the nightly build:
-  %ul
-    %li
-      %a{:href => "http://{project_id:}.fusesource.org/repo/release/org/fusesource/{project_id:}/{project_id:}/{project_version:}/{project_id:}-{project_version:}.jar"}
-        {project_id:}-{project_version:}.jar
-    
-
-.left
-  %h1 Are you a Maven User?
-.right
-  %p
-    Just the following to your 
-    %code pom.xml
-    
-    :plain
-      {coderay:: xml}
-      <dependency>
-        <groupId>org.fusesource.{project_id:}</groupId>
-        <artifactId>{project_id:}</artifactId>
-        <version>{project_version:}</version>
-      </dependency>
-      {coderay}
-
-  %p    
-    You you should ensure you have the {project_id:} maven repository defined in your
-    %code pom.xml
-    :plain
-      {coderay:: xml}  
-      <repositories>
-        <repository>
-          <id>{project_id:}.release.m2</id>
-          <name>{project_id:} Release Repository</name>
-          <url>http://{project_id:}.fusesource.org/repo/release</url>
-          <snapshots>
-            <enabled>false</enabled>
-          </snapshots>
-          <releases>
-            <enabled>true</enabled>
-          </releases>
-        </repository>
-      </repositories>
-      {coderay}
-      
\ No newline at end of file


=====================================
docs/src/images/after-jansi-jna-windows.png deleted
=====================================
Binary files a/docs/src/images/after-jansi-jna-windows.png and /dev/null differ


=====================================
docs/src/images/after-jansi-windows.png deleted
=====================================
Binary files a/docs/src/images/after-jansi-windows.png and /dev/null differ


=====================================
docs/src/images/before-windows.png deleted
=====================================
Binary files a/docs/src/images/before-windows.png and /dev/null differ


=====================================
docs/src/images/project-icon.png deleted
=====================================
Binary files a/docs/src/images/project-icon.png and /dev/null differ


=====================================
docs/src/images/project-logo-full.png deleted
=====================================
Binary files a/docs/src/images/project-logo-full.png and /dev/null differ


=====================================
docs/src/images/project-logo.png deleted
=====================================
Binary files a/docs/src/images/project-logo.png and /dev/null differ


=====================================
docs/src/index.page deleted
=====================================
@@ -1,76 +0,0 @@
----
-# Copyright (C) 2009-2017 the original author(s).
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-title: Home
-in_menu: true
-sort_info: 1
---- name:overview pipeline:haml,tags
-
-%h1 Home
-{project_slogan:}
-
---- name:content pipeline:haml,tags
-
-.left
-  %h1 What is Jansi?
-.right
-  %p
-    Jansi is a small java library that allows you to use ANSI escape sequences 
-    to format your console output which works even on windows.  
-  %p
-    Using jansi is easy.  Before you start sending ANSI escape sequences to
-    %code System.out
-    make sure you run:
-        
-  :plain
-    {coderay::java}
-    AnsiConsole.systemInstall();
-    {coderay}
-
-  %p
-    If you would rather not mess with the System.out settings, you can use the
-    %code AnsiConsole.out
-    PrintStream instead.  For example:
-    
-  :plain
-    {coderay::java}
-    AnsiConsole.out.println("Hello World");
-    {coderay} 
-    
-.left
-  %h1 Windows Examples
-.right
-  %p
-    Most unix terminals support rendering ANSI escape sequences when Java
-    sends them via 
-    %code System.out
-    but when this is done on Windows, they don't get interpreted and you get
-    garbage on the console similar to:
-  %img.example{:src=>"images/before-windows.png"}
-  
-  %p
-    If the application uses the jansi libary, things start to look
-    much better:
-  %img.example{:src=>"images/after-jansi-windows.png"}
-        
-  %p
-    But wait, it gets better.  If you also add the JNA library to the 
-    classpath, then jansi provides an even better ANSI handling implementation
-    which use a few windows Native methods to properly apply color attributes
-    and more precise cursor support.
-  %img.example{:src=>"images/after-jansi-jna-windows.png"}
-    
-    
-    
\ No newline at end of file


=====================================
docs/src/metainfo deleted
=====================================
@@ -1,35 +0,0 @@
---- name:paths
-# Copyright (C) 2009-2017 the original author(s).
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# You cand define metainfo for mutliple pages in this file.
-#
-
-**/*.page: # <-- That means the following attributes get applied to all pages
-     # in the site.
-
-  # -------------------------------------------------------------------
-  # You can easily switch the site from one look to another here:
-  # -------------------------------------------------------------------
-  template: /styles/default/main.template
-  
-  # -------------------------------------------------------------------
-  # Define the project properties here, these can be accessed in the 
-  # pages using the {var:} syntax.
-  # -------------------------------------------------------------------
-  project_name: "Jansi"
-  project_id: "jansi"
-  project_slogan: 'Eliminating boring console output.'
-  project_version: 1.2


=====================================
docs/src/styles/default/blog.template deleted
=====================================
@@ -1,24 +0,0 @@
----
-# Copyright (C) 2009-2017 the original author(s).\n#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-template: main.template
----
-<div class="post"> 
-  <h2>{title:}</h2>
-  <div class="details">Posted by {author:} on {created_at:} </div>
-  <webgen:block name='content'/>
-  <% if node.node_info[:page].blocks.has_key?('full_story') %>
-    <webgen:block name='full_story' />
-  <% end %>
-</div>


=====================================
docs/src/styles/default/css/site.css deleted
=====================================
@@ -1,141 +0,0 @@
-/*
- * Copyright (C) 2009-2017 the original author(s).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-body, html {
-    font-family:georgia;
-    color: #666666;
-}
-body, html, table, tr, td, tbody {
-    padding:0;
-    margin:0;
-    vertical-align: top;
-}
-
-h1, h2, h3, h4, h5, h6 {
-    overflow: visible;
-    color: black;
-}
-p { margin-bottom:0px; }
-
-a { text-decoration: none; color:#00AA00; }
-a:hover { color: #820000; text-decoration: underline;}
-img {border: none;}
-
-a.main { font-size: 12pt; }
-
-.wrapper { min-width: 762px; width: 762px; margin: 0 auto; }
-
-#navigation { 
-    width: 100%; clear: both;
-    font-family: HelveticaNeue,"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif; 
-    background: #0F0F0F; text-align:center; padding: 8px;
-    border-bottom:2px solid #00FF00;
-    color: white; font-size: 10pt; font-weight: bold;
-}
-#navigation a { color: white; }
-#navigation ul { display: block; margin:0; padding:0; }
-#navigation li { list-style-type: none; display: inline; margin:0 5px 0 5px;}
-
-#overview { width: 100%; clear: both; padding: 0px 0px 20px 0px;}
-#overview div.logo {padding: 0px 20px 20px 0px; float: left;}
-#overview div.message { 
-    font-size: 14pt; 
-}
-#overview div.message h1{ margin-bottom: 5px; }
-
-#spot { width: 100%; 
-    margin-top: 15px;
-    background:transparent url(../images/spot-banner.gif) repeat-x scroll 0 0;
-    height: 277px;
-}
-#spot div.title {
-    text-align:center; height:25px;
-    text-align:center; padding-top: 2px;
-    color: white; font-size: 10pt; font-weight: bold; 
-    font-family: HelveticaNeue,"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif; 
-}
-#spot div.content table {
-    width: 100%; text-align:center; 
-    color: black; font-size: 10pt; 
-}
-
-#spot a:hover {text-decoration: none; }
-
-#spot div.spot-balloon {
-  background:transparent url( ../../../images/spot-get-involved.gif ) no-repeat;
-  background-position:center;
-  height: 121px;
-  text-align:left;
-  padding-top: 25px;
-  padding-left: 35px;
-}
-
-#spot div.spot-balloon li {
-    
-  list-style: none;
-}
-
-#content { width: 100%; clear: both; }
-#content .wrapper { min-width: 700px; width: 700px; margin: 0 auto; }
-#content div.left {
-  float:left;
-  width:200px;
-  text-align:right;
-  font-size: 18pt;
-  clear:both;
-}
-#content h1 {
-  font-size: 18pt;
-}
-#content div.right {
-  float:right;
-  width:450px;
-  text-align:left;
-}
-
-#blog { width: 100%;  }
-#blog .wrapper { min-width: 600px; width: 600px; margin: 0 auto; }
-#blog h1 {
-  font-family: HelveticaNeue,"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif; 
-  font-size: 18pt; color: #00AA00;
-}
-#blog h2 {
-  border-bottom: thin dashed #DDD;
-  font-size: 16pt;
-  margin-bottom: 5px;
-}
-#blog div.post p {
-  padding-left: 10px;
-}
-#blog div.post .details {
-  padding-top: 5px;
-  color: #ccc;
-  font-size: 10pt;
-  font-family: HelveticaNeue,"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif; 
-}
-
-#content .post h2 {
-  margin-bottom:5px;
-}
-#content .post .details {
-  color: #ccc;
-  font-size: 10pt;
-  font-family: HelveticaNeue,"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif; 
-  margin-top:0px;
-}
-
-img.example {
-  padding: 10px;
-}
\ No newline at end of file


=====================================
docs/src/styles/default/images/rss.gif deleted
=====================================
Binary files a/docs/src/styles/default/images/rss.gif and /dev/null differ


=====================================
docs/src/styles/default/images/spot-banner.gif deleted
=====================================
Binary files a/docs/src/styles/default/images/spot-banner.gif and /dev/null differ


=====================================
docs/src/styles/default/main.template deleted
=====================================
@@ -1,82 +0,0 @@
----
-# Copyright (C) 2009-2017 the original author(s).
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-template: ~
----
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="{lang:}">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <meta name="description" content="{title:}" />
-    <meta name="keywords" content="jansi ANSI Java" />
-    <meta name="author" content="Hiram Chirino" />
-
-    <link href="{relocatable: css/site.css}" rel="stylesheet" type="text/css" />
-    
-    <title>{title:}</title>
-
-<% if context.node.node_info[:page].blocks.has_key?('head') %>
-    <webgen:block name='head' />
-<% end %>
-
-</script>
-</head>
-<body>
-  
-  <div id="navigation">
-  	<div class="wrapper">
-      {menu: {max_levels: 1, used_nodes: files}}
-  	</div>
-  </div>
-  
-<% if context.node.node_info[:page].blocks.has_key?('overview') %>
-  <div id="overview">
-    <div class="wrapper">
-      <div class="logo">
-        <img src="{relocatable:/images/project-logo.png}"/>
-      </div>
-      <div class="message">
-        <webgen:block name='overview' />
-      </div>
-    </div>
-  </div>
-<% end %>
-
-<% if context.node.node_info[:page].blocks.has_key?('spot') %>
-  <div id='spot'>
-  	<div class='wrapper'>
-      <webgen:block name='spot' />
-  	</div>
-  </div>
-<% end %>
-
-<% if context.node.node_info[:page].blocks.has_key?('content') %>
-  <div id='content'>
-  	<div class='wrapper'>
-      <webgen:block name="content" />
-  	</div>
-  </div>
-<% end %>
-
-<% if context.node.node_info[:page].blocks.has_key?('blog') %>
-  <div id='blog'>
-  	<div class='wrapper'>
-      <webgen:block name="blog" />
-  	</div>
-  </div>
-<% end %>
-
-</body>
-</html>
\ No newline at end of file


=====================================
docs/src/todo.page deleted
=====================================
@@ -1,34 +0,0 @@
----
-# Copyright (C) 2009-2017 the original author(s).
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-title: TODO
-in_menu: true
---- name:overview pipeline:haml,tags
-
-%h1 The TODO list
-
-Stuff that still needs to get done.  Contributions Welcomed!
-
---- name:content pipeline:textile
-
-
-* Figure out a way to detect if the stdout on unix acutally
-  renders ANSI output.
-  
-* The default color table can be adjusted in Vista/2008 Server, 
-  via SetConsoleScreenBufferInfoEx.  Consider adjusting some
-  of the colors (especially the bold red color) so that they
-  match the colors used at: 
-  http://sixteencolors.net/packs/2007/sense27/smi-ar.ans.html


=====================================
docs/src/virtual deleted
=====================================
@@ -1,28 +0,0 @@
----
-# Copyright (C) 2009-2017 the original author(s).
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-in_menu: false
---- name:content pipeline:tags
-\--- !omap
-- /javadoc.html:
-    title: Javadoc
-    in_menu: true
-    sort_info: 60
-    url: http://jansi.fusesource.org/maven/1.2/apidocs/index.html
-- /development.html:
-    title: Development
-    in_menu: true
-    sort_info: 60
-    url: http://jansi.fusesource.org/maven/1.2/project-info.html
\ No newline at end of file


=====================================
pom.xml
=====================================
@@ -25,41 +25,26 @@
 
   <groupId>org.fusesource.jansi</groupId>
   <artifactId>jansi-${platform}</artifactId>
-  <version>1.7</version>
+  <version>1.8</version>
   
   <name>${project.artifactId}</name>
-  <description>Jansi is a java library for generating and interpreting ANSI escape sequences.</description>
+  <description>Jansi Native implements the JNI Libraries used by the Jansi project.</description>
   
   <properties>
-    <forge-project-id>jansi</forge-project-id>
-    <forge-project-id-uc>JANSI</forge-project-id-uc>
+    <forge-project-id>jansi-native</forge-project-id>
     
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <release-altGitURL>scm:git:ssh://git@forge.fusesource.com/jansinative.git</release-altGitURL>
-    <hawtjni-version>1.15</hawtjni-version>
+    <hawtjni-version>1.16</hawtjni-version>
     <platform>native</platform>    
   </properties>
   
-  <url>http://${forge-project-id}.fusesource.org</url>
+  <url>http://fusesource.github.io/${forge-project-id}</url>
   <inceptionYear>2009</inceptionYear>
 
   <issueManagement>
-    <system>jira</system>
-    <url>http://fusesource.com/issues/browse/${forge-project-id-uc}</url>
+    <system>GitHub</system>
+    <url>https://github.com/fusesource/${forge-project-id}/issues</url>
   </issueManagement>
-  
-  <mailingLists>
-    <mailingList>
-      <name>${forge-project-id} dev</name>
-      <post>${forge-project-id}-dev at fusesource.org</post>
-      <subscribe>${forge-project-id}-dev-subscribe at fusesource.org</subscribe>
-    </mailingList>
-    <mailingList>
-      <name>${forge-project-id} commits</name>
-      <post>${forge-project-id}-commits at fusesource.org</post>
-      <subscribe>${forge-project-id}-commits-subscribe at fusesource.org</subscribe>
-    </mailingList>
-  </mailingLists>
 
   <licenses>
     <license>
@@ -70,11 +55,10 @@
   </licenses>
   
   <scm>
-    <connection>scm:git:git://forge.fusesource.com/jansinative.git</connection>
-    <!-- Work around for issue: http://jira.codehaus.org/browse/SCM-444 -->
-    <developerConnection>${release-altGitURL}</developerConnection>
-    <url>http://fusesource.com/forge/gitweb?p=jansinative.git</url>
-    <tag>jansi-native-1.7</tag>
+    <connection>scm:git:https://github.com/fusesource/${forge-project-id}.git</connection>
+    <developerConnection>scm:git:https://github.com/fusesource/${forge-project-id}.git</developerConnection>
+    <url>https://github.com/fusesource/${forge-project-id}/tree/${project.scm.tag}</url>
+    <tag>jansi-native-1.8</tag>
   </scm>
 
   <distributionManagement>
@@ -116,6 +100,21 @@
   </dependencies>
 
   <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>2.10.4</version>
+          <configuration>
+            <linksource>true</linksource>
+            <links>
+              <link>http://fusesource.github.io/hawtjni/documentation/api</link>
+            </links>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
     <plugins>
     
       <!-- the older clean plugin has trouble deleting directories with symlinks in them -->
@@ -212,34 +211,23 @@
   <reporting>
     <plugins>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>jxr-maven-plugin</artifactId>
-        <version>2.0-beta-1</version>
-        <configuration>
-          <aggregate>true</aggregate>
-        </configuration>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.5</version>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.6</version>
-        <configuration>
-          <excludePackageNames>*.internal</excludePackageNames>
-          <linksource>true</linksource>
-          <links>
-            <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
-          </links>
-        </configuration>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-project-info-reports-plugin</artifactId>
-        <version>2.1.1</version>
+        <version>2.9</version>
         <reportSets>
           <reportSet>
             <reports>
               <report>index</report>
-              <report>sumary</report>
+              <report>summary</report>
               <report>plugins</report>
               <report>dependencies</report>
               <report>mailing-list</report>
@@ -250,16 +238,6 @@
           </reportSet>
         </reportSets>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>surefire-report-maven-plugin</artifactId>
-        <version>2.0-beta-1</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-plugin-plugin</artifactId>
-        <version>2.5</version>
-      </plugin>
     </plugins>
   </reporting>
 
@@ -277,7 +255,7 @@
           
           <plugin>
             <groupId>org.fusesource.hawtjni</groupId>
-            <artifactId>maven-hawtjni-plugin</artifactId>
+            <artifactId>hawtjni-maven-plugin</artifactId>
             <version>${hawtjni-version}</version>
             <executions>
               <execution>


=====================================
readme.md
=====================================
@@ -4,25 +4,33 @@ Jansi Native
 Description
 -----------
 
-Jansi Native implements the JNI Libraries used by the 
+Jansi Native implements the JNI libraries used by the 
 [Jansi project](http://fusesource.github.io/jansi/). 
 
+[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/fusesource/jansi-native.svg?label=License)](http://www.apache.org/licenses/)
+
+* `jansi-native` [Java API](http://fusesource.github.io/jansi/documentation/native-api):
+[![Maven Central](https://img.shields.io/maven-central/v/org.fusesource.jansi/jansi-native.svg?label=Maven%20Central)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.fusesource.jansi%22%20AND%20a%3A%22jansi-native%22)
+* `jansi-${platform}` builds: [![windows32](https://img.shields.io/maven-central/v/org.fusesource.jansi/jansi-windows32.svg?label=windows32)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.fusesource.jansi%22%20AND%20a%3A%22jansi-windows32%22)
+[![windows64](https://img.shields.io/maven-central/v/org.fusesource.jansi/jansi-windows64.svg?label=windows64)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.fusesource.jansi%22%20AND%20a%3A%22jansi-windows64%22)
+[![osx](https://img.shields.io/maven-central/v/org.fusesource.jansi/jansi-osx.svg?label=osx)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.fusesource.jansi%22%20AND%20a%3A%22jansi-osx%22)
+[![linux32](https://img.shields.io/maven-central/v/org.fusesource.jansi/jansi-linux32.svg?label=linux32)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.fusesource.jansi%22%20AND%20a%3A%22jansi-linux32%22)
+[![linux32](https://img.shields.io/maven-central/v/org.fusesource.jansi/jansi-linux64.svg?label=linux64)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.fusesource.jansi%22%20AND%20a%3A%22jansi-linux64%22)
+[![freebsd32](https://img.shields.io/maven-central/v/org.fusesource.jansi/jansi-freebsd32.svg?label=freebsd32)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.fusesource.jansi%22%20AND%20a%3A%22jansi-freebsd32%22)
+[![freebsd64](https://img.shields.io/maven-central/v/org.fusesource.jansi/jansi-freebsd64.svg?label=freebsd64)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.fusesource.jansi%22%20AND%20a%3A%22jansi-freebsd64%22)
+
+
 Project Links
 -------------
 
 * [Project Home](http://fusesource.github.io/jansi/)
 
-Building on Windows
--------------------
-
-Download and install the free [Microsoft Windows SDK][SDK].  The SDK includes
-all the headers, libraries, and build tools needed to compile the JNI library.
-
-Set the `JAVA_HOME` environment variable to the location where your JDK is 
-installed.  
+Building
+--------
 
-Use the "Start>All Programs>Microsoft Windows SDK vX.X>CMD" command window 
-and change to the directory that this file is located in and then run the
-maven build.
+To build, just run `mvn -Dplatform=${platform} package` where `${platform}` may be `windows32`, `windows64`,
+`osx`, `linux32`, `linux64`, `freebsd32`, `freebsd64` or any other platform of your choice.
 
-[SDK]: http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505
+Jansi native uses [HawtJNI](http://fusesource.github.io/hawtjni/) to ease JNI management.
+See [Platform Build Tools Requirements](http://fusesource.github.io/hawtjni/documentation/developer-guide.html#Platform_Build_Tools_Requirements)
+for details on platform requirements.


=====================================
src/main/java/org/fusesource/jansi/internal/CLibrary.java
=====================================
@@ -54,7 +54,21 @@ public class CLibrary {
 
     @JniField(flags={CONSTANT}, accessor="1", conditional="defined(HAVE_ISATTY)")
     public static boolean HAVE_ISATTY;
-    @JniMethod(conditional="defined(HAVE_ISATTY)")
+
+    @JniField(flags={CONSTANT}, accessor="1", conditional="defined(HAVE_TTYNAME)")
+    public static boolean HAVE_TTYNAME;
+
+    /**
+     * test whether a file descriptor refers to a terminal
+     * 
+     * @param fd file descriptor
+     * @return isatty() returns 1 if fd is an open file descriptor referring to a
+     * terminal; otherwise 0 is returned, and errno is set to indicate the
+     * error
+     * @see <a href="http://man7.org/linux/man-pages/man3/isatty.3.html">ISATTY(3) man-page</a>
+     * @see <a href="http://man7.org/linux/man-pages/man3/isatty.3p.html">ISATTY(3P) man-page</a>
+     */
+    @JniMethod(conditional="FALSE")
     public static native int isatty(
             @JniArg int fd);
 
@@ -62,6 +76,17 @@ public class CLibrary {
     public static native String ttyname(
             @JniArg int filedes);
 
+    /**
+     * The openpty() function finds an available pseudoterminal and returns
+     * file descriptors for the master and slave in amaster and aslave.
+     * @param amaster master return value
+     * @param aslave slave return value
+     * @param name filename return value
+     * @param termios
+     * @param winsize
+     * @return 0 on success
+     * @see <a href="http://man7.org/linux/man-pages/man3/openpty.3.html">OPENPTY(3) man-page</a>
+     */
     @JniMethod(conditional="defined(HAVE_OPENPTY)")
     public static native int openpty(
             @JniArg(cast="int *", flags={NO_IN}) int[] amaster,
@@ -99,11 +124,26 @@ public class CLibrary {
     public static long TIOCGETD;
     @JniField(flags={CONSTANT}, conditional="defined(TIOCSETD)")
     public static long TIOCSETD;
+    /**
+     * ioctl command: Get window size.
+     */
     @JniField(flags={CONSTANT}, conditional="defined(TIOCGWINSZ)")
     public static long TIOCGWINSZ;
+    /**
+     * ioctl command: Set window size.
+     */
     @JniField(flags={CONSTANT}, conditional="defined(TIOCSWINSZ)")
     public static long TIOCSWINSZ;
 
+    /**
+     * Control a STREAMS device.
+     *
+     * @param filedes
+     * @param request
+     * @param params
+     * @return
+     * @see <a href="http://man7.org/linux/man-pages/man3/ioctl.3p.html">IOCTL(3P) man-page</a>
+     */
     @JniMethod(conditional="defined(HAVE_IOCTL)")
     public static native int ioctl(
             @JniArg int filedes,
@@ -116,6 +156,10 @@ public class CLibrary {
             @JniArg long request,
             @JniArg(flags = ArgFlag.POINTER_ARG) WinSize params);
 
+    /**
+     * Window sizes.
+     * @see <a href="http://man7.org/linux/man-pages/man4/tty_ioctl.4.html">IOCTL_TTY(2) man-page</a>
+     */
     @JniClass(flags={ClassFlag.STRUCT}, name="winsize", conditional="defined(HAVE_IOCTL)")
     public static class WinSize {
 
@@ -147,6 +191,12 @@ public class CLibrary {
         }
     }
 
+    /**
+     * termios structure for termios functions, describing a general terminal interface that is
+     * provided to control asynchronous communications ports
+     *
+     * @see <a href="http://man7.org/linux/man-pages/man3/termios.3.html">TERMIOS(3) man-page</a>
+     */
     @JniClass(flags={ClassFlag.STRUCT}, name="termios", conditional = "defined(HAVE_IOCTL)")
     public static class Termios {
 


=====================================
src/main/java/org/fusesource/jansi/internal/Kernel32.java
=====================================
@@ -25,7 +25,8 @@ import static org.fusesource.hawtjni.runtime.FieldFlag.*;
 import static org.fusesource.hawtjni.runtime.MethodFlag.*;
 
 /**
- * 
+ * Interface to access Win32 base APIs.
+ *
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
  */
 @JniClass(conditional="defined(_WIN32) || defined(_WIN64)")
@@ -306,8 +307,14 @@ public class Kernel32 {
             return window.height() + 1;
         }
     }
-    
-    
+
+
+    // DWORD WINAPI WaitForSingleObject(
+    //  _In_ HANDLE hHandle,
+    //  _In_ DWORD  dwMilliseconds
+    // );
+    public static final native int WaitForSingleObject(@JniArg(cast="HANDLE")long hHandle, int dwMilliseconds);
+
     /**
      * see: http://msdn.microsoft.com/en-us/library/ms724211%28VS.85%29.aspx
      * 
@@ -452,12 +459,12 @@ public class Kernel32 {
     public static final native int _getch();
     
 
-   /**
-    * see: http://msdn.microsoft.com/en-us/library/ms686050%28VS.85%29.aspx
-    * @param title
-    * @return 0 if title was set successfully
-    */
-   public static final native int SetConsoleTitle(
+    /**
+     * see: http://msdn.microsoft.com/en-us/library/ms686050%28VS.85%29.aspx
+     * @param title
+     * @return 0 if title was set successfully
+     */
+    public static final native int SetConsoleTitle(
                @JniArg(flags={UNICODE}) String title);    
 
 
@@ -568,7 +575,6 @@ public class Kernel32 {
     /**
      * see: http://msdn.microsoft.com/en-us/library/ms684239(v=VS.85).aspx
      */
-    /*
     @JniClass(flags={ClassFlag.STRUCT,TYPEDEF}, conditional="defined(_WIN32) || defined(_WIN64)")
     public static class MOUSE_EVENT_RECORD {
 
@@ -638,12 +644,10 @@ public class Kernel32 {
                     '}';
         }
     }
-    */
 
     /**
      * see: http://msdn.microsoft.com/en-us/library/ms687093(v=VS.85).aspx
      */
-    /*
     @JniClass(flags={ClassFlag.STRUCT,TYPEDEF}, conditional="defined(_WIN32) || defined(_WIN64)")
     public static class WINDOW_BUFFER_SIZE_RECORD {
 
@@ -664,12 +668,10 @@ public class Kernel32 {
             return "WINDOW_BUFFER_SIZE_RECORD{size=" + size + '}';
         }
     }
-    */
 
     /**
      * see: http://msdn.microsoft.com/en-us/library/ms683149(v=VS.85).aspx
      */
-    /*
     @JniClass(flags={ClassFlag.STRUCT,TYPEDEF}, conditional="defined(_WIN32) || defined(_WIN64)")
     public static class FOCUS_EVENT_RECORD {
         static {
@@ -683,12 +685,10 @@ public class Kernel32 {
         @JniField(accessor="bSetFocus")
         public boolean setFocus;
     }
-    */
 
     /**
      * see: http://msdn.microsoft.com/en-us/library/ms684213(v=VS.85).aspx
      */
-    /*
     @JniClass(flags={ClassFlag.STRUCT,TYPEDEF}, conditional="defined(_WIN32) || defined(_WIN64)")
     public static class MENU_EVENT_RECORD {
         static {
@@ -702,7 +702,6 @@ public class Kernel32 {
         @JniField(accessor="dwCommandId")
         public int commandId;
     }
-    */
 
     /**
      * see: http://msdn.microsoft.com/en-us/library/ms683499(v=VS.85).aspx
@@ -721,7 +720,6 @@ public class Kernel32 {
         public static int SIZEOF;
         @JniField(flags={CONSTANT}, accessor="KEY_EVENT")
         public static short KEY_EVENT;
-        /*
         @JniField(flags={CONSTANT}, accessor="MOUSE_EVENT")
         public static short MOUSE_EVENT;
         @JniField(flags={CONSTANT}, accessor="WINDOW_BUFFER_SIZE_EVENT")
@@ -730,12 +728,10 @@ public class Kernel32 {
         public static short FOCUS_EVENT;
         @JniField(flags={CONSTANT}, accessor="MENU_EVENT")
         public static short MENU_EVENT;
-        */
         @JniField(accessor="EventType")
         public short eventType;
         @JniField(accessor="Event.KeyEvent")
         public KEY_EVENT_RECORD keyEvent = new KEY_EVENT_RECORD();
-        /*
         @JniField(accessor="Event.MouseEvent")
         public MOUSE_EVENT_RECORD mouseEvent = new MOUSE_EVENT_RECORD();
         @JniField(accessor="Event.WindowBufferSizeEvent")
@@ -744,7 +740,7 @@ public class Kernel32 {
         public MENU_EVENT_RECORD menuEvent = new MENU_EVENT_RECORD();
         @JniField(accessor="Event.FocusEvent")
         public FOCUS_EVENT_RECORD focusEvent = new FOCUS_EVENT_RECORD();
-        */
+
         public static final native void memmove (
           @JniArg(cast="void *", flags={NO_IN, CRITICAL}) INPUT_RECORD dest,
           @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) long src,


=====================================
src/main/java/org/fusesource/jansi/internal/WindowsSupport.java
=====================================
@@ -22,7 +22,8 @@ import org.fusesource.jansi.internal.Kernel32.CONSOLE_SCREEN_BUFFER_INFO;
 import java.io.IOException;
 
 /**
- * 
+ * Windows helper to ease Kernel32 usage.
+ *
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
  */
 public class WindowsSupport {
@@ -89,18 +90,36 @@ public class WindowsSupport {
         }
     }
 
+    public static INPUT_RECORD[] readConsoleInput(int count, int dwMilliseconds) throws IOException {
+        long hConsole = GetStdHandle (STD_INPUT_HANDLE);
+        if (hConsole == INVALID_HANDLE_VALUE)
+            return null;
+        if (WaitForSingleObject(hConsole, dwMilliseconds) != 0)
+            return null;
+        return readConsoleInputHelper(hConsole, count, false);
+    }
+
     public static INPUT_RECORD[] readConsoleInput(int count) throws IOException {
         long hConsole = GetStdHandle (STD_INPUT_HANDLE);
         if (hConsole == INVALID_HANDLE_VALUE)
             return null;
-        return readConsoleKeyInput(hConsole, count, false);
+        return readConsoleInputHelper(hConsole, count, false);
+    }
+
+    public static INPUT_RECORD[] peekConsoleInput(int count, int dwMilliseconds) throws IOException {
+        long hConsole = GetStdHandle (STD_INPUT_HANDLE);
+        if (hConsole == INVALID_HANDLE_VALUE)
+            return null;
+        if (WaitForSingleObject(hConsole, dwMilliseconds) != 0)
+            return null;
+        return readConsoleInputHelper(hConsole, count, true);
     }
 
     public static INPUT_RECORD[] peekConsoleInput(int count) throws IOException {
         long hConsole = GetStdHandle (STD_INPUT_HANDLE);
         if (hConsole == INVALID_HANDLE_VALUE)
             return null;
-        return readConsoleKeyInput(hConsole, count, true);
+        return readConsoleInputHelper(hConsole, count, true);
     }
 
     public static void flushConsoleInputBuffer() {


=====================================
src/main/native-package/src/jansi_isatty.c
=====================================
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (C) 2017, the original author(s).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+#include "jansi.h"
+#include "hawtjni.h"
+#include "jansi_structs.h"
+#include "jansi_stats.h"
+
+#define CLibrary_NATIVE(func) Java_org_fusesource_jansi_internal_CLibrary_##func
+
+#if defined(_WIN32) || defined(_WIN64)
+
+typedef struct _FILE_NAME_INFORMATION {
+	uint16_t FileNameLength;
+	WCHAR FileName[1];
+} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
+
+
+typedef enum {
+	ObjectBasicInformation,
+	ObjectNameInformation,
+	ObjectTypeInformation,
+	ObjectAllInformation,
+	ObjectDataInformation
+} OBJECT_INFORMATION_CLASS;
+
+typedef NTSTATUS (NTAPI *TFNNtQueryObject)(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
+TFNNtQueryObject NtQueryObject = 0;
+
+HANDLE hModuleNtDll = 0;
+
+JNIEXPORT jint JNICALL CLibrary_NATIVE(isatty)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jint rc;
+
+	ULONG result;
+	BYTE buffer[1024];
+	PFILE_NAME_INFORMATION nameinfo = (PFILE_NAME_INFORMATION) buffer;
+	PWSTR name;
+
+	CLibrary_NATIVE_ENTER(env, that, CLibrary_isatty_FUNC);
+	/* check if fd is a pipe */
+	HANDLE h = (HANDLE) _get_osfhandle(arg0);
+	DWORD t = GetFileType(h);
+	if (t == FILE_TYPE_CHAR) {
+		rc = 1;
+	}
+	else if (t != FILE_TYPE_PIPE) {
+		rc = 0;
+	}
+	else {
+		if (hModuleNtDll == 0) {
+			hModuleNtDll = LoadLibraryW(L"ntdll.dll");
+		}
+		if (hModuleNtDll == 0) {
+			rc = 0;
+		}
+		else {
+			if (NtQueryObject == 0) {
+				NtQueryObject = (TFNNtQueryObject) GetProcAddress(hModuleNtDll, "NtQueryObject");
+			}
+			if (NtQueryObject == 0) {
+				rc = 0;
+			}
+			/* get pipe name */
+			else if (NtQueryObject(h, ObjectNameInformation, buffer, sizeof(buffer) - 2, &result) != 0) {
+				rc = 0;
+			}
+			else {
+
+				name = nameinfo->FileName;
+				name[nameinfo->FileNameLength / sizeof(*name)] = 0;
+
+				/*
+				 * Check if this could be a MSYS2 pty pipe ('msys-XXXX-ptyN-XX')
+				 * or a cygwin pty pipe ('cygwin-XXXX-ptyN-XX')
+				 */
+				if ((!wcsstr(name, L"msys-") && !wcsstr(name, L"cygwin-"))
+						|| !wcsstr(name, L"-pty")) {
+					rc = 1;
+				} else {
+					rc = 0;
+				}
+			}
+		}
+	}
+
+	CLibrary_NATIVE_EXIT(env, that, CLibrary_isatty_FUNC);
+	return rc;
+}
+
+#else
+#if defined(HAVE_ISATTY)
+
+JNIEXPORT jint JNICALL CLibrary_NATIVE(isatty)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jint rc = 0;
+	CLibrary_NATIVE_ENTER(env, that, CLibrary_isatty_FUNC);
+	rc = (jint)isatty(arg0);
+	CLibrary_NATIVE_EXIT(env, that, CLibrary_isatty_FUNC);
+	return rc;
+}
+
+#endif
+#endif


=====================================
src/main/native-package/src/windows/Makefile
=====================================
@@ -322,7 +322,9 @@ PDBFLAGS = -Fo$(WORKDIR)\ -Fd$(WORKDIR)\$(PROJECT)-src
 OBJECTS = \
 	$(WORKDIR)\hawtjni.obj \
 	$(WORKDIR)\jansi.obj \
-	$(WORKDIR)\jansi_stats.obj \
+	$(WORKDIR)\jansi_isatty.obj \
+    $(WORKDIR)\jansi_ttyname.obj \
+    $(WORKDIR)\jansi_stats.obj \
 	$(WORKDIR)\jansi_structs.obj
 
 BUILDDLL = $(WORKDIR)\$(PROJECT).dll


=====================================
src/main/native-package/vs2010.vcxproj
=====================================
@@ -190,6 +190,8 @@
   <ItemGroup>
     <ClCompile Include=".\src\hawtjni.c" />
     <ClCompile Include=".\src\jansi.c" />
+    <ClCompile Include=".\src\jansi_isatty.c" />
+    <ClCompile Include=".\src\jansi_ttyname.c" />
     <ClCompile Include=".\src\jansi_stats.c" />
     <ClCompile Include=".\src\jansi_structs.c" />
     <ClCompile Include=".\src\windows\crtdll.c" />



View it on GitLab: https://salsa.debian.org/java-team/jansi-native/commit/0c6747ddece1dbfe52b5d75c48dc6f0d883da243

-- 
View it on GitLab: https://salsa.debian.org/java-team/jansi-native/commit/0c6747ddece1dbfe52b5d75c48dc6f0d883da243
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20181126/da296fe2/attachment.html>


More information about the pkg-java-commits mailing list