apply patches

This commit is contained in:
openKylinBot 2022-05-13 19:52:08 +08:00
commit ebbde20ab6
17 changed files with 136 additions and 35 deletions

View File

@ -1,5 +1,7 @@
#AUTOMAKE_OPTIONS = foreign #include-deps
SUBDIRS=src man doc
# Debian mod: don't autorecurse to doc directory; debian/rules runs its
# targets seperatly.
SUBDIRS=src man
EXTRA_DIST = README.OS2 ANNOUNCE aalib.lsm acconfig.h aalib.m4
bin_SCRIPTS = aalib-config
m4datadir = $(datadir)/aclocal

View File

@ -5,7 +5,7 @@ exec_prefix=@exec_prefix@
exec_prefix_set=no
usage="\
Usage: aalib-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
Usage: aalib-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--static-libs] [--cflags]"
if test $# -eq 0; then
echo "${usage}" 1>&2
@ -49,11 +49,14 @@ while test $# -gt 0; do
;;
@ENABLE_SHARED_TRUE@ --libs)
@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@ @AALIB_RLD_FLAGS@"
@ENABLE_SHARED_TRUE@ echo $libdirs @AALIB_LIBS@
@ENABLE_SHARED_TRUE@ echo $libdirs -laa
@ENABLE_SHARED_TRUE@ ;;
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
@ENABLE_STATIC_TRUE@ libdirs="-L@libdir@ @AALIB_RLD_FLAGS@"
@ENABLE_STATIC_TRUE@ if [ "`uname -s`" = Linux ]; then
@ENABLE_STATIC_TRUE@ printf "%s" "-lgpm "
@ENABLE_STATIC_TRUE@ fi
@ENABLE_STATIC_TRUE@ echo $libdirs @AALIB_LIBS@
@ENABLE_STATIC_TRUE@ ;;
*)

View File

@ -9,7 +9,7 @@
dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS
dnl
AC_DEFUN(AM_PATH_AALIB,
AC_DEFUN([AM_PATH_AALIB],
[dnl
dnl Get the cflags and libraries from the aalib-config script
dnl

View File

@ -1,8 +1,7 @@
include(aclocal.m4)
AC_INIT(src/aalib.c)
AM_INIT_AUTOMAKE(aalib,1.4.0)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(aalib,1.4.0)
AM_CONFIG_HEADER(src/config.h)
@ -92,7 +91,8 @@ AC_ARG_WITH(gpm-mouse,
AC_DEFINE(GPM_MOUSEDRIVER)
gpm_mousedriver=true
CFLAGS="$CFLAGS -I$withval/include"
AALIB_LIBS="$AALIB_LIBS -L$withval/lib -lgpm"
dnl See Debian hack below for explination.
dnl AALIB_LIBS="$AALIB_LIBS -L$withval/lib -lgpm"
AC_MSG_RESULT(defining use_gpm)
fi
)
@ -113,7 +113,13 @@ if test "$gpm_mousedriver_test" = yes; then
AC_CHECK_LIB(gpm, Gpm_Repeat,[
AC_DEFINE(GPM_MOUSEDRIVER)
gpm_mousedriver=true
AALIB_LIBS="$AALIB_LIBS -lgpm"
dnl Debian hack: Don't bother putting gpm on the libs list, so aalib-config
dnl will not require programs link with gpm. Since aalib itself links to
dnl gpm, gpm support is still pulled in for client programs, but they need
dnl not build-depend on it. This means that the -dev package need not
dnl depend on libgpm1g-dev, which is a good thing since gpm support is not
dnl available at all on some platforms like the hurd.
dnl AALIB_LIBS="$AALIB_LIBS -lgpm"
LIBS="$LIBS -lgpm"])
fi
@ -373,9 +379,9 @@ esac
# Set runtime shared library paths as needed
if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
AALIB_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
fi
#if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
# AALIB_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
#fi
if test $ARCH = solaris; then
AALIB_RLD_FLAGS="-R\${exec_prefix}/lib"

View File

@ -8,7 +8,7 @@
@settitle An ascii-art library
@dircategory Libraries
@direntry
* AA-lib: (aalib). An ASCII-art graphics library
* AA-lib: (aalib). An ASCII-art graphics library
@end direntry
@ -29,11 +29,11 @@ this permission notice are preserved on all copies.
@titlepage
@title{AA-lib @value{VERSION}}
@subtitle{An ascii-art library}
@subtitle{API-DESCRIPTION}
@title AA-lib @value{VERSION}
@subtitle An ascii-art library
@subtitle API-DESCRIPTION
@author{Jan Hubi@v cka & Kamil Toman}
@author Jan Hubi@v cka & Kamil Toman
@tex
Dukelsk\'ych bojovn\'\i ku 1944
@end tex
@ -1318,7 +1318,7 @@ To write new driver is quite easy. You need to implement just few very basic
functions (like initialization, drawing to screen etc...) and register it in
the driver registry. There is separate drivers for screen, mouse and keyboard.
@subsection Display driver
@section Display driver
Display driver is the most significant driver (of course) so it is recomended
to implement it first. Its structure is as follows:

View File

@ -23,10 +23,10 @@ and
programs.
.PP
All of these programs exist to demonstrate the capabilities of the aalib
library, an ascii art library.
library, an ASCII art library.
.PP
.B aafire
displays burning ascii art flames.
displays burning ASCII art flames.
.PP
.B aainfo
displays information about what drivers aalib will use for the display,
@ -38,6 +38,24 @@ saves a font to a file.
.PP
.B aatest
tests the capabilities of aalib.
.SH BUGS
Please report any bugs you find to Jan Hubicka <hubicka@freesoft.cz>.
.SH LICENSE
.BR aafire ,
.BR aainfo ,
.BR aasavefont ,
and
.BR aatest
are all covered by the GNU Lesser General Public License (LGPL).
.SH AUTHOR
Jan Hubicka <hubicka@freesoft.cz>
.PP
This manual page was written by Joey Hess,
for the Debian GNU/Linux system.
.SH SEE ALSO
.BR bb (1),
.BR aatv (1),
.BR aview (1),
.BR asciiview (1),
.BR aaflip (1),
.BR xaos (6).

51
man/aalib-config.1 Normal file
View File

@ -0,0 +1,51 @@
.TH AALIB 1
.SH NAME
aalib-config - script to get information about the installed version of aalib
.SH SYNOPSIS
.B aalib-config
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-static-libs] [\-\-cflags]
.SH DESCRIPTION
.PP
\fIaalib-config\fP is a tool that is used to configure to determine
the compiler and linker flags that should be used to compile
and link programs that use \fIaalib\fP. It is also used internally
to the .m4 macros for GNU autoconf that are included with \fIaalib\fP.
.
.SH OPTIONS
\fIaalib-config\fP accepts the following options:
.TP 8
.B \-\-version
Print the currently installed version of \fIaalib\fP on the standard output.
.TP 8
.B \-\-libs
Print the linker flags that are necessary to link a \fIaalib\fP program.
.TP 8
.B \-\-static-libs
Print the linker flags that are necessary to link a \fIaalib\fP program
statically.
.TP 8
.B \-\-cflags
Print the compiler flags that are necessary to compile a \fIaalib\fP program.
.TP 8
.B \-\-prefix=PREFIX
If specified, use PREFIX instead of the installation prefix that \fIaalib\fP
was built with when computing the output for the \-\-cflags and
\-\-libs options. This option is also used for the exec prefix
if \-\-exec\-prefix was not specified. This option must be specified
before any \-\-libs or \-\-cflags options.
.TP 8
.B \-\-exec\-prefix=PREFIX
If specified, use PREFIX instead of the installation exec prefix that
\fIaalib\fP was built with when computing the output for the \-\-cflags
and \-\-libs options. This option must be specified before any
\-\-libs or \-\-cflags options.
.SH COPYRIGHT
Copyright \(co 1998 Owen Taylor
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.
Modified for aalib by Joey Hess

View File

@ -57,7 +57,7 @@ libaa_la_SOURCES= \
aaattrs.c \
aaputpixel.c \
aarecfunc.c
libaa_la_LDFLAGS=@LDFLAGS@ -version-info 1:4:0
libaa_la_LDFLAGS=@LDFLAGS@ -version-info 1:4:0 -Wl,--version-script=aalib.1.4.ver
bin_PROGRAMS=aainfo aatest aafire aasavefont
aainfo_LDADD= libaa.la

View File

@ -112,7 +112,7 @@ static int curses_getchar(aa_context * c1, int wait)
return (AA_UP);
case KEY_DOWN:
return (AA_DOWN);
#ifdef KEY_MOUDE
#ifdef KEY_MOUSE
case KEY_MOUSE:
#ifdef GPM_MOUSEDRIVER
if (!__curses_usegpm)

View File

@ -36,8 +36,14 @@ static int curses_init(__AA_CONST struct aa_hardware_params *p, __AA_CONST void
dest->supported=AA_NORMAL_MASK;
#ifdef HAVE_TERMATTRS
a = termattrs();
if (a & A_DIM)
if (has_colors()) {
start_color();
init_pair(1, COLOR_BLACK, COLOR_BLACK);
dest->supported |= AA_DIM_MASK;
} else {
if (a & A_DIM)
dest->supported |= AA_DIM_MASK;
}
if (a & A_BOLD)
dest->supported |= AA_BOLD_MASK;
if (a & A_BOLD)
@ -86,7 +92,12 @@ static void curses_setattr(aa_context * c, int attr)
attrset(A_NORMAL);
break;
case AA_DIM:
attrset(A_DIM);
if (has_colors()) {
attrset(A_BOLD);
attron(COLOR_PAIR(1));
} else {
attrset(A_DIM);
}
break;
case AA_BOLD:
attrset(A_BOLD);

View File

@ -98,9 +98,9 @@ __AA_CONST char * __AA_CONST aa_help =
"Monitor parameters:\n"
" -dimmul <val> multiply factor for dim color (5.3)\n"
" -boldmul <val> multiply factor for dim color (2.7)\n"
" The default parameters are set to fit my monitor (15\" goldstar)\n"
" With contrast set to maximum and bright set to make black black\n"
" This values depends at quality of your monitor (and setting of controls\n"
" Defaultd settings should be OK for most PC monitors. But ideal monitor\n"
" Needs dimmul=1.71 boldmul=1.43. For example monitor used by SGI is very\n"
" close to this values. Also old 14\" vga monitors needs higher values.\n";
" The default parameters are based on my 15\" Goldstar monitor,)\n"
" With contrast set to maximum, and brightness to the minimum.\n"
" This values depend on your particular monitor and how the controls are set.\n"
" Default settings should be OK for most PC monitors, but an ideal monitor\n"
" needs dimmul=1.71 boldmul=1.43. SGI monitors, for example, are very\n"
" close to this values. Old 14\" VGA monitors need higher values.\n";

6
src/aalib.1.4.ver Normal file
View File

@ -0,0 +1,6 @@
AA_1.4 {
global:
aa_*; save_d; mem_d;
local:
*;
};

View File

@ -91,7 +91,7 @@ linux_init (__AA_CONST struct aa_hardware_params *p, __AA_CONST void *none,
sprintf (fname, "/dev/vcsa%i", vt);
vc[0] = fopen (fname, "w+");
if (vc[0] == NULL)
vc[0] = fopen (tmp, "w"), readonly = 1;
vc[0] = fopen (fname, "w"), readonly = 1;
nvcs = 1;
}
if (vc[0] == NULL)

View File

@ -200,7 +200,7 @@ static void vt_to_here(int num)
static int rawmode_init(void)
{
if (!closed)
return;
return (1);
mypid = getpid();
if (tty_fd == -1) {
tty_fd = fileno(stdin);

View File

@ -270,13 +270,13 @@ __AA_CONST struct aa_format aa_roff_format =
NORMALPRINTS,
{"",
"",
"\n.B ",
"\\fB",
"",
""
},
{"",
"",
"\n",
"\\fP",
"",
""
},

View File

@ -76,6 +76,7 @@ static int slang_getchar(aa_context * c1, int wait)
#endif
struct timeval tv;
fd_set readfds;
int evflag;
if (wait) {
setjmp(buf);
@ -124,7 +125,10 @@ static int slang_getchar(aa_context * c1, int wait)
return (AA_NONE);
}
if ((gpm_fd > -1) && (FD_ISSET(gpm_fd, &readfds))) {
if (Gpm_GetEvent(&ev) && gpm_handler
evflag = Gpm_GetEvent(&ev);
if ( evflag < 0 )
return AA_NONE;
if ( evflag == 1 && gpm_handler
&& ((*gpm_handler) (&ev, gpm_data))) {
gpm_hflag = 1;
return AA_MOUSE;

View File

@ -88,7 +88,7 @@ static int stdin_getchar(aa_context * c1, int wait)
if (c > 0 && c < 127 && c != 127)
return (c);
switch (c) {
#ifdef KEY_MOUDE
#ifdef KEY_MOUSE
case KEY_MOUSE:
return AA_MOUSE
#endif