diff --git a/.cvsignore b/.cvsignore index 5f673af..d4126ee 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -brltty-3.9.tar.gz +brltty-3.10.tar.gz diff --git a/brltty-3.9-gnusource.patch b/brltty-3.9-gnusource.patch deleted file mode 100644 index 83fa2f1..0000000 --- a/brltty-3.9-gnusource.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- brltty-3.9/configure.ac.gnusource 2007-10-17 17:19:31.000000000 +0200 -+++ brltty-3.9/configure.ac 2008-02-28 14:30:57.000000000 +0100 -@@ -678,7 +678,7 @@ - case "${host_os}" - in - linux*|gnu*|kfreebsd*) -- brltty_cv_prog_cc_sysflags="-D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_XOPEN_SOURCE=500" -+ brltty_cv_prog_cc_sysflags="-D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_GNU_SOURCE" - ;; - solaris*) - brltty_cv_prog_cc_sysflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__" diff --git a/brltty-3.9-java-svn.patch b/brltty-3.9-java-svn.patch deleted file mode 100644 index a4ec973..0000000 --- a/brltty-3.9-java-svn.patch +++ /dev/null @@ -1,1300 +0,0 @@ -diff -Naur brltty-3.9.orig/Bindings/Java/apitest brltty-3.9/Bindings/Java/apitest ---- brltty-3.9.orig/Bindings/Java/apitest 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/apitest 2008-02-28 14:05:14.000000000 +0100 -@@ -24,5 +24,5 @@ - export LD_LIBRARY_PATH="${currentDirectory}" - export LD_PRELOAD="${currentDirectory}/../../Programs/libbrlapi.so" - --exec java -classpath "${currentDirectory}" ApiTest "${@}" -+exec java -classpath "${currentDirectory}/classes" org.a11y.BrlAPI.Test "${@}" - exit "${?}" -diff -Naur brltty-3.9.orig/Bindings/Java/ApiTest.java brltty-3.9/Bindings/Java/ApiTest.java ---- brltty-3.9.orig/Bindings/Java/ApiTest.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/ApiTest.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,102 +0,0 @@ --/* -- * libbrlapi - A library providing access to braille terminals for applications. -- * -- * Copyright (C) 2006-2007 by -- * Samuel Thibault -- * Sébastien Hinderer -- * -- * libbrlapi comes with ABSOLUTELY NO WARRANTY. -- * -- * This is free software, placed under the terms of the -- * GNU Lesser General Public License, as published by the Free Software -- * Foundation; either version 2.1 of the License, -- * or (at your option) any later version. -- * Please see the file COPYING-API for details. -- * -- * Web Page: http://mielke.cc/brltty/ -- * -- * This software is maintained by Dave Mielke . -- */ -- --public class ApiTest { -- public static void main(String argv[]) { -- BrlapiSettings settings = new BrlapiSettings(); -- -- { -- int argi = 0; -- while (argi < argv.length) { -- String arg = argv[argi++]; -- -- if (arg.equals("-host")) { -- if (argi == argv.length) { -- System.err.println("Missing host specification."); -- System.exit(2); -- } -- -- settings.host = argv[argi++]; -- continue; -- } -- -- System.err.println("Invalid option: " + arg); -- System.exit(2); -- } -- } -- -- try { -- System.loadLibrary("brlapi_java"); -- -- System.out.print("Connecting to BrlAPI... "); -- Brlapi brlapi = new Brlapi(settings); -- System.out.println("done (fd=" + brlapi.getFileDescriptor() + ")"); -- -- System.out.print("Connected to " + brlapi.getHost()); -- System.out.print(" using key file " + brlapi.getAuth()); -- System.out.println(); -- -- System.out.print("Driver is " + brlapi.getDriverName()); -- System.out.println(); -- -- BrlapiSize size = brlapi.getDisplaySize(); -- System.out.println("Display size is " + size.getWidth() + "x" + size.getHeight()); -- -- int tty = brlapi.enterTtyMode(); -- System.out.println("TTY is " + tty); -- -- brlapi.writeText("ok !! €", Brlapi.CURSOR_OFF); -- brlapi.writeText(null, 1); -- -- long key[] = {0}; -- brlapi.ignoreKeys(Brlapi.rangeType_all, key); -- key[0] = BrlapiConstants.KEY_TYPE_CMD; -- brlapi.acceptKeys(Brlapi.rangeType_type, key); -- long keys[][] = {{0,2},{5,7}}; -- brlapi.ignoreKeyRanges(keys); -- -- printKey(new BrlapiKey(brlapi.readKey(true))); -- -- BrlapiWriteArguments ws = new BrlapiWriteArguments(); -- ws.regionBegin = 10; -- ws.regionSize = 20; -- ws.text = "Key Pressed € "; -- ws.andMask = "????????????????????".getBytes(); -- ws.cursor = 3; -- brlapi.write(ws); -- -- printKey(new BrlapiKey(brlapi.readKey(true))); -- -- brlapi.leaveTtyMode(); -- brlapi.closeConnection(); -- } catch (BrlapiError exception) { -- System.out.println("got error: " + exception); -- System.exit(3); -- } -- } -- -- private static void printKey (BrlapiKey key) { -- System.out.println("got key " + Long.toHexString(key.getCode()) + " (" + -- Integer.toHexString(key.getType()) + "," + -- Integer.toHexString(key.getCommand()) + "," + -- Integer.toHexString(key.getArgument()) + "," + -- Integer.toHexString(key.getFlags()) + ")"); -- } --} -diff -Naur brltty-3.9.orig/Bindings/Java/bindings.c brltty-3.9/Bindings/Java/bindings.c ---- brltty-3.9.orig/Bindings/Java/bindings.c 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/bindings.c 2008-02-28 14:05:14.000000000 +0100 -@@ -67,7 +67,7 @@ - char message[lenmsg + 2 + lenerr + 1]; - snprintf(message, sizeof(message), "%s: %s", msg, error); - -- if (!(jcexcep = (*jenv)->FindClass(jenv, "BrlapiError"))) { -+ if (!(jcexcep = (*jenv)->FindClass(jenv, "org.a11y.BrlAPI.Error"))) { - ThrowException(jenv, ERR_NULLPTR, "ThrowBrlapiErrorFindClass"); - return; - } -@@ -98,7 +98,7 @@ - } - (*env)->SetByteArrayRegion(env, jbuf, 0, size, (jbyte *) buf); - -- if (!(jcexcep = (*env)->FindClass(env, "BrlapiException"))) { -+ if (!(jcexcep = (*env)->FindClass(env, "org.a11y.BrlAPI.Exception"))) { - ThrowException(env, ERR_NULLPTR, "exceptionHandlerFindClass"); - return; - } -@@ -137,7 +137,7 @@ - return ret; \ - } - --JNIEXPORT jint JNICALL Java_BrlapiNative_openConnection(JNIEnv *jenv, jobject jobj, jobject JclientSettings , jobject JusedSettings) { -+JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_openConnection(JNIEnv *jenv, jobject jobj, jobject JclientSettings , jobject JusedSettings) { - jclass jcclientSettings, jcusedSettings; - jfieldID clientAuthID = NULL, clientHostID = NULL, usedAuthID, usedHostID; - brlapi_connectionSettings_t clientSettings, usedSettings, -@@ -226,7 +226,7 @@ - return (jint) result; - } - --JNIEXPORT void JNICALL Java_BrlapiNative_closeConnection(JNIEnv *jenv, jobject jobj) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_closeConnection(JNIEnv *jenv, jobject jobj) { - env = jenv; - GET_HANDLE(jenv, jobj, ); - -@@ -235,7 +235,7 @@ - (*jenv)->SetLongField(jenv, jcls, handleID, (jlong) (intptr_t) NULL); - } - --JNIEXPORT jstring JNICALL Java_BrlapiNative_getDriverName(JNIEnv *jenv, jobject jobj) { -+JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Native_getDriverName(JNIEnv *jenv, jobject jobj) { - char name[32]; - GET_HANDLE(jenv, jobj, NULL); - -@@ -250,7 +250,7 @@ - return (*jenv)->NewStringUTF(jenv, name); - } - --JNIEXPORT jobject JNICALL Java_BrlapiNative_getDisplaySize(JNIEnv *jenv, jobject jobj) { -+JNIEXPORT jobject JNICALL Java_org_a11y_BrlAPI_Native_getDisplaySize(JNIEnv *jenv, jobject jobj) { - unsigned int x, y; - jclass jcsize; - jmethodID jinit; -@@ -264,7 +264,7 @@ - return NULL; - } - -- if (!(jcsize = (*jenv)->FindClass(jenv, "BrlapiSize"))) { -+ if (!(jcsize = (*jenv)->FindClass(jenv, "org.a11y.BrlAPI.DisplaySize"))) { - ThrowException(jenv, ERR_NULLPTR, __func__); - return NULL; - } -@@ -280,7 +280,7 @@ - return jsize; - } - --JNIEXPORT jint JNICALL Java_BrlapiNative_enterTtyMode(JNIEnv *jenv, jobject jobj, jint jtty, jstring jdriver) { -+JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_enterTtyMode(JNIEnv *jenv, jobject jobj, jint jtty, jstring jdriver) { - int tty ; - char *driver; - int result; -@@ -306,7 +306,7 @@ - return (jint) result; - } - --JNIEXPORT void JNICALL Java_BrlapiNative_enterTtyModeWithPath(JNIEnv *jenv, jobject jobj, jintArray jttys, jstring jdriver) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_enterTtyModeWithPath(JNIEnv *jenv, jobject jobj, jintArray jttys, jstring jdriver) { - jint *ttys ; - char *driver; - int result; -@@ -338,7 +338,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_leaveTtyMode(JNIEnv *jenv, jobject jobj) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_leaveTtyMode(JNIEnv *jenv, jobject jobj) { - env = jenv; - GET_HANDLE(jenv, jobj, ); - -@@ -348,7 +348,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_setFocus(JNIEnv *jenv, jobject jobj, jint jarg1) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_setFocus(JNIEnv *jenv, jobject jobj, jint jarg1) { - int arg1 ; - GET_HANDLE(jenv, jobj, ); - -@@ -361,7 +361,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_writeTextNative(JNIEnv *jenv, jobject jobj, jint jarg1, jstring jarg2) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_writeTextNative(JNIEnv *jenv, jobject jobj, jint jarg1, jstring jarg2) { - brlapi_writeArguments_t s = BRLAPI_WRITEARGUMENTS_INITIALIZER; - int result; - GET_HANDLE(jenv, jobj, ); -@@ -391,7 +391,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_writeDots(JNIEnv *jenv, jobject jobj, jbyteArray jarg1) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_writeDots(JNIEnv *jenv, jobject jobj, jbyteArray jarg1) { - jbyte *arg1; - int result; - GET_HANDLE(jenv, jobj, ); -@@ -417,7 +417,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_write(JNIEnv *jenv, jobject jobj, jobject jarguments) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_write(JNIEnv *jenv, jobject jobj, jobject jarguments) { - brlapi_writeArguments_t arguments = BRLAPI_WRITEARGUMENTS_INITIALIZER; - int result; - jstring text, andMask, orMask; -@@ -476,7 +476,7 @@ - } - } - --JNIEXPORT jlong JNICALL Java_BrlapiNative_readKey(JNIEnv *jenv, jobject jobj, jboolean jblock) { -+JNIEXPORT jlong JNICALL Java_org_a11y_BrlAPI_Native_readKey(JNIEnv *jenv, jobject jobj, jboolean jblock) { - brlapi_keyCode_t code; - int result; - GET_HANDLE(jenv, jobj, -1); -@@ -494,7 +494,7 @@ - return (jlong)code; - } - --JNIEXPORT void JNICALL Java_BrlapiNative_ignoreKeys(JNIEnv *jenv, jobject jobj, jlong jrange, jlongArray js) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_ignoreKeys(JNIEnv *jenv, jobject jobj, jlong jrange, jlongArray js) { - jlong *s; - unsigned int n; - int result; -@@ -520,7 +520,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_acceptKeys(JNIEnv *jenv, jobject jobj, jlong jrange, jlongArray js) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_acceptKeys(JNIEnv *jenv, jobject jobj, jlong jrange, jlongArray js) { - jlong *s; - unsigned int n; - int result; -@@ -546,21 +546,21 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_ignoreAllKeys(JNIEnv *jenv, jobject jobj) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_ignoreAllKeys(JNIEnv *jenv, jobject jobj) { - GET_HANDLE(jenv, jobj, ); - - if (brlapi__ignoreAllKeys(handle) < 0) - ThrowError(jenv, __func__); - } - --JNIEXPORT void JNICALL Java_BrlapiNative_acceptAllKeys(JNIEnv *jenv, jobject jobj) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_acceptAllKeys(JNIEnv *jenv, jobject jobj) { - GET_HANDLE(jenv, jobj, ); - - if (brlapi__acceptAllKeys(handle) < 0) - ThrowError(jenv, __func__); - } - --JNIEXPORT void JNICALL Java_BrlapiNative_ignoreKeyRanges(JNIEnv *jenv, jobject jobj, jobjectArray js) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_ignoreKeyRanges(JNIEnv *jenv, jobject jobj, jobjectArray js) { - unsigned int n; - GET_HANDLE(jenv, jobj, ); - -@@ -591,7 +591,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_acceptKeyRanges(JNIEnv *jenv, jobject jobj, jobjectArray js) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_acceptKeyRanges(JNIEnv *jenv, jobject jobj, jobjectArray js) { - unsigned int n; - GET_HANDLE(jenv, jobj, ); - -@@ -622,7 +622,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_enterRawMode(JNIEnv *jenv, jobject jobj, jstring jdriver) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_enterRawMode(JNIEnv *jenv, jobject jobj, jstring jdriver) { - env = jenv; - char *driver; - int res; -@@ -642,7 +642,7 @@ - } - } - --JNIEXPORT void JNICALL Java_BrlapiNative_leaveRawMode(JNIEnv *jenv, jobject jobj) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_leaveRawMode(JNIEnv *jenv, jobject jobj) { - env = jenv; - GET_HANDLE(jenv, jobj, ); - -@@ -652,7 +652,7 @@ - } - } - --JNIEXPORT jint JNICALL Java_BrlapiNative_sendRaw(JNIEnv *jenv, jobject jobj, jbyteArray jbuf) { -+JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_sendRaw(JNIEnv *jenv, jobject jobj, jbyteArray jbuf) { - jbyte *buf; - unsigned int n; - int result; -@@ -679,7 +679,7 @@ - return (jint) result; - } - --JNIEXPORT jint JNICALL Java_BrlapiNative_recvRaw(JNIEnv *jenv, jobject jobj, jbyteArray jbuf) { -+JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_recvRaw(JNIEnv *jenv, jobject jobj, jbyteArray jbuf) { - jbyte *buf; - unsigned int n; - int result; -@@ -707,7 +707,7 @@ - return (jint) result; - } - --JNIEXPORT jstring JNICALL Java_BrlapiNative_getPacketTypeName(JNIEnv *jenv, jclass jcls, jlong jtype) { -+JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Native_getPacketTypeName(JNIEnv *jenv, jclass jcls, jlong jtype) { - const char *type; - - env = jenv; -@@ -720,7 +720,7 @@ - return (*jenv)->NewStringUTF(jenv, type); - } - --JNIEXPORT jstring JNICALL Java_BrlapiError_toString (JNIEnv *jenv, jobject jerr) { -+JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Error_toString (JNIEnv *jenv, jobject jerr) { - jclass jcerr; - jfieldID brlerrnoID, libcerrnoID, gaierrnoID, errfunID; - jstring jerrfun; -@@ -750,7 +750,7 @@ - return (*jenv)->NewStringUTF(jenv, res); - } - --JNIEXPORT jstring JNICALL Java_BrlapiException_toString (JNIEnv *jenv, jobject jerr) { -+JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Exception_toString (JNIEnv *jenv, jobject jerr) { - jclass jcerr; - jfieldID handleID, errnoID, typeID, bufID; - jarray jbuf; -@@ -789,7 +789,7 @@ - return (*jenv)->NewStringUTF(jenv, errmsg); - } - --JNIEXPORT void JNICALL Java_BrlapiKey_expandKeyCode (JNIEnv *jenv, jobject obj, jlong jkey) { -+JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Key_expandKeyCode (JNIEnv *jenv, jobject obj, jlong jkey) { - jclass jckey; - jfieldID typeID, commandID, argumentID, flagsID; - brlapi_keyCode_t key = jkey; -diff -Naur brltty-3.9.orig/Bindings/Java/BrlapiError.java brltty-3.9/Bindings/Java/BrlapiError.java ---- brltty-3.9.orig/Bindings/Java/BrlapiError.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/BrlapiError.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,52 +0,0 @@ --/* -- * libbrlapi - A library providing access to braille terminals for applications. -- * -- * Copyright (C) 2006-2007 by -- * Samuel Thibault -- * Sébastien Hinderer -- * -- * libbrlapi comes with ABSOLUTELY NO WARRANTY. -- * -- * This is free software, placed under the terms of the -- * GNU Lesser General Public License, as published by the Free Software -- * Foundation; either version 2.1 of the License, -- * or (at your option) any later version. -- * Please see the file COPYING-API for details. -- * -- * Web Page: http://mielke.cc/brltty/ -- * -- * This software is maintained by Dave Mielke . -- */ -- --public class BrlapiError extends Exception { -- static final long serialVersionUID = 0; -- int brlerrno; -- int libcerrno; -- int gaierrno; -- String errfun; -- public final native String toString(); -- public BrlapiError(int brlerrno, int libcerrno, int gaierrno, String errfun) { -- this.brlerrno = brlerrno; -- this.libcerrno = libcerrno; -- this.gaierrno = gaierrno; -- this.errfun = errfun; -- } -- -- public final static int SUCCESS = 0; /* Success */ -- public final static int NOMEM = 1; /* Not enough memory */ -- public final static int TTYBUSY = 2; /* Already a connection running in this tty */ -- public final static int DEVICEBUSY = 3; /* Already a connection using RAW mode */ -- public final static int UNKNOWN_INSTRUCTION = 4; /* Not implemented in protocol */ -- public final static int ILLEGAL_INSTRUCTION = 5; /* Forbiden in current mode */ -- public final static int INVALID_PARAMETER = 6; /* Out of range or have no sense */ -- public final static int INVALID_PACKET = 7; /* Invalid size */ -- public final static int CONNREFUSED = 8; /* Connection refused */ -- public final static int OPNOTSUPP = 9; /* Operation not supported */ -- public final static int GAIERR = 10; /* Getaddrinfo error */ -- public final static int LIBCERR = 11; /* Libc error */ -- public final static int UNKNOWNTTY = 12; /* Couldn't find out the tty number */ -- public final static int PROTOCOL_VERSION = 13; /* Bad protocol version */ -- public final static int EOF = 14; /* Unexpected end of file */ -- public final static int EMPTYKEY = 15; /* Too many levels of recursion */ -- public final static int DRIVERERROR = 16; /* Packet returned by driver too large */ --} -diff -Naur brltty-3.9.orig/Bindings/Java/BrlapiException.java brltty-3.9/Bindings/Java/BrlapiException.java ---- brltty-3.9.orig/Bindings/Java/BrlapiException.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/BrlapiException.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,34 +0,0 @@ --/* -- * libbrlapi - A library providing access to braille terminals for applications. -- * -- * Copyright (C) 2006-2007 by -- * Samuel Thibault -- * Sébastien Hinderer -- * -- * libbrlapi comes with ABSOLUTELY NO WARRANTY. -- * -- * This is free software, placed under the terms of the -- * GNU Lesser General Public License, as published by the Free Software -- * Foundation; either version 2.1 of the License, -- * or (at your option) any later version. -- * Please see the file COPYING-API for details. -- * -- * Web Page: http://mielke.cc/brltty/ -- * -- * This software is maintained by Dave Mielke . -- */ -- --public class BrlapiException extends Exception { -- static final long serialVersionUID = 0; -- long handle; -- int errno; -- long packettype; -- byte buf[]; -- public final native String toString(); -- public BrlapiException(long handle, int errno, int packettype, byte buf[]) { -- this.handle = handle; -- this.errno = errno; -- this.packettype = packettype; -- this.buf = buf; -- } --} -diff -Naur brltty-3.9.orig/Bindings/Java/Brlapi.java brltty-3.9/Bindings/Java/Brlapi.java ---- brltty-3.9.orig/Bindings/Java/Brlapi.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/Brlapi.java 2008-02-28 14:05:14.000000000 +0100 -@@ -18,12 +18,14 @@ - * This software is maintained by Dave Mielke . - */ - --public class Brlapi extends BrlapiNative implements BrlapiConstants { -- protected final BrlapiSettings settings; -+package org.a11y.BrlAPI; -+ -+public class Brlapi extends Native implements Constants { -+ protected final ConnectionSettings settings; - protected final int fileDescriptor; - -- public Brlapi (BrlapiSettings settings) throws BrlapiError { -- this.settings = new BrlapiSettings(); -+ public Brlapi (ConnectionSettings settings) throws Error { -+ this.settings = new ConnectionSettings(); - fileDescriptor = openConnection(settings, this.settings); - } - -@@ -43,37 +45,37 @@ - return fileDescriptor; - } - -- public int enterTtyMode (int tty) throws BrlapiError { -+ public int enterTtyMode (int tty) throws Error { - return enterTtyMode(tty, null); - } - -- public int enterTtyMode (String driver) throws BrlapiError { -+ public int enterTtyMode (String driver) throws Error { - return enterTtyMode(TTY_DEFAULT, driver); - } - -- public int enterTtyMode () throws BrlapiError { -+ public int enterTtyMode () throws Error { - return enterTtyMode(null); - } - -- public void enterTtyModeWithPath (int ttys[]) throws BrlapiError { -+ public void enterTtyModeWithPath (int ttys[]) throws Error { - enterTtyModeWithPath(ttys, null); - } - -- public void writeText (int cursor) throws BrlapiError { -+ public void writeText (int cursor) throws Error { - writeText(cursor, null); - } - -- public void writeText (String text) throws BrlapiError { -+ public void writeText (String text) throws Error { - writeText(CURSOR_OFF, text); - } - -- public void writeText (String text, int cursor) throws BrlapiError { -+ public void writeText (String text, int cursor) throws Error { - writeText(cursor, text); - } - -- public void writeText (int cursor, String text) throws BrlapiError { -+ public void writeText (int cursor, String text) throws Error { - if (text != null) { -- BrlapiSize size = getDisplaySize(); -+ DisplaySize size = getDisplaySize(); - int count = size.getWidth() * size.getHeight(); - - { -diff -Naur brltty-3.9.orig/Bindings/Java/BrlapiKey.java brltty-3.9/Bindings/Java/BrlapiKey.java ---- brltty-3.9.orig/Bindings/Java/BrlapiKey.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/BrlapiKey.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,54 +0,0 @@ --/* -- * libbrlapi - A library providing access to braille terminals for applications. -- * -- * Copyright (C) 2006-2007 by -- * Samuel Thibault -- * Sébastien Hinderer -- * -- * libbrlapi comes with ABSOLUTELY NO WARRANTY. -- * -- * This is free software, placed under the terms of the -- * GNU Lesser General Public License, as published by the Free Software -- * Foundation; either version 2.1 of the License, -- * or (at your option) any later version. -- * Please see the file COPYING-API for details. -- * -- * Web Page: http://mielke.cc/brltty/ -- * -- * This software is maintained by Dave Mielke . -- */ -- --public class BrlapiKey { -- protected final long code; -- protected int type; -- protected int command; -- protected int argument; -- protected int flags; -- -- public final native void expandKeyCode (long code); -- -- public BrlapiKey (long code) { -- this.code = code; -- expandKeyCode(code); -- } -- -- public long getCode () { -- return code; -- } -- -- public int getType () { -- return type; -- } -- -- public int getCommand () { -- return command; -- } -- -- public int getArgument () { -- return argument; -- } -- -- public int getFlags () { -- return flags; -- } --} -diff -Naur brltty-3.9.orig/Bindings/Java/BrlapiNative.java brltty-3.9/Bindings/Java/BrlapiNative.java ---- brltty-3.9.orig/Bindings/Java/BrlapiNative.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/BrlapiNative.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,58 +0,0 @@ --/* -- * libbrlapi - A library providing access to braille terminals for applications. -- * -- * Copyright (C) 2006-2007 by -- * Samuel Thibault -- * Sébastien Hinderer -- * -- * libbrlapi comes with ABSOLUTELY NO WARRANTY. -- * -- * This is free software, placed under the terms of the -- * GNU Lesser General Public License, as published by the Free Software -- * Foundation; either version 2.1 of the License, -- * or (at your option) any later version. -- * Please see the file COPYING-API for details. -- * -- * Web Page: http://mielke.cc/brltty/ -- * -- * This software is maintained by Dave Mielke . -- */ -- --public class BrlapiNative { -- protected long handle; -- -- protected native int openConnection ( -- BrlapiSettings desiredSettings, -- BrlapiSettings actualSettings) -- throws BrlapiError; -- public native void closeConnection (); -- -- public native String getDriverName () throws BrlapiError; -- public native BrlapiSize getDisplaySize () throws BrlapiError; -- -- public native int enterTtyMode (int tty, String driver) throws BrlapiError; -- public native void enterTtyModeWithPath (int ttys[], String driver) throws BrlapiError; -- public native void leaveTtyMode () throws BrlapiError; -- public native void setFocus (int tty) throws BrlapiError; -- -- protected native void writeTextNative (int cursor, String text) throws BrlapiError; -- public native void writeDots (byte dots[]) throws BrlapiError; -- public native void write (BrlapiWriteArguments arguments) throws BrlapiError; -- -- public native long readKey (boolean wait) throws BrlapiError; -- public native void ignoreKeys (long type, long keys[]) throws BrlapiError; -- public native void acceptKeys (long type, long keys[]) throws BrlapiError; -- -- public native void ignoreAllKeys () throws BrlapiError; -- public native void acceptAllKeys () throws BrlapiError; -- -- public native void ignoreKeyRanges (long ranges[][]) throws BrlapiError; -- public native void acceptKeyRanges (long ranges[][]) throws BrlapiError; -- -- public native void enterRawMode (String driver) throws BrlapiError; -- public native void leaveRawMode () throws BrlapiError; -- public native int sendRaw (byte buffer[]) throws BrlapiError; -- public native int recvRaw (byte buffer[]) throws BrlapiError; -- -- public static native String getPacketTypeName (long type); --} -diff -Naur brltty-3.9.orig/Bindings/Java/BrlapiSettings.java brltty-3.9/Bindings/Java/BrlapiSettings.java ---- brltty-3.9.orig/Bindings/Java/BrlapiSettings.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/BrlapiSettings.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,37 +0,0 @@ --/* -- * libbrlapi - A library providing access to braille terminals for applications. -- * -- * Copyright (C) 2006-2007 by -- * Samuel Thibault -- * Sébastien Hinderer -- * -- * libbrlapi comes with ABSOLUTELY NO WARRANTY. -- * -- * This is free software, placed under the terms of the -- * GNU Lesser General Public License, as published by the Free Software -- * Foundation; either version 2.1 of the License, -- * or (at your option) any later version. -- * Please see the file COPYING-API for details. -- * -- * Web Page: http://mielke.cc/brltty/ -- * -- * This software is maintained by Dave Mielke . -- */ -- --public class BrlapiSettings { -- public String host; -- public String auth; -- -- public BrlapiSettings (String host, String auth) { -- this.host = host; -- this.auth = auth; -- } -- -- public BrlapiSettings (String host) { -- this(host, null); -- } -- -- public BrlapiSettings () { -- this(null); -- } --} -diff -Naur brltty-3.9.orig/Bindings/Java/BrlapiSize.java brltty-3.9/Bindings/Java/BrlapiSize.java ---- brltty-3.9.orig/Bindings/Java/BrlapiSize.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/BrlapiSize.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,37 +0,0 @@ --/* -- * libbrlapi - A library providing access to braille terminals for applications. -- * -- * Copyright (C) 2006-2007 by -- * Samuel Thibault -- * Sébastien Hinderer -- * -- * libbrlapi comes with ABSOLUTELY NO WARRANTY. -- * -- * This is free software, placed under the terms of the -- * GNU Lesser General Public License, as published by the Free Software -- * Foundation; either version 2.1 of the License, -- * or (at your option) any later version. -- * Please see the file COPYING-API for details. -- * -- * Web Page: http://mielke.cc/brltty/ -- * -- * This software is maintained by Dave Mielke . -- */ -- --public class BrlapiSize { -- protected final int width; -- protected final int height; -- -- public BrlapiSize (int width, int height) { -- this.width = width; -- this.height = height; -- } -- -- public int getWidth () { -- return width; -- } -- -- public int getHeight () { -- return height; -- } --} -diff -Naur brltty-3.9.orig/Bindings/Java/BrlapiWriteArguments.java brltty-3.9/Bindings/Java/BrlapiWriteArguments.java ---- brltty-3.9.orig/Bindings/Java/BrlapiWriteArguments.java 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/BrlapiWriteArguments.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,32 +0,0 @@ --/* -- * libbrlapi - A library providing access to braille terminals for applications. -- * -- * Copyright (C) 2006-2007 by -- * Samuel Thibault -- * Sébastien Hinderer -- * -- * libbrlapi comes with ABSOLUTELY NO WARRANTY. -- * -- * This is free software, placed under the terms of the -- * GNU Lesser General Public License, as published by the Free Software -- * Foundation; either version 2.1 of the License, -- * or (at your option) any later version. -- * Please see the file COPYING-API for details. -- * -- * Web Page: http://mielke.cc/brltty/ -- * -- * This software is maintained by Dave Mielke . -- */ -- --public class BrlapiWriteArguments { -- public int displayNumber = Brlapi.DISPLAY_DEFAULT; -- public int regionBegin = 0; -- public int regionSize = 0; -- public String text = null; -- public byte andMask[] = null; -- public byte orMask[] = null; -- public int cursor = Brlapi.CURSOR_LEAVE; -- -- public BrlapiWriteArguments () { -- } --} -diff -Naur brltty-3.9.orig/Bindings/Java/ConnectionSettings.java brltty-3.9/Bindings/Java/ConnectionSettings.java ---- brltty-3.9.orig/Bindings/Java/ConnectionSettings.java 1970-01-01 01:00:00.000000000 +0100 -+++ brltty-3.9/Bindings/Java/ConnectionSettings.java 2008-02-28 14:05:14.000000000 +0100 -@@ -0,0 +1,39 @@ -+/* -+ * libbrlapi - A library providing access to braille terminals for applications. -+ * -+ * Copyright (C) 2006-2007 by -+ * Samuel Thibault -+ * Sébastien Hinderer -+ * -+ * libbrlapi comes with ABSOLUTELY NO WARRANTY. -+ * -+ * This is free software, placed under the terms of the -+ * GNU Lesser General Public License, as published by the Free Software -+ * Foundation; either version 2.1 of the License, -+ * or (at your option) any later version. -+ * Please see the file COPYING-API for details. -+ * -+ * Web Page: http://mielke.cc/brltty/ -+ * -+ * This software is maintained by Dave Mielke . -+ */ -+ -+package org.a11y.BrlAPI; -+ -+public class ConnectionSettings { -+ public String host; -+ public String auth; -+ -+ public ConnectionSettings (String host, String auth) { -+ this.host = host; -+ this.auth = auth; -+ } -+ -+ public ConnectionSettings (String host) { -+ this(host, null); -+ } -+ -+ public ConnectionSettings () { -+ this(null); -+ } -+} -diff -Naur brltty-3.9.orig/Bindings/Java/constants.awk brltty-3.9/Bindings/Java/constants.awk ---- brltty-3.9.orig/Bindings/Java/constants.awk 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/constants.awk 2008-02-28 14:05:14.000000000 +0100 -@@ -19,7 +19,9 @@ - ############################################################################### - - BEGIN { -- print "public interface BrlapiConstants {" -+ print "package org.a11y.BrlAPI;" -+ print "" -+ print "public interface Constants {" - } - - END { -diff -Naur brltty-3.9.orig/Bindings/Java/DisplaySize.java brltty-3.9/Bindings/Java/DisplaySize.java ---- brltty-3.9.orig/Bindings/Java/DisplaySize.java 1970-01-01 01:00:00.000000000 +0100 -+++ brltty-3.9/Bindings/Java/DisplaySize.java 2008-02-28 14:05:14.000000000 +0100 -@@ -0,0 +1,39 @@ -+/* -+ * libbrlapi - A library providing access to braille terminals for applications. -+ * -+ * Copyright (C) 2006-2007 by -+ * Samuel Thibault -+ * Sébastien Hinderer -+ * -+ * libbrlapi comes with ABSOLUTELY NO WARRANTY. -+ * -+ * This is free software, placed under the terms of the -+ * GNU Lesser General Public License, as published by the Free Software -+ * Foundation; either version 2.1 of the License, -+ * or (at your option) any later version. -+ * Please see the file COPYING-API for details. -+ * -+ * Web Page: http://mielke.cc/brltty/ -+ * -+ * This software is maintained by Dave Mielke . -+ */ -+ -+package org.a11y.BrlAPI; -+ -+public class DisplaySize { -+ protected final int width; -+ protected final int height; -+ -+ public DisplaySize (int width, int height) { -+ this.width = width; -+ this.height = height; -+ } -+ -+ public int getWidth () { -+ return width; -+ } -+ -+ public int getHeight () { -+ return height; -+ } -+} -diff -Naur brltty-3.9.orig/Bindings/Java/Error.java brltty-3.9/Bindings/Java/Error.java ---- brltty-3.9.orig/Bindings/Java/Error.java 1970-01-01 01:00:00.000000000 +0100 -+++ brltty-3.9/Bindings/Java/Error.java 2008-02-28 14:05:14.000000000 +0100 -@@ -0,0 +1,54 @@ -+/* -+ * libbrlapi - A library providing access to braille terminals for applications. -+ * -+ * Copyright (C) 2006-2007 by -+ * Samuel Thibault -+ * Sébastien Hinderer -+ * -+ * libbrlapi comes with ABSOLUTELY NO WARRANTY. -+ * -+ * This is free software, placed under the terms of the -+ * GNU Lesser General Public License, as published by the Free Software -+ * Foundation; either version 2.1 of the License, -+ * or (at your option) any later version. -+ * Please see the file COPYING-API for details. -+ * -+ * Web Page: http://mielke.cc/brltty/ -+ * -+ * This software is maintained by Dave Mielke . -+ */ -+ -+package org.a11y.BrlAPI; -+ -+public class Error extends java.lang.Error { -+ static final long serialVersionUID = 0; -+ int brlerrno; -+ int libcerrno; -+ int gaierrno; -+ String errfun; -+ public final native String toString (); -+ public Error (int brlerrno, int libcerrno, int gaierrno, String errfun) { -+ this.brlerrno = brlerrno; -+ this.libcerrno = libcerrno; -+ this.gaierrno = gaierrno; -+ this.errfun = errfun; -+ } -+ -+ public final static int SUCCESS = 0; /* Success */ -+ public final static int NOMEM = 1; /* Not enough memory */ -+ public final static int TTYBUSY = 2; /* Already a connection running in this tty */ -+ public final static int DEVICEBUSY = 3; /* Already a connection using RAW mode */ -+ public final static int UNKNOWN_INSTRUCTION = 4; /* Not implemented in protocol */ -+ public final static int ILLEGAL_INSTRUCTION = 5; /* Forbiden in current mode */ -+ public final static int INVALID_PARAMETER = 6; /* Out of range or have no sense */ -+ public final static int INVALID_PACKET = 7; /* Invalid size */ -+ public final static int CONNREFUSED = 8; /* Connection refused */ -+ public final static int OPNOTSUPP = 9; /* Operation not supported */ -+ public final static int GAIERR = 10; /* Getaddrinfo error */ -+ public final static int LIBCERR = 11; /* Libc error */ -+ public final static int UNKNOWNTTY = 12; /* Couldn't find out the tty number */ -+ public final static int PROTOCOL_VERSION = 13; /* Bad protocol version */ -+ public final static int EOF = 14; /* Unexpected end of file */ -+ public final static int EMPTYKEY = 15; /* Too many levels of recursion */ -+ public final static int DRIVERERROR = 16; /* Packet returned by driver too large */ -+} -diff -Naur brltty-3.9.orig/Bindings/Java/Exception.java brltty-3.9/Bindings/Java/Exception.java ---- brltty-3.9.orig/Bindings/Java/Exception.java 1970-01-01 01:00:00.000000000 +0100 -+++ brltty-3.9/Bindings/Java/Exception.java 2008-02-28 14:05:14.000000000 +0100 -@@ -0,0 +1,36 @@ -+/* -+ * libbrlapi - A library providing access to braille terminals for applications. -+ * -+ * Copyright (C) 2006-2007 by -+ * Samuel Thibault -+ * Sébastien Hinderer -+ * -+ * libbrlapi comes with ABSOLUTELY NO WARRANTY. -+ * -+ * This is free software, placed under the terms of the -+ * GNU Lesser General Public License, as published by the Free Software -+ * Foundation; either version 2.1 of the License, -+ * or (at your option) any later version. -+ * Please see the file COPYING-API for details. -+ * -+ * Web Page: http://mielke.cc/brltty/ -+ * -+ * This software is maintained by Dave Mielke . -+ */ -+ -+package org.a11y.BrlAPI; -+ -+public class Exception extends java.lang.Exception { -+ static final long serialVersionUID = 0; -+ long handle; -+ int errno; -+ long packettype; -+ byte buf[]; -+ public final native String toString (); -+ public Exception (long handle, int errno, int packettype, byte buf[]) { -+ this.handle = handle; -+ this.errno = errno; -+ this.packettype = packettype; -+ this.buf = buf; -+ } -+} -diff -Naur brltty-3.9.orig/Bindings/Java/Key.java brltty-3.9/Bindings/Java/Key.java ---- brltty-3.9.orig/Bindings/Java/Key.java 1970-01-01 01:00:00.000000000 +0100 -+++ brltty-3.9/Bindings/Java/Key.java 2008-02-28 14:05:14.000000000 +0100 -@@ -0,0 +1,56 @@ -+/* -+ * libbrlapi - A library providing access to braille terminals for applications. -+ * -+ * Copyright (C) 2006-2007 by -+ * Samuel Thibault -+ * Sébastien Hinderer -+ * -+ * libbrlapi comes with ABSOLUTELY NO WARRANTY. -+ * -+ * This is free software, placed under the terms of the -+ * GNU Lesser General Public License, as published by the Free Software -+ * Foundation; either version 2.1 of the License, -+ * or (at your option) any later version. -+ * Please see the file COPYING-API for details. -+ * -+ * Web Page: http://mielke.cc/brltty/ -+ * -+ * This software is maintained by Dave Mielke . -+ */ -+ -+package org.a11y.BrlAPI; -+ -+public class Key { -+ protected final long code; -+ protected int type; -+ protected int command; -+ protected int argument; -+ protected int flags; -+ -+ public final native void expandKeyCode (long code); -+ -+ public Key (long code) { -+ this.code = code; -+ expandKeyCode(code); -+ } -+ -+ public long getCode () { -+ return code; -+ } -+ -+ public int getType () { -+ return type; -+ } -+ -+ public int getCommand () { -+ return command; -+ } -+ -+ public int getArgument () { -+ return argument; -+ } -+ -+ public int getFlags () { -+ return flags; -+ } -+} -diff -Naur brltty-3.9.orig/Bindings/Java/Makefile.in brltty-3.9/Bindings/Java/Makefile.in ---- brltty-3.9.orig/Bindings/Java/Makefile.in 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Java/Makefile.in 2008-02-28 14:06:35.000000000 +0100 -@@ -48,32 +48,29 @@ - JAVA_JAR_FILE = $(API_NAME).jar - jar: $(JAVA_JAR_FILE) - --API_CLASSES = Brlapi.class BrlapiNative.class BrlapiError.class BrlapiException.class BrlapiSettings.class BrlapiWriteArguments.class BrlapiSize.class BrlapiKey.class --ALL_CLASSES = $(API_CLASSES) ApiTest.class -+$(JAVA_JAR_FILE): classes.made -+ $(JAR) cf $@ -C classes . - --$(JAVA_JAR_FILE): $(API_CLASSES) -- $(JAR) cf $@ Brlapi*.class -- --$(ALL_CLASSES): $(SRC_DIR)/*.java BrlapiConstants.class -- $(JAVAC) -d . -classpath . $(SRC_DIR)/*.java -- --BrlapiConstants.class: BrlapiConstants.java -- $(JAVAC) BrlapiConstants.java -+classes.made: $(SRC_DIR)/*.java Constants.java -+ $(INSTALL_DIRECTORY) classes -+ $(JAVAC) -d classes -classpath . $(SRC_DIR)/*.java -+ touch $@ - --BrlapiConstants.java: $(CONSTANTS_SCRIPTS) $(CONSTANTS_SOURCES) -+Constants.java: $(CONSTANTS_SCRIPTS) $(CONSTANTS_SOURCES) - $(AWK) $(CONSTANTS_OPTIONS) $(CONSTANTS_SOURCES) >$@ - --doc: javadoc.made -+doc: doc.made - --javadoc.made: $(SRC_DIR)/*.java BrlapiConstants.java -- $(JAVADOC) -quiet -d . -author -version -use $(SRC_DIR)/*.java BrlapiConstants.java -+doc.made: $(SRC_DIR)/*.java Constants.java -+ $(INSTALL_DIRECTORY) doc -+ $(JAVADOC) -quiet -d doc -author -version -use $(SRC_DIR)/*.java Constants.java - touch $@ - - clean:: -- -rm -f BrlapiConstants.java *.class $(JAVA_JAR_FILE) $(JAVA_JNI_FILE) -- -rm -f javadoc.made package-list *.css *.html -- -rm -f -r resources -- -rm -f gjdoc.properties JAVADOC.PLACEHOLDER -+ -rm -f Constants.java classes.made $(JAVA_JAR_FILE) $(JAVA_JNI_FILE) -+ -rm -f -r classes -+ -rm -f doc.made -+ -rm -f -r doc - - install: install-jar install-jni - -diff -Naur brltty-3.9.orig/Bindings/Java/Native.java brltty-3.9/Bindings/Java/Native.java ---- brltty-3.9.orig/Bindings/Java/Native.java 1970-01-01 01:00:00.000000000 +0100 -+++ brltty-3.9/Bindings/Java/Native.java 2008-02-28 14:05:14.000000000 +0100 -@@ -0,0 +1,60 @@ -+/* -+ * libbrlapi - A library providing access to braille terminals for applications. -+ * -+ * Copyright (C) 2006-2007 by -+ * Samuel Thibault -+ * Sébastien Hinderer -+ * -+ * libbrlapi comes with ABSOLUTELY NO WARRANTY. -+ * -+ * This is free software, placed under the terms of the -+ * GNU Lesser General Public License, as published by the Free Software -+ * Foundation; either version 2.1 of the License, -+ * or (at your option) any later version. -+ * Please see the file COPYING-API for details. -+ * -+ * Web Page: http://mielke.cc/brltty/ -+ * -+ * This software is maintained by Dave Mielke . -+ */ -+ -+package org.a11y.BrlAPI; -+ -+public class Native { -+ protected long handle; -+ -+ protected native int openConnection ( -+ ConnectionSettings desiredSettings, -+ ConnectionSettings actualSettings) -+ throws Error; -+ public native void closeConnection (); -+ -+ public native String getDriverName () throws Error; -+ public native DisplaySize getDisplaySize () throws Error; -+ -+ public native int enterTtyMode (int tty, String driver) throws Error; -+ public native void enterTtyModeWithPath (int ttys[], String driver) throws Error; -+ public native void leaveTtyMode () throws Error; -+ public native void setFocus (int tty) throws Error; -+ -+ protected native void writeTextNative (int cursor, String text) throws Error; -+ public native void writeDots (byte dots[]) throws Error; -+ public native void write (WriteArguments arguments) throws Error; -+ -+ public native long readKey (boolean wait) throws Error; -+ public native void ignoreKeys (long type, long keys[]) throws Error; -+ public native void acceptKeys (long type, long keys[]) throws Error; -+ -+ public native void ignoreAllKeys () throws Error; -+ public native void acceptAllKeys () throws Error; -+ -+ public native void ignoreKeyRanges (long ranges[][]) throws Error; -+ public native void acceptKeyRanges (long ranges[][]) throws Error; -+ -+ public native void enterRawMode (String driver) throws Error; -+ public native void leaveRawMode () throws Error; -+ public native int sendRaw (byte buffer[]) throws Error; -+ public native int recvRaw (byte buffer[]) throws Error; -+ -+ public static native String getPacketTypeName (long type); -+} -diff -Naur brltty-3.9.orig/Bindings/Java/Test.java brltty-3.9/Bindings/Java/Test.java ---- brltty-3.9.orig/Bindings/Java/Test.java 1970-01-01 01:00:00.000000000 +0100 -+++ brltty-3.9/Bindings/Java/Test.java 2008-02-28 14:05:14.000000000 +0100 -@@ -0,0 +1,106 @@ -+/* -+ * libbrlapi - A library providing access to braille terminals for applications. -+ * -+ * Copyright (C) 2006-2007 by -+ * Samuel Thibault -+ * Sébastien Hinderer -+ * -+ * libbrlapi comes with ABSOLUTELY NO WARRANTY. -+ * -+ * This is free software, placed under the terms of the -+ * GNU Lesser General Public License, as published by the Free Software -+ * Foundation; either version 2.1 of the License, -+ * or (at your option) any later version. -+ * Please see the file COPYING-API for details. -+ * -+ * Web Page: http://mielke.cc/brltty/ -+ * -+ * This software is maintained by Dave Mielke . -+ */ -+ -+package org.a11y.BrlAPI; -+ -+public class Test { -+ public static void main(String argv[]) { -+ ConnectionSettings settings = new ConnectionSettings(); -+ -+ { -+ int argi = 0; -+ while (argi < argv.length) { -+ String arg = argv[argi++]; -+ -+ if (arg.equals("-host")) { -+ if (argi == argv.length) { -+ System.err.println("Missing host specification."); -+ System.exit(2); -+ } -+ -+ settings.host = argv[argi++]; -+ continue; -+ } -+ -+ System.err.println("Invalid option: " + arg); -+ System.exit(2); -+ } -+ } -+ -+ try { -+ System.loadLibrary("brlapi_java"); -+ -+ System.out.print("Connecting to BrlAPI... "); -+ Brlapi brlapi = new Brlapi(settings); -+ System.out.println("done (fd=" + brlapi.getFileDescriptor() + ")"); -+ -+ System.out.print("Connected to " + brlapi.getHost()); -+ System.out.print(" using key file " + brlapi.getAuth()); -+ System.out.println(); -+ -+ System.out.print("Driver is " + brlapi.getDriverName()); -+ System.out.println(); -+ -+ DisplaySize size = brlapi.getDisplaySize(); -+ System.out.println("Display size is " + size.getWidth() + "x" + size.getHeight()); -+ -+ int tty = brlapi.enterTtyMode(); -+ System.out.println("TTY is " + tty); -+ -+ brlapi.writeText("ok !! €", Brlapi.CURSOR_OFF); -+ brlapi.writeText(null, 1); -+ -+ long key[] = {0}; -+ brlapi.ignoreKeys(Brlapi.rangeType_all, key); -+ key[0] = Constants.KEY_TYPE_CMD; -+ brlapi.acceptKeys(Brlapi.rangeType_type, key); -+ long keys[][] = {{0,2},{5,7}}; -+ brlapi.ignoreKeyRanges(keys); -+ -+ printKey(new Key(brlapi.readKey(true))); -+ -+ { -+ WriteArguments args = new WriteArguments(); -+ args.regionBegin = 10; -+ args.regionSize = 20; -+ args.text = "Key Pressed € "; -+ args.andMask = "????????????????????".getBytes(); -+ args.cursor = 3; -+ brlapi.write(args); -+ } -+ -+ printKey(new Key(brlapi.readKey(true))); -+ -+ brlapi.leaveTtyMode(); -+ brlapi.closeConnection(); -+ } catch (Error error) { -+ System.out.println("got error: " + error); -+ System.exit(3); -+ } -+ } -+ -+ private static void printKey (Key key) { -+ System.out.println("got key " + Long.toHexString(key.getCode()) + " (" + -+ Integer.toHexString(key.getType()) + "," + -+ Integer.toHexString(key.getCommand()) + "," + -+ Integer.toHexString(key.getArgument()) + "," + -+ Integer.toHexString(key.getFlags()) + ")"); -+ } -+} -diff -Naur brltty-3.9.orig/Bindings/Java/WriteArguments.java brltty-3.9/Bindings/Java/WriteArguments.java ---- brltty-3.9.orig/Bindings/Java/WriteArguments.java 1970-01-01 01:00:00.000000000 +0100 -+++ brltty-3.9/Bindings/Java/WriteArguments.java 2008-02-28 14:05:14.000000000 +0100 -@@ -0,0 +1,34 @@ -+/* -+ * libbrlapi - A library providing access to braille terminals for applications. -+ * -+ * Copyright (C) 2006-2007 by -+ * Samuel Thibault -+ * Sébastien Hinderer -+ * -+ * libbrlapi comes with ABSOLUTELY NO WARRANTY. -+ * -+ * This is free software, placed under the terms of the -+ * GNU Lesser General Public License, as published by the Free Software -+ * Foundation; either version 2.1 of the License, -+ * or (at your option) any later version. -+ * Please see the file COPYING-API for details. -+ * -+ * Web Page: http://mielke.cc/brltty/ -+ * -+ * This software is maintained by Dave Mielke . -+ */ -+ -+package org.a11y.BrlAPI; -+ -+public class WriteArguments { -+ public int displayNumber = Brlapi.DISPLAY_DEFAULT; -+ public int regionBegin = 0; -+ public int regionSize = 0; -+ public String text = null; -+ public byte andMask[] = null; -+ public byte orMask[] = null; -+ public int cursor = Brlapi.CURSOR_LEAVE; -+ -+ public WriteArguments () { -+ } -+} diff --git a/brltty-3.9-parallel.patch b/brltty-3.9-parallel.patch deleted file mode 100644 index dae1c38..0000000 --- a/brltty-3.9-parallel.patch +++ /dev/null @@ -1,18 +0,0 @@ -2008-09-12 Stepan Kasal - - * Programs/Makefile.in (braille-drivers): Depend on `api'; - without this, make -j8 failed, because some of the drivers - call target `brlapi'. Recursive make is harmful. - -diff -up brltty-3.9/Programs/Makefile.in.parallel brltty-3.9/Programs/Makefile.in ---- brltty-3.9/Programs/Makefile.in.parallel 2007-10-17 17:19:24.000000000 +0200 -+++ brltty-3.9/Programs/Makefile.in 2008-09-12 17:44:54.000000000 +0200 -@@ -381,7 +381,7 @@ apitest.$O: - - ############################################################################### - --braille-drivers: txt2hlp -+braille-drivers: txt2hlp api - for driver in $(BRAILLE_EXTERNAL_DRIVER_NAMES); \ - do (cd $(BLD_TOP)$(BRL_DIR)/$$driver && $(MAKE) braille-driver braille-help) || exit 1; \ - done diff --git a/brltty-3.9-pyxfix.patch b/brltty-3.9-pyxfix.patch deleted file mode 100644 index cd9083a..0000000 --- a/brltty-3.9-pyxfix.patch +++ /dev/null @@ -1,45 +0,0 @@ -2008-09-13 Stepan Kasal - - Backport fix to satisfy current pyrex. - - * Bindings/Python/brlapi.pyx (ignoreKeys, acceptKeys): Do not - use keyword "type" as a name of a parameter. - ---- ./Bindings/Python/brlapi.pyx.orig 2007-10-17 17:19:30.000000000 +0200 -+++ ./Bindings/Python/brlapi.pyx 2008-09-12 18:08:47.000000000 +0200 -@@ -484,7 +484,7 @@ - else: - return { "type":ekc.type, "command":ekc.command, "argument":ekc.argument, "flags":ekc.flags } - -- def ignoreKeys(self, type, set): -+ def ignoreKeys(self, key_type, set): - """Ignore some key presses from the braille keyboard. - See brlapi_ignoreKeys(3). - -@@ -495,7 +495,7 @@ - cdef c_brlapi.brlapi_rangeType_t c_type - cdef c_brlapi.brlapi_keyCode_t *c_set - cdef unsigned int c_n -- c_type = type -+ c_type = key_type - c_n = len(set) - c_set = c_brlapi.malloc(c_n * sizeof(c_set[0])) - for i from 0 <= i < c_n: -@@ -509,7 +509,7 @@ - else: - return retval - -- def acceptKeys(self, type, set): -+ def acceptKeys(self, key_type, set): - """Accept some key presses from the braille keyboard. - See brlapi_ignoreKeys(3). - -@@ -520,7 +520,7 @@ - cdef c_brlapi.brlapi_rangeType_t c_type - cdef c_brlapi.brlapi_keyCode_t *c_set - cdef unsigned int c_n -- c_type = type -+ c_type = key_type - c_n = len(set) - c_set = c_brlapi.malloc(c_n * sizeof(c_set[0])) - for i from 0 <= i < c_n: diff --git a/brltty-3.9-tcl85path.patch b/brltty-3.9-tcl85path.patch deleted file mode 100644 index 8c91225..0000000 --- a/brltty-3.9-tcl85path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- brltty-3.9/Bindings/Tcl/pkgutil.tcl85 2007-10-17 17:19:30.000000000 +0200 -+++ brltty-3.9/Bindings/Tcl/pkgutil 2008-01-04 16:07:25.000000000 +0100 -@@ -31,7 +31,7 @@ - } - set directory [eval file join / [lrange $components $rootCount end]] - -- if {[lsearch -exact {lib lib64} [file tail $directory]] >= 0} { -+ if {[regexp /lib(64)?(/|$) $directory] >= 0} { - global optionValues packageName packageVersion - return [file join "$optionValues(root)$directory" "$packageName-$packageVersion"] - } diff --git a/brltty-gnusource.patch b/brltty-gnusource.patch new file mode 100644 index 0000000..b80508c --- /dev/null +++ b/brltty-gnusource.patch @@ -0,0 +1,17 @@ +2008-09-17 Stepan Kasal + + * configure.ac: Add -D_GNU_SOURCE to get struct ucred from + socket.h. + +diff -up brltty-3.10/configure.ac.gnusource brltty-3.10/configure.ac +--- brltty-3.10/configure.ac.gnusource 2008-07-17 00:19:54.000000000 +0200 ++++ brltty-3.10/configure.ac 2008-09-17 12:44:28.000000000 +0200 +@@ -779,7 +779,7 @@ AC_CACHE_CHECK([for system-dependent com + case "${host_os}" + in + linux*|gnu*|kfreebsd*) +- brltty_cv_prog_cc_sysflags="-D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED" ++ brltty_cv_prog_cc_sysflags="-D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE" + ;; + solaris*) + brltty_cv_prog_cc_sysflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__" diff --git a/brltty-parallel.patch b/brltty-parallel.patch new file mode 100644 index 0000000..e10b968 --- /dev/null +++ b/brltty-parallel.patch @@ -0,0 +1,20 @@ +2008-09-17 Stepan Kasal + + * Programs/Makefile.in (braille-drivers): Add + prerequisity `all' to prevent race of this make with nested + "make brlapi" when parallel make is used. Recursive make is + harmful. + +diff -up brltty-3.10/Makefile.in.parallel brltty-3.10/Makefile.in +diff -up brltty-3.10/Programs/Makefile.in.parallel brltty-3.10/Programs/Makefile.in +--- brltty-3.10/Programs/Makefile.in.parallel 2008-07-17 00:19:08.000000000 +0200 ++++ brltty-3.10/Programs/Makefile.in 2008-09-17 11:24:35.000000000 +0200 +@@ -399,7 +399,7 @@ apitest.$O: + + ############################################################################### + +-braille-drivers: txt2hlp ++braille-drivers: txt2hlp api + for driver in $(BRAILLE_EXTERNAL_DRIVER_NAMES); \ + do (cd $(BLD_TOP)$(BRL_DIR)/$$driver && $(MAKE) braille-driver braille-all) || exit 1; \ + done diff --git a/brltty.spec b/brltty.spec index 66bb444..584a126 100644 --- a/brltty.spec +++ b/brltty.spec @@ -1,5 +1,5 @@ -%define pkg_version 3.9 -%define api_version 0.5.1 +%define pkg_version 3.10 +%define api_version 0.5.2 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?pyver: %define pyver %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v")} @@ -9,20 +9,16 @@ Name: brltty Version: %{pkg_version} -Release: 3%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://mielke.cc/brltty/ Source: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz -Patch0: brltty-3.9-tcl85path.patch -Patch1: brltty-3.9-java-svn.patch -Patch2: brltty-3.9-gnusource.patch +Patch2: brltty-gnusource.patch Patch3: brltty-3.9-autoconf.patch -Patch4: brltty-3.9-pyxfix.patch -Patch5: brltty-3.9-parallel.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-InstallRoot +Patch5: brltty-parallel.patch +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Summary: Braille display driver for Linux/Unix -Requires(post): coreutils BuildRequires: byacc, glibc-kernheaders # BuildRequires: ocaml @@ -68,7 +64,7 @@ a refreshable braille display. Version: %{api_version} Group: Development/System License: LGPLv2+ -Requires: brlapi = %{api_version} +Requires: brlapi = %{api_version}-%{release} Summary: Headers, static archive, and documentation for BrlAPI %description -n brlapi-devel @@ -87,7 +83,7 @@ which directly accesses a refreshable braille display. Version: %{api_version} Group: Development/System License: LGPLv2+ -Requires: brlapi = %{api_version} +Requires: brlapi = %{api_version}-%{release} BuildRequires: tcl-devel tcl Summary: Tcl binding for BrlAPI %description -n tcl-brlapi @@ -97,7 +93,7 @@ This package provides the Tcl binding for BrlAPI. Version: %{api_version} Group: Development/System License: LGPLv2+ -Requires: brlapi = %{api_version} +Requires: brlapi = %{api_version}-%{release} BuildRequires: Pyrex Summary: Python binding for BrlAPI %description -n python-brlapi @@ -107,7 +103,7 @@ This package provides the Python binding for BrlAPI. Version: %{api_version} Group: Development/System License: LGPLv2+ -Requires: brlapi = %{api_version} +Requires: brlapi = %{api_version}-%{release} BuildRequires: java-devel #BuildRequires: java-1.7.0-icedtea-devel Summary: Java binding for BrlAPI @@ -118,15 +114,12 @@ This package provides the Java binding for BrlAPI. %prep %setup -q -%patch0 -p1 -b .tcl85path -%patch1 -p1 -b .java-svn %patch2 -p1 -b .gnusource %patch3 -p1 -b .autoconf -%patch4 -p1 -b .pyxfix %patch5 -p1 -b .parallel -./autogen %build +./autogen %configure --with-install-root="${RPM_BUILD_ROOT}" --with-braille-driver=-tt make %{?_smp_mflags} @@ -223,6 +216,13 @@ exit 0 %changelog +* Sat Sep 13 2008 Stepan Kasal - 3.10-1 +- new upstream release +- drop brltty-3.9-java-svn.patch, brltty-3.9-tcl85path.patch, + and brltty-3.9-pyxfix.patch, they are upstream +- fix BuildRoot +- fix many sub-packages' Requires on brlapi + * Wed Sep 10 2008 Stepan Kasal - 3.9-3 - add brltty-3.9-autoconf.patch to fix to build with Autoconf 2.62 - add brltty-3.9-parallel.patch to fix race condition with parallel make diff --git a/sources b/sources index 332271e..8f05564 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ce54ba2d38b7c220870e8c781f36743 brltty-3.9.tar.gz +d52f332a29e00495d166e7f45403fa9d brltty-3.10.tar.gz