harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r586240 - in /harmony/enhanced/classlib/branches/java6/modules/luni/src/main: java/java/io/ native/luni/unix/ native/luni/windows/
Date Fri, 19 Oct 2007 02:56:38 GMT
Author: leoli
Date: Thu Oct 18 19:56:37 2007
New Revision: 586240

URL: http://svn.apache.org/viewvc?rev=586240&view=rev
Log:
Apply patch for new feature in ([java6][classlib][luni]java.io.Console).

Added:
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Console.java
  (with props)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.c
  (with props)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.h
  (with props)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.c
  (with props)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.h
  (with props)
Modified:
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/exports.txt
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/makefile

Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Console.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Console.java?rev=586240&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Console.java
(added)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Console.java
Thu Oct 18 19:56:37 2007
@@ -0,0 +1,288 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package java.io;
+
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.util.Formatter;
+
+
+/**
+ * Provider to read and write message to char-based console device. Any Console
+ * instance should be obtained via System.console(). If the standard input and
+ * output stream has been redirected, the System.console() will return null.
+ * 
+ * @since 1.6
+ */
+public final class Console implements Flushable {
+
+    private static Console console;
+
+    private PrintWriter writer;
+
+    private ConsoleReader reader;
+
+    private Formatter formatter;
+
+    static final Object CONSOLE_LOCK = new Object();
+    
+    // Called by System.console
+    static Console getConsole() {   
+       if (hasStdInImpl() && hasStdOutImpl()) {
+			console = new Console(System.in, System.out);
+		}
+		return console;
+    }
+
+    private Console(InputStream stdin, OutputStream stdout) {
+        reader = new ConsoleReader(stdin);
+        writer = new ConsoleWriter(stdout);
+    }
+
+    private Formatter getFormatter() {
+        if (null == formatter) {
+            formatter = new Formatter(writer);
+        }
+        return formatter;
+    }
+
+    public void flush() {
+        writer.flush();
+    }
+
+    /**
+	 * Returns a formatted string to this console instance's output stream using
+	 * the specified format string and arguments.
+	 * 
+	 * @param fmt -
+	 *            the formatted string.
+	 * @param args -
+	 *            the arguments used by the formatter.
+	 * @return - the console instance.
+	 */
+    public Console format(String fmt, Object... args) {
+        Formatter fm = getFormatter();
+        fm.format(fmt, args);
+        fm.flush();
+        return this;
+    }
+    
+    /**
+	 * A conveinece method to write a formatted string to the console. It is
+	 * equal to format(fmt, args).
+	 * 
+	 * @param fmt -
+	 *            the formatted string.
+	 * @param args -
+	 *            the arguments used by the formatter.
+	 * @return - the console instance.
+	 */
+    public Console printf(String fmt, Object... args) {
+    	return format(fmt, args);
+	}
+
+    /**
+	 * Answers the unique Reader object associated with this console.
+	 * 
+	 * @return - the specified reader related to the console.
+	 */
+    public Reader reader() {
+        return reader;
+    }
+
+    /**
+	 * Reads a line of string from this console.
+	 * 
+	 * @return - the string input, null if the end of the input stream has been
+	 *         reached.
+	 */
+    public String readLine() {
+        try {
+            return reader.readLine();
+        } catch (IOException e) {
+            throw new IOError(e);
+        }
+
+    }
+
+    /**
+	 * Reads a line of string from this console, with a specified string to
+	 * prompt.
+	 * 
+	 * @return - the string input, null if the end of the input stream has been
+	 *         reached.
+	 * @param fmt -
+	 *            the formatted string.
+	 * @param args -
+	 *            the arguments used by the formatter.
+	 * @return - the string input, null if the end of the input stream has been
+	 *         reached.
+	 */
+    public String readLine(String fmt, Object... args) {
+        synchronized (CONSOLE_LOCK) {
+            format(fmt, args);
+            return readLine();
+        }
+    }
+
+    /**
+	 * Reads a password string from this console, which will not display the
+	 * string on the screen.
+	 * 
+	 * @return - A character array containing the password, null if the end of
+	 *         the input stream has been reached.
+	 */
+    public char[] readPassword() {
+        String password;
+        synchronized (CONSOLE_LOCK) {
+            setEchoOffImpl();
+            password = readLine();
+            setEchoOnImpl();
+        }
+        return null == password ? null : password.toCharArray();
+    }
+
+    /**
+	 * Reads a password string from this console, which does not display the
+	 * string on the screen. A formatted prompt is also displayed.
+	 * 
+	 * @param fmt -
+	 *            the formatted string.
+	 * @param args -
+	 *            the arguments used by the formatter.
+	 * @return - A character array containing the password, null if the end of
+	 *         the input stream has been reached.
+	 */
+    public char[] readPassword(String fmt, Object... args) {
+        synchronized (CONSOLE_LOCK) {
+            format(fmt, args);
+            return readPassword();
+        }
+    }
+
+    /**
+	 * Answers the unique Writer object associated with this console.
+	 * 
+	 * @return - the specified writer related to the console.
+	 */
+    public PrintWriter writer() {
+        return writer;
+    }
+
+    private static class ConsoleReader extends InputStreamReader {
+
+        private static final int END_OF_STREAM = -1;
+
+		private static final int DEFAULT_BUFFER_SZIE = 2048;
+
+		private CharBuffer line;
+
+		private InputStream in;
+
+		private static final byte[] CR = System
+				.getProperty("line.separator").getBytes(); //$NON-NLS-1$
+
+		private static final Charset charSet = Charset.forName(System
+				.getProperty("file.encoding")); //$NON-NLS-1$
+        
+        public ConsoleReader(InputStream in) {
+            super(in);
+            lock = CONSOLE_LOCK;
+            this.in = in;
+        }
+
+        @Override
+        // Console.reader cannot be closed.
+        public void close() {
+            // do nothing
+        }
+        
+        public String readLine() throws IOException {
+            if (null == line || !line.hasRemaining()) {
+				getNextLine();
+			}
+            if (null == line) {
+            	return null;
+            }
+            String result = line.toString();
+            line = null;
+            return result;
+        }
+                
+        private void getNextLine() throws IOException {
+			int count = 0;
+			byte[] byteBufferArray = new byte[DEFAULT_BUFFER_SZIE];
+			
+			while (!hasGotLine(byteBufferArray, count)) {
+				byte b = (byte) in.read();	
+				if (b == END_OF_STREAM) {
+					return ;
+				}
+				
+				byteBufferArray[count++] = b;
+								
+				if (count >= byteBufferArray.length) {
+					byte[] tmpBuffer = byteBufferArray;
+					byteBufferArray = new byte[byteBufferArray.length * 2];
+					System.arraycopy(tmpBuffer, 0, byteBufferArray, 0, tmpBuffer.length);					
+				}
+			}
+			
+			ByteBuffer byteBuffer = ByteBuffer.allocate(count - CR.length);
+			byteBuffer.clear();
+			byteBuffer.put(byteBufferArray, 0, count - CR.length);
+			byteBuffer.flip();
+			line = charSet.decode(byteBuffer);
+		}
+        
+        private boolean hasGotLine(byte[] byteBufferArray, int pos) {
+            boolean gotLine = false;
+            if (pos >= CR.length) {
+                gotLine = true;
+                for (int i = 0; i < CR.length; i++) {
+                    if (byteBufferArray[pos - CR.length + i] != CR[i]) {
+                        gotLine = false;
+                        break;
+                    }
+                }
+            }
+            return gotLine;
+        }
+    }
+
+    private static class ConsoleWriter extends PrintWriter {
+
+        public ConsoleWriter(OutputStream out) {
+            super(out, true);
+            lock = CONSOLE_LOCK;
+        }
+
+        @Override
+        // Console.writer cannot be closed.
+        public void close() {
+            flush();
+        }
+    }
+    
+    private static native boolean hasStdInImpl();
+
+    private static native boolean hasStdOutImpl();
+
+    private native void setEchoOffImpl();
+
+    private native void setEchoOnImpl();
+}

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Console.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.c?rev=586240&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.c
(added)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.c
Thu Oct 18 19:56:37 2007
@@ -0,0 +1,79 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 <termios.h>
+ #include "exceptions.h"
+ #include "consoleimpl.h"
+ 
+ int fd_stdin;
+ int fd_stdout;
+ struct termios saved_termios;
+ 
+ /*
+ * Whether the standard input stream is attached to a console.
+ */
+  JNIEXPORT jboolean JNICALL Java_java_io_Console_hasStdInImpl(JNIEnv *env, jclass thiz){
+       fd_stdin = 0;
+       //stdin is not attached to a console.
+       if(!isatty(fd_stdin)){
+          return 0;
+       }   
+    return 1;
+  }
+    
+
+
+/*
+ * Gets the standard output as an OutputStream if it is attached to a console.
+ */
+  JNIEXPORT jboolean JNICALL Java_java_io_Console_hasStdOutImpl(JNIEnv *env, jclass thiz){
+    fd_stdout = 1;
+    //stdout is not attached to a console.
+    if(!isatty(fd_stdout)){
+       return 0;
+    }    
+    return 1;
+  }
+    
+/*
+ * Sets the standard input echoing off.
+ */
+  JNIEXPORT void JNICALL Java_java_io_Console_setEchoOffImpl(JNIEnv *env, jclass thiz){
+    struct termios new_termios;
+    if(tcgetattr(fd_stdin, &saved_termios)<0){
+       throwJavaIoIOException(env, "fails to get stdin attributes when echoing off.");
+    }    
+    memcpy(&new_termios, &saved_termios, sizeof(struct termios));
+    
+    //set echo off mask
+    new_termios.c_lflag &= ~ECHO;
+    new_termios.c_lflag |= ECHONL;
+    if(tcsetattr(fd_stdin, TCSAFLUSH, &new_termios)<0){
+        throwJavaIoIOException(env, "fails to set stdin attributes when echoing off.");
+    }  
+  }  
+    
+/*
+ * Sets the standard output echoing on.
+ */
+  JNIEXPORT void JNICALL Java_java_io_Console_setEchoOnImpl(JNIEnv *env, jclass thiz){
+    
+    if(tcsetattr(fd_stdin, TCSAFLUSH, &saved_termios)<0){
+         throwJavaIoIOException(env, "fails to set stdin attributes when echoing on.");
+      }
+ }
+ 
\ No newline at end of file

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.h?rev=586240&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.h
(added)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.h
Thu Oct 18 19:56:37 2007
@@ -0,0 +1,50 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 "jni.h"
+ 
+/*
+ * Class:     java_io_Console
+ * Method:    hasStdInImpl
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_java_io_Console_hasStdInImpl
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     java_io_Console
+ * Method:    hasStdOutImpl
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_java_io_Console_hasStdOutImpl
+  (JNIEnv *, jclass);
+    
+/*
+ * Class:     java_io_Console
+ * Method:    setEchoOffImpl
+ * Signature: ()V
+ */
+  JNIEXPORT void JNICALL Java_java_io_Console_setEchoOffImpl
+    (JNIEnv *, jclass);
+    
+/*
+ * Class:     java_io_Console
+ * Method:    setEchoOnImpl
+ * Signature: ()V
+ */
+  JNIEXPORT void JNICALL Java_java_io_Console_setEchoOnImpl
+    (JNIEnv *, jclass);
+    
\ No newline at end of file

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/consoleimpl.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/exports.txt?rev=586240&r1=586239&r2=586240&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/exports.txt
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/exports.txt
Thu Oct 18 19:56:37 2007
@@ -20,6 +20,10 @@
 Java_org_apache_harmony_math_util_BigInteger_remImpl
 Java_org_apache_harmony_math_util_BigInteger_shlImpl
 Java_org_apache_harmony_math_util_BigInteger_subImpl
+Java_java_io_Console_hasStdInImpl
+Java_java_io_Console_hasStdOutImpl
+Java_java_io_Console_setEchoOffImpl
+Java_java_io_Console_setEchoOnImpl
 Java_java_io_File_deleteDirImpl
 Java_java_io_File_deleteFileImpl
 Java_java_io_File_existsImpl

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile?rev=586240&r1=586239&r2=586240&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile
Thu Oct 18 19:56:37 2007
@@ -34,7 +34,7 @@
 	$(SHAREDSUB)filedesc.o $(SHAREDSUB)timezone.o \
 	$(SHAREDSUB)OSFileSystem.o OSFileSystemLinux32.o \
 	OSMemory.o OSMemoryLinux32.o $(SHAREDSUB)OSNetworkSystem.o \
-	OSNetworkSystemLinux.o OSResourcesMonitorLinux.o hyenv.o 
+	OSNetworkSystemLinux.o OSResourcesMonitorLinux.o hyenv.o consoleimpl.o
 
 ifneq ($(HY_ZIP_API),true)
 MDLLIBFILES += $(LIBPATH)libhyzip.a $(DLLPATH)libhyzlib$(HY_LINKLIB_SUFFIX)

Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.c?rev=586240&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.c
(added)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.c
Thu Oct 18 19:56:37 2007
@@ -0,0 +1,82 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 <windows.h>
+ #include "exceptions.h"
+ #include "consoleimpl.h"
+ 
+ HANDLE hStdIn;
+ HANDLE hStdOut;
+ DWORD saved_ConsoleMode;
+ 
+ 
+ 
+/*
+ * Whether the standard input is attached to a console.
+ */
+ 
+JNIEXPORT jboolean JNICALL Java_java_io_Console_hasStdInImpl  
+    (JNIEnv *env, jclass thiz){       
+    hStdIn = GetStdHandle(STD_INPUT_HANDLE);	 
+    if(INVALID_HANDLE_VALUE == hStdIn || GetConsoleMode(hStdIn, &saved_ConsoleMode) ==
0){
+      return 0;
+    }
+    return 1;    
+}    
+
+/*
+ * Whether the standard output is attached to a console.
+ */
+JNIEXPORT jboolean JNICALL Java_java_io_Console_hasStdOutImpl(JNIEnv *env, jclass thiz){
+    hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
+    if(INVALID_HANDLE_VALUE == hStdOut || GetConsoleMode(hStdOut, &saved_ConsoleMode)
== 0){
+      return 0;
+    }
+    return 1;
+} 
+    
+/*
+ * Sets the standard input echoing off.
+ */
+  JNIEXPORT void JNICALL Java_java_io_Console_setEchoOffImpl(JNIEnv *env, jclass thiz){
+    //save the original console mode.
+    DWORD new_ConsoleMode;
+    if(GetConsoleMode(hStdIn, &saved_ConsoleMode)==0){
+       throwJavaIoIOException(env, "fails to get console mode when echo off.");
+    }    
+    
+    //set echo option off.
+    new_ConsoleMode = saved_ConsoleMode & ~ENABLE_ECHO_INPUT;
+    
+    //set the echo-offed console mode.
+    if(SetConsoleMode(hStdIn, new_ConsoleMode)==0)
+    {
+	    throwJavaIoIOException(env, "fails to set console mode when echo off.");
+    }
+  }  
+    
+/*
+ * Sets the standard output echoing on.
+ */
+  JNIEXPORT void JNICALL Java_java_io_Console_setEchoOnImpl(JNIEnv *env, jclass thiz){
+    
+    //restore the saved console mode.
+    if(SetConsoleMode(hStdIn, saved_ConsoleMode)==0){
+       throwJavaIoIOException(env, "fails to set console mode when echo on.");
+    }
+  }   
+    
\ No newline at end of file

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.h?rev=586240&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.h
(added)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.h
Thu Oct 18 19:56:37 2007
@@ -0,0 +1,50 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 "jni.h"
+ 
+/*
+ * Class:     java_io_Console
+ * Method:    hasStdInImpl
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_java_io_Console_hasStdInImpl
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     java_io_Console
+ * Method:    hasStdOutImpl
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_java_io_Console_hasStdOutImpl
+  (JNIEnv *, jclass);
+    
+/*
+ * Class:     java_io_Console
+ * Method:    setEchoOffImpl
+ * Signature: ()V
+ */
+  JNIEXPORT void JNICALL Java_java_io_Console_setEchoOffImpl
+    (JNIEnv *, jclass);
+    
+/*
+ * Class:     java_io_Console
+ * Method:    setEchoOnImpl
+ * Signature: ()V
+ */
+  JNIEXPORT void JNICALL Java_java_io_Console_setEchoOnImpl
+    (JNIEnv *, jclass);
+ 
\ No newline at end of file

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/consoleimpl.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/makefile?rev=586240&r1=586239&r2=586240&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/makefile
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/makefile
Thu Oct 18 19:56:37 2007
@@ -38,7 +38,7 @@
   OSFileSystemWin32.obj hyenv.obj\
   $(SHAREDSUB)OSFileSystem.obj OSMemoryWin32.obj OSMemory.obj \
   $(SHAREDSUB)OSNetworkSystem.obj OSNetworkSystemWin32.obj \
-  OSResourcesMonitorWin32.obj
+  OSResourcesMonitorWin32.obj consoleimpl.obj
 
 VIRTFILES = hyluni.res
 



Mime
View raw message