add isatty method

This commit is contained in:
Doug MacEachern 2005-07-21 04:36:53 +00:00
parent c6dd77749b
commit 1f6fabc9c1

View File

@ -939,6 +939,12 @@ JNIEXPORT jstring SIGAR_JNI(Sigar_getFQDN)
#include "sigar_getline.h" #include "sigar_getline.h"
JNIEXPORT jboolean SIGAR_JNI(util_Getline_isatty)
(JNIEnv *env, jclass cls)
{
return isatty(fileno(stdin)) ? JNI_TRUE : JNI_FALSE;
}
JNIEXPORT jstring SIGAR_JNI(util_Getline_getline) JNIEXPORT jstring SIGAR_JNI(util_Getline_getline)
(JNIEnv *env, jobject sigar_obj, jstring prompt) (JNIEnv *env, jobject sigar_obj, jstring prompt)
{ {