--- screader-1.8.orig/README +++ screader-1.8/README @@ -4,7 +4,7 @@ This is a screen reader using a software Text-To-Speech package or a hardware speech synthesizer. It reads the screen information from the -device /dev/vcsa0 and puts it through to a TTS. The file /opt/etc/screader/tts +device /dev/vcsa and puts it through to a TTS. The file /etc/screader/tts contains the name(s) of the TTS to be used by screader. On my homepage www.inter.nl.net/users/jlemmens/ are some software speech synthesizers available. --- screader-1.8.orig/socket.c +++ screader-1.8/socket.c @@ -28,6 +28,7 @@ #include #include #include +#include #if !defined(NAMEDPIPE) #include #include @@ -64,7 +65,7 @@ extern struct win *fore, *wtab[], *console_window, *windows; extern struct NewWindow nwin_undef; #ifdef NETHACK -extern nethackflag; +extern int nethackflag; #endif #ifdef MULTIUSER extern char *multi; --- screader-1.8.orig/scr.h +++ screader-1.8/scr.h @@ -23,7 +23,7 @@ #endif #if defined (__JABT) || defined (__SCREADER) -# define VCS_FILE "/dev/vcsa0" +# define VCS_FILE "/dev/vcsa" #endif #define SCR_TEXT 0 #define SCR_ATTRIB 1 --- screader-1.8.orig/fileio.c +++ screader-1.8/fileio.c @@ -27,6 +27,7 @@ #include #include +#include #include #ifndef SIGINT @@ -38,7 +39,7 @@ #include "extern.h" #ifdef NETHACK -extern nethackflag; +extern int nethackflag; #endif extern struct display *display; --- screader-1.8.orig/input.c +++ screader-1.8/input.c @@ -25,6 +25,7 @@ RCS_ID("$Id: input.c,v 1.2 1994/05/31 12:32:08 mlschroe Exp $ FAU") #include +#include #include "config.h" #include "screader.h" #include "extern.h" --- screader-1.8.orig/process.c +++ screader-1.8/process.c @@ -29,6 +29,7 @@ #include #include #include +#include #if !defined(sun) && !defined(B43) && !defined(ISC) && !defined(pyr) && !defined(_CX_UX) # include #endif @@ -2325,10 +2326,12 @@ printcmd = SaveStr(*args); } if (*args == 0 || msgok) + { if (printcmd) Msg(0, "using '%s' as print command", printcmd); else Msg(0, "using termcap entries for printing"); + } break; case RC_DIGRAPH: Input("Enter digraph: ", 10, digraph_fn, INP_EVERY); --- screader-1.8.orig/Makefile.in +++ screader-1.8/Makefile.in @@ -19,7 +19,7 @@ CC = @CC@ CFLAGS = -O2 -D__SCREADER -Wall -LDFLAGS = -s +LDFLAGS = -s -lcrypt LIBS = @LIBS@ CPP_DEPEND=/lib/cpp -MM --- screader-1.8.orig/screader.1 +++ screader-1.8/screader.1 @@ -11,7 +11,7 @@ background program reads the screen and puts the information through to a software Text-To-Speech package (Like `festival') or a hardware speech synthesizer. (like `Accent') -It uses the device /dev/vcsa0. (See below) +It uses the device /dev/vcsa. (See below) A reverse space at column 80 indicates the line containing the internal pointer. @@ -141,7 +141,7 @@ .SH SCREEN_DEVICE .B Screader reads its information from a device -/dev/vcsa0. Kernels 1.1.92 or later provide this +/dev/vcsa. Kernels 1.1.92 or later provide this device. .SH "PUNCTUATION SCRIPT" Each time @@ -155,7 +155,7 @@ .IP festival_client.sh .P -as first command in the file /opt/etc/screader/tts. +as first command in the file /etc/screader/tts. It is supposed that before using this tts-command the festival server is started by the following command: .IP @@ -171,11 +171,11 @@ of the characters being typed when line_speak and auto_speak are toggled on. Also when word_mode is toggled on the whole line will be spoken out when typing. .SH FILES -.IP "/opt/etc/screader/tts" +.IP "/etc/screader/tts" This file contains the name(s) of the Text-To-Speech utility(s) to be used. -.IP "/opt/etc/screader/punctuation.?.sh" +.IP "/etc/screader/punctuation.?.sh" Punctuation scripts. -.IP "/dev/vcsa0" +.IP "/dev/vcsa" Screen_device. .SH SEE ALSO .BR screen "(1L), " vcs "(4), " festival "(1)" --- screader-1.8.orig/mark.c +++ screader-1.8/mark.c @@ -55,7 +55,7 @@ extern struct mchar mchar_so; #ifdef NETHACK -extern nethackflag; +extern int nethackflag; #endif int pastefont = 1; --- screader-1.8.orig/utmp.c +++ screader-1.8/utmp.c @@ -42,6 +42,7 @@ #include #include #include +#include #include "config.h" #include "screader.h" @@ -52,7 +53,7 @@ extern struct win *fore; extern char *LoginName; #ifdef NETHACK -extern nethackflag; +extern int nethackflag; #endif --- screader-1.8.orig/window.c +++ screader-1.8/window.c @@ -28,6 +28,7 @@ #include #include #include +#include #ifndef sun #include #endif --- screader-1.8.orig/scr.c +++ screader-1.8/scr.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "scr.h" #if defined (__XABT) || defined (__XSCREADER) --- screader-1.8.orig/display.c +++ screader-1.8/display.c @@ -681,10 +681,12 @@ y1 = D_y; if (x1 == D_width) + { if (D_CLP && D_AM) x1 = -1; /* don't know how the terminal treats this */ else x1--; + } if (x2 == D_width) x2--; dx = x2 - x1; @@ -1517,6 +1519,7 @@ ASSERT(from >= 0 && from < D_width); ASSERT(to >= 0 && to < D_width); if (!D_CLP && y == D_bot && to == D_width - 1) + { if (D_lp_missing || !cmp_mline(oml, ml, to)) { if ((D_IC || D_IM) && from < to) @@ -1535,6 +1538,7 @@ } else to--; + } for (x = from; x <= to; x++) { if (x || D_x != D_width || D_y != y - 1) --- screader-1.8.orig/tts.c +++ screader-1.8/tts.c @@ -34,7 +34,7 @@ if (scr.posx == 65) return; - w = open ("/dev/vcsa0", O_RDWR); + w = open ("/dev/vcsa", O_RDWR); for (x = 0; x <= y; x++) { lseek (w, 3 + 2 * x * scr.cols, 0); @@ -67,10 +67,10 @@ } /* beep */ /*********************************************************************\ -* getline - gets a line from file descriptor and returns its pointer. * +* local_getline - gets a line from file descriptor and returns its pointer. * \*********************************************************************/ -char *getline (FILE *r) +char *local_getline (FILE *r) { static char hulp[100]; int i = -1; @@ -83,7 +83,7 @@ } while (hulp[i] != '\n'); hulp[i] = 0; return (char *) hulp; -} /* getline */ +} /* local_getline */ /*************************************************************\ * Get_TTS_command - Get the TTS-command from the config-file. * @@ -113,7 +113,7 @@ rewind (r); tts_number = x = 0; } // if - strcpy (tts_command, getline (r)); + strcpy (tts_command, local_getline (r)); if (*tts_command == 0 || *tts_command == '#') { x--; @@ -406,6 +406,7 @@ if (auto_speak && ! word_mode) { if (old_posx + 1 == scr.posx) + { if (isspace (buftts[scr.posy * scr.cols + scr.posx - 1])) TTS ("space", 5, 1); else @@ -414,8 +415,10 @@ punctuation = 1; TTS (buftts + scr.posy * scr.cols + scr.posx - 1, 1, 1); punctuation = hlp; + } } // if if (old_posx - 1 == scr.posx) + { if (isspace (*last_tts_character)) TTS ("space", 5, 1); else @@ -424,6 +427,7 @@ punctuation = 1; TTS (last_tts_character, 1, 1); punctuation = hlp; + } } // if } // if key_pressed = 0; @@ -618,8 +622,10 @@ hlp = punctuation; punctuation = 1; if (auto_speak) + { if (isalnum (buftts[ptr])) Speak_Word (buftts, ptr); + } else TTS (buftts + ptr, 1, 1); punctuation = hlp; @@ -705,10 +711,12 @@ hlp = punctuation; punctuation = 1; if (auto_speak) + { if (isalnum (buftts[ptr])) Speak_Word (buftts, ptr); else TTS (buftts + ptr, 1, 1); + } punctuation = hlp; break; case 'r': /* right */ @@ -792,10 +800,10 @@ FILE *r; punctuation = 1; - stat ("/usr/lib/terminfo/v/vt100", &st); + stat ("/lib/terminfo/v/vt100", &st); tc_size = st.st_size; termcap = malloc (tc_size); - r = fopen ("/usr/lib/terminfo/v/vt100", "rb"); + r = fopen ("/lib/terminfo/v/vt100", "rb"); fread (termcap, tc_size, 1, r); fclose (r); getscrinfo (); --- screader-1.8.orig/os.h +++ screader-1.8/os.h @@ -347,51 +347,6 @@ #endif /***************************************************************** - * signal handling - */ - -#ifdef SIGVOID -# define SIGRETURN -# define sigret_t void -#else -# define SIGRETURN return 0; -# define sigret_t int -#endif - -/* Geeeee, reverse it? */ -#if defined(SVR4) || (defined(SYSV) && defined(ISC)) || defined(_AIX) || defined(linux) || defined(ultrix) || defined(__386BSD__) || defined(BSDI) || defined(POSIX) || defined(NeXT) -# define SIGHASARG -#endif - -#ifdef SIGHASARG -# define SIGPROTOARG (int) -# define SIGDEFARG (sigsig) int sigsig; -# define SIGARG 0 -#else -# define SIGPROTOARG (void) -# define SIGDEFARG () -# define SIGARG -#endif - -#ifndef SIGCHLD -#define SIGCHLD SIGCLD -#endif - -#if defined(POSIX) || defined(hpux) -# define signal xsignal -#else -# ifdef USESIGSET -# define signal sigset -# endif /* USESIGSET */ -#endif - -/* used in screen.c and attacher.c */ -#ifndef NSIG /* kbeal needs these w/o SYSV */ -# define NSIG 32 -#endif /* !NSIG */ - - -/***************************************************************** * Wait stuff */ @@ -438,6 +393,51 @@ /***************************************************************** + * signal handling + */ + +#ifdef SIGVOID +# define SIGRETURN +# define sigret_t void +#else +# define SIGRETURN return 0; +# define sigret_t int +#endif + +/* Geeeee, reverse it? */ +#if defined(SVR4) || (defined(SYSV) && defined(ISC)) || defined(_AIX) || defined(linux) || defined(ultrix) || defined(__386BSD__) || defined(BSDI) || defined(POSIX) || defined(NeXT) +# define SIGHASARG +#endif + +#ifdef SIGHASARG +# define SIGPROTOARG (int) +# define SIGDEFARG (sigsig) int sigsig; +# define SIGARG 0 +#else +# define SIGPROTOARG (void) +# define SIGDEFARG () +# define SIGARG +#endif + +#ifndef SIGCHLD +#define SIGCHLD SIGCLD +#endif + +#if defined(POSIX) || defined(hpux) +# define signal xsignal +#else +# ifdef USESIGSET +# define signal sigset +# endif /* USESIGSET */ +#endif + +/* used in screen.c and attacher.c */ +#ifndef NSIG /* kbeal needs these w/o SYSV */ +# define NSIG 32 +#endif /* !NSIG */ + + +/***************************************************************** * select stuff */ --- screader-1.8.orig/extern.h +++ screader-1.8/extern.h @@ -24,7 +24,7 @@ /* screen.c */ -extern void main __P((int, char **)); +extern int main __P((int, char **)); extern sigret_t SigHup __P(SIGPROTOARG); extern void eexit __P((int)); extern void Detach __P((int)); --- screader-1.8.orig/tts +++ screader-1.8/tts @@ -6,14 +6,14 @@ # # Rsynth version 1.5 1994/02/24 -`tr A-Z a-z | number2ascii | say` +#`tr A-Z a-z | number2ascii | say` -`number2ascii | mbrdico.american` +#`number2ascii | mbrdico.american` #`number2ascii | mbrdico.british` -`number2ascii -n | mbrdico.dutch.male` -`number2ascii -n | mbrdico.dutch.female` +#`number2ascii -n | mbrdico.dutch.male` +#`number2ascii -n | mbrdico.dutch.female` -`hadifix` +#`hadifix` #pipefilt | txt2pho | mbrola /opt/speech/mbrola/de1 - -.wav | bplay # Uncomment the following command if you use a hardware speech synthesizer @@ -34,7 +34,7 @@ # Festival Speech Synthesis System 1.1.1 beta January 1997 # Copyright (C) University of Edinburgh, 1996,1997. All rights reserved. -#festival --tts # The festival TTS +festival --tts # The festival TTS # or if festival --server is executed #festival_client.sh # The server/client way of festival is somewhat quicker than the --- screader-1.8.orig/ansi.c +++ screader-1.8/ansi.c @@ -27,6 +27,7 @@ #include #include #include +#include #ifndef sun /* we want to know about TIOCPKT. */ # include #endif @@ -820,12 +821,14 @@ if (c >= ' ' && c <= '/') { if (curr->w_intermediate) + { #ifdef KANJI if (curr->w_intermediate == '$') c |= '$' << 8; else #endif c = -1; + } curr->w_intermediate = c; } else if (c >= '0' && c <= '~') --- screader-1.8.orig/attacher.c +++ screader-1.8/attacher.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "config.h" #include "screader.h" #include "extern.h" @@ -315,7 +316,7 @@ #ifdef PASSWORD -static trysendstatok, trysendstatfail; +static int trysendstatok, trysendstatfail; static sigret_t trysendok SIGDEFARG --- screader-1.8.orig/screader.c +++ screader-1.8/screader.c @@ -328,7 +328,7 @@ FD_SET(ServerSocket, rp); } -void main (ac, av) +int main (ac, av) int ac; char **av; { @@ -378,7 +378,7 @@ * (otherwise, we might have problems with the select() call) */ closeallfiles(0); - strcpy (abt_dir, "/opt/etc/screader/"); + strcpy (abt_dir, "/etc/screader"); Init_TTS (); #ifdef DEBUG { --- screader-1.8.orig/tts.h +++ screader-1.8/tts.h @@ -28,7 +28,7 @@ extern char abt_dir[100]; #ifdef __SCREADER - typedef scrstat; +typedef scrstat; #endif extern scrstat scr; extern int vc_number; --- screader-1.8.orig/termcap.c +++ screader-1.8/termcap.c @@ -25,6 +25,7 @@ RCS_ID("$Id: termcap.c,v 1.8 1994/05/31 12:33:13 mlschroe Exp $ FAU") #include +#include #include "config.h" #include "screader.h" #include "extern.h" --- screader-1.8.orig/debian/control +++ screader-1.8/debian/control @@ -0,0 +1,16 @@ +Source: screader +Section: text +Priority: extra +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Mario Lang +Build-Depends: debhelper (>> 3.0.0), libncurses5-dev +Standards-Version: 3.5.2 + +Package: screader +Architecture: any +Depends: ${shlibs:Depends} +Recommends: festival +Description: Screen reader using software or hardware speech synthesizer + The background program screader reads the screen and puts the information + through to a software Text-To-Speech package (Like `festival') or a + hardware speech synthesizer. --- screader-1.8.orig/debian/examples +++ screader-1.8/debian/examples @@ -0,0 +1 @@ +festival_client.sh --- screader-1.8.orig/debian/dirs +++ screader-1.8/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +etc/screader +usr/share/man/man1 --- screader-1.8.orig/debian/changelog +++ screader-1.8/debian/changelog @@ -0,0 +1,45 @@ +screader (1.8-5.1ubuntu1) natty; urgency=low + + * add -lcrypt to linker options, fixes FTBFS (LP: #755986) + + -- Andreas Moog Tue, 12 Apr 2011 16:07:31 +0200 + +screader (1.8-5.1) unstable; urgency=low + + * Non-maintainer upload. + * tts.c: renamed getline to local_getline to avoid a conflict with the + function defined in stdio.h (Patch from Ubuntu) (Closes: #552832) + + -- Mehdi Dogguy Fri, 05 Feb 2010 21:55:38 +0100 + +screader (1.8-5) unstable; urgency=low + + * Rebuild to fix terminfo location (Closes: Bug#334183) + + -- Mario Lang Thu, 11 May 2006 14:34:34 +0200 + +screader (1.8-4) unstable; urgency=low + + * Use /dev/vcsa (Closes: Bug#175091) + + -- Mario Lang Wed, 8 Jan 2003 10:20:25 +0100 + +screader (1.8-3) unstable; urgency=low + + * Include festival_client.sh in /usr/share/doc/screader/examples/ + (Closes: Bug#169695) + + -- Mario Lang Tue, 19 Nov 2002 10:40:10 +0100 + +screader (1.8-2) unstable; urgency=low + + * Took the package from Denis. Thanks for your work. + * Use only dh_installman in debian/rules. + + -- Mario Lang Wed, 13 Nov 2002 20:40:13 +0100 + +screader (1.8-1) unstable; urgency=low + + * Initial Release. + + -- Denis Barbier Tue, 12 Nov 2002 21:37:23 +0100 --- screader-1.8.orig/debian/copyright +++ screader-1.8/debian/copyright @@ -0,0 +1,12 @@ +This package was debianized by Denis Barbier on +Tue, 12 Nov 2002 21:37:23 +0100. + +It was downloaded from http://www.euronet.nl/~acj/eng-screader.html + +Upstream Author: Jos Lemmens + +Copyright: + +This program is free software; it may be redistributed and/or modified +only under the terms of the GNU General Public License, which may be +found on Debian GNU/Linux systems as `/usr/share/common-licenses/GPL'. --- screader-1.8.orig/debian/rules +++ screader-1.8/debian/rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=3 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +INSTDIR = $(CURDIR)/debian/screader + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +config.status: configure + dh_testdir + # Add here commands to configure the package. + ./configure + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/screader. + install -m 0755 punctuation.?.sh.* $(INSTDIR)/etc/screader/ + install -m 0664 tts $(INSTDIR)/etc/screader/ + install -m 0755 screader $(INSTDIR)/usr/bin/ + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs README + dh_installman screader.1 + dh_installchangelogs ChangeLog + dh_installexamples + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install