Code

ncmpc.git
15 years agoncmpc version 0.12~beta1 v0.12_beta1
Max Kellermann [Tue, 25 Nov 2008 20:35:24 +0000 (21:35 +0100)]
ncmpc version 0.12~beta1

First beta version for the upcoming version 0.12.

15 years agoNEWS update for 0.12~beta1
Max Kellermann [Tue, 25 Nov 2008 20:31:22 +0000 (21:31 +0100)]
NEWS update for 0.12~beta1

15 years agoscreen_artist: fixes for the ncmpc-mini build
Max Kellermann [Tue, 25 Nov 2008 20:14:07 +0000 (21:14 +0100)]
screen_artist: fixes for the ncmpc-mini build

Disable the highlighting code which has slipped out of the NCMPC_MINI
checks.

15 years agoncmpc-mini: disable scrolling
Max Kellermann [Tue, 25 Nov 2008 20:11:23 +0000 (21:11 +0100)]
ncmpc-mini: disable scrolling

The scrolling code broke in the ncmpc-mini build.  Disable it when
--enable-mini was specified.

15 years agopo: updated German translation
Max Kellermann [Tue, 25 Nov 2008 20:04:30 +0000 (21:04 +0100)]
po: updated German translation

15 years agopo: removed translations which are obviously wrong
Max Kellermann [Tue, 25 Nov 2008 20:04:22 +0000 (21:04 +0100)]
po: removed translations which are obviously wrong

Removed fuzzy and non-fuzzy translations which look obviously wrong.
No translation is better than a wrong one.

15 years agopo: merged new strings in all languages
Max Kellermann [Tue, 25 Nov 2008 20:04:13 +0000 (21:04 +0100)]
po: merged new strings in all languages

Removed exclamation marks also from the translated strings.

15 years agopo: enabled Slovakian translation
Max Kellermann [Tue, 25 Nov 2008 20:04:09 +0000 (21:04 +0100)]
po: enabled Slovakian translation

The Slovakian translation was added a while ago, but it was not
enabled in configure.ac.

15 years agopo: regenerated ncmpc.pot
Max Kellermann [Tue, 25 Nov 2008 20:03:46 +0000 (21:03 +0100)]
po: regenerated ncmpc.pot

15 years agopo: improved translatable strings for easier translation
Max Kellermann [Tue, 25 Nov 2008 20:03:28 +0000 (21:03 +0100)]
po: improved translatable strings for easier translation

Remove exclamation marks and other markup from the strings.

15 years agoscreen: simplify screen list strings
Max Kellermann [Tue, 25 Nov 2008 20:03:27 +0000 (21:03 +0100)]
screen: simplify screen list strings

Removed the colon and the spaces from the translatable screen names.
This aims to simplify the translator's job.

15 years agolist_window: reset cursor when list is empty
Max Kellermann [Tue, 25 Nov 2008 17:44:42 +0000 (18:44 +0100)]
list_window: reset cursor when list is empty

Due to a side effect of the old "if" condition, the cursor was never
reset to the origin when the list was cleared.

15 years agoscreen_lyrics: reset cursor when the song changes
Max Kellermann [Tue, 25 Nov 2008 17:37:56 +0000 (18:37 +0100)]
screen_lyrics: reset cursor when the song changes

When the view is changed and a new song is about to be displayed,
reset the list's state and scroll back to the origin.

15 years agoremoved gcc.h
Max Kellermann [Mon, 24 Nov 2008 06:48:46 +0000 (07:48 +0100)]
removed gcc.h

gcc.h has been replaced with GLib's G_GNUC_ macros.

15 years agoscreen_search.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:49:06 +0000 (03:49 +0100)]
screen_search.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_play.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:48:38 +0000 (03:48 +0100)]
screen_play.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_lyrics.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:48:09 +0000 (03:48 +0100)]
screen_lyrics.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_keydef.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:47:46 +0000 (03:47 +0100)]
screen_keydef.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_help.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:47:24 +0000 (03:47 +0100)]
screen_help.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_file.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:47:05 +0000 (03:47 +0100)]
screen_file.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_browser.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:46:40 +0000 (03:46 +0100)]
screen_browser.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agoscreen_artist.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:45:45 +0000 (03:45 +0100)]
screen_artist.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agomain.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:45:17 +0000 (03:45 +0100)]
main.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agolyrics.c: replaced mpd_unused by G_GNUC_UNUSED
Thomas Jansen [Mon, 24 Nov 2008 02:43:47 +0000 (03:43 +0100)]
lyrics.c: replaced mpd_unused by G_GNUC_UNUSED

15 years agolirc: use GLib's G_GNUC_UNUSED instead of mpd_unused
Max Kellermann [Sun, 23 Nov 2008 17:51:32 +0000 (18:51 +0100)]
lirc: use GLib's G_GNUC_UNUSED instead of mpd_unused

The header gcc.h is going to fade away, in favor of GLib's G_GNUC_
macros.

15 years agoscreen_play: scroll long song names in the playlist
Matt Portas [Fri, 21 Nov 2008 15:39:31 +0000 (16:39 +0100)]
screen_play: scroll long song names in the playlist

If the song name under the cursor is too long for the terminal, scroll
it like in the statusbar.

15 years agopo: updated Spanish translation
Monika Brinkert [Wed, 19 Nov 2008 20:42:22 +0000 (21:42 +0100)]
po: updated Spanish translation

15 years agopo: updated German translation
Monika Brinkert [Wed, 19 Nov 2008 20:41:48 +0000 (21:41 +0100)]
po: updated German translation

15 years agopo: updated PO template
Monika Brinkert [Wed, 19 Nov 2008 09:09:05 +0000 (10:09 +0100)]
po: updated PO template

15 years agoscreen_search: don't include ncurses.h directly
Max Kellermann [Wed, 19 Nov 2008 08:45:51 +0000 (09:45 +0100)]
screen_search: don't include ncurses.h directly

screen.h has a check whether to include ncursesw/ncurses.h or
ncurses.h.  screen_search.c doesn't need to include it a second time,
and was missing the check.

15 years agoscreen_song: support CMD_SCREEN_LYRICS
Max Kellermann [Tue, 18 Nov 2008 23:07:02 +0000 (00:07 +0100)]
screen_song: support CMD_SCREEN_LYRICS

Show the lyrics of the song currently being displayed.

15 years agoscreen_song: free the song pointer
Max Kellermann [Tue, 18 Nov 2008 23:06:46 +0000 (00:06 +0100)]
screen_song: free the song pointer

Fix a memory leak.

15 years agoscreen_lyrics: support CMD_VIEW
Max Kellermann [Tue, 18 Nov 2008 23:06:22 +0000 (00:06 +0100)]
screen_lyrics: support CMD_VIEW

Jump to the song viewer screen.

15 years agoscreen_song: include cleanup
Max Kellermann [Tue, 18 Nov 2008 23:06:17 +0000 (00:06 +0100)]
screen_song: include cleanup

15 years agoscreen_song: check CMD_VIEW only if song screen is enabled
Max Kellermann [Tue, 18 Nov 2008 23:06:12 +0000 (00:06 +0100)]
screen_song: check CMD_VIEW only if song screen is enabled

15 years agoscreen_song: new screen which views song information
Max Kellermann [Tue, 18 Nov 2008 22:58:28 +0000 (23:58 +0100)]
screen_song: new screen which views song information

This new screen views all information available on a song: its
location, file name, and tags.

15 years agolibmpdclient: converted MPD_ERROR_ constants to enum
Max Kellermann [Tue, 18 Nov 2008 21:57:36 +0000 (22:57 +0100)]
libmpdclient: converted MPD_ERROR_ constants to enum

15 years agolibmpdclient: convert MPD_ACK_ constants to enum
Max Kellermann [Tue, 18 Nov 2008 21:57:14 +0000 (22:57 +0100)]
libmpdclient: convert MPD_ACK_ constants to enum

15 years agocommand: change 'locate' default hotkey to 'G'
Max Kellermann [Tue, 18 Nov 2008 21:55:24 +0000 (22:55 +0100)]
command: change 'locate' default hotkey to 'G'

Use the same hotkey as ncmpcpp.

15 years agoscreen_browser: always declare variable "entry"
Max Kellermann [Tue, 18 Nov 2008 21:47:40 +0000 (22:47 +0100)]
screen_browser: always declare variable "entry"

The local variable "entry" was only declared when lyrics were enabled,
but it is now used by CMD_LOCATE, too.

15 years agoscreen: method cmd() returns bool
Max Kellermann [Tue, 18 Nov 2008 21:09:23 +0000 (22:09 +0100)]
screen: method cmd() returns bool

Return true/false instead of 1/0.

15 years agoncu: include config.h, fix mouse and color support
Max Kellermann [Tue, 18 Nov 2008 20:57:17 +0000 (21:57 +0100)]
ncu: include config.h, fix mouse and color support

Due to config.h not being included, mouse and color support was always
disabled.

15 years agocommand: added CMD_LOCATE to locate song in database
Max Kellermann [Tue, 18 Nov 2008 20:51:57 +0000 (21:51 +0100)]
command: added CMD_LOCATE to locate song in database

Pressing 'l' switches to the file browser (screen_file) and locates
the previously selected song in the server's database.

15 years agoscreen_lyrics: duplicate current song
Max Kellermann [Tue, 18 Nov 2008 20:51:45 +0000 (21:51 +0100)]
screen_lyrics: duplicate current song

Don't store a pointer to the song passed to screen_lyrics_switch(),
duplicate it instead.  In the long term, it is too unsafe to work with
a foreign pointer.

15 years agoscreen_{file,artist,search}: repaint only if screen is visible
Max Kellermann [Tue, 18 Nov 2008 20:51:40 +0000 (21:51 +0100)]
screen_{file,artist,search}: repaint only if screen is visible

Don't repaint the screen after browser_cmd() if another screen has
been selected meanwhile.

15 years agofilelist: filelist_find_song() returns position instead of pointer
Max Kellermann [Tue, 18 Nov 2008 20:51:28 +0000 (21:51 +0100)]
filelist: filelist_find_song() returns position instead of pointer

Making the function return the index makes it more flexible: those who
want the pointer can use filelist_get(), and the others may use the
index for other purposes.

15 years agoscreen_browser: eliminated local variable "entity"
Max Kellermann [Tue, 18 Nov 2008 20:51:26 +0000 (21:51 +0100)]
screen_browser: eliminated local variable "entity"

"entity" is not being used after its initial assignment.

15 years agoscreen_browser: check if filelist is set
Max Kellermann [Tue, 18 Nov 2008 20:51:07 +0000 (21:51 +0100)]
screen_browser: check if filelist is set

When calling browser_change_directory() before a filelist was set,
ncmpc would crash due to a NULL pointer dereference.  This scenario is
not possible currently, since the open() method allocates the
filelist.

15 years agoscreen_browser: use bool for return values
Max Kellermann [Tue, 18 Nov 2008 20:50:11 +0000 (21:50 +0100)]
screen_browser: use bool for return values

Return true/false instead of 0/-1.

15 years agoscreen_lyrics: added gettext markers
Max Kellermann [Tue, 18 Nov 2008 20:49:34 +0000 (21:49 +0100)]
screen_lyrics: added gettext markers

15 years agopo: updated russian translation
Max Arnold [Tue, 18 Nov 2008 18:37:17 +0000 (19:37 +0100)]
po: updated russian translation

15 years agoncmpc version 0.12~alpha1 v0.12_alpha1
Max Kellermann [Mon, 17 Nov 2008 21:12:16 +0000 (22:12 +0100)]
ncmpc version 0.12~alpha1

First alpha version for the upcoming version 0.12.

15 years agoREADME: updated links, new home page
Max Kellermann [Mon, 17 Nov 2008 21:11:58 +0000 (22:11 +0100)]
README: updated links, new home page

The new home page is in the MPD wiki.

15 years agoconfigure.ac: enable color support by default
Max Kellermann [Mon, 17 Nov 2008 21:08:11 +0000 (22:08 +0100)]
configure.ac: enable color support by default

Many users love colors.  It would be too confusing for them to have
color options in the configuration file, but no color support enabled.

15 years agoMakefile.am: removed superfluous $(docdir) variable
Max Kellermann [Mon, 17 Nov 2008 21:00:35 +0000 (22:00 +0100)]
Makefile.am: removed superfluous $(docdir) variable

15 years agoremoved ChangeLog, added release dates to NEWS
Max Kellermann [Mon, 17 Nov 2008 21:00:31 +0000 (22:00 +0100)]
removed ChangeLog, added release dates to NEWS

The ChangeLog is useless, because it hasn't been updated in a while,
and due to the nature of git, the log will never be lost.

Switch to automake "foreign" mode, because "gnu" mandates the presence
of ChangeLog.

15 years agoREADME, TODO: removed outdated documentation
Max Kellermann [Mon, 17 Nov 2008 21:00:27 +0000 (22:00 +0100)]
README, TODO: removed outdated documentation

Removed the "Upgrading to ncmpc-0.11.0" section from README.  Deleted
the TODO file.

15 years agoINSTALL: mention C99 compiler requirements
Max Kellermann [Mon, 17 Nov 2008 21:00:26 +0000 (22:00 +0100)]
INSTALL: mention C99 compiler requirements

ncmpc uses C99 features.

15 years agoINSTALL: replaced generic instructions
Max Kellermann [Mon, 17 Nov 2008 21:00:03 +0000 (22:00 +0100)]
INSTALL: replaced generic instructions

Removed the generic GNU installation instructions, nobody will ever
bother to read this lengthy document.  Moved installation instructions
from README.

15 years agoNEWS update for 0.12~alpha1
Max Kellermann [Mon, 17 Nov 2008 20:52:46 +0000 (21:52 +0100)]
NEWS update for 0.12~alpha1

15 years agoconfigure.ac: enable artist screen by default
Max Kellermann [Mon, 17 Nov 2008 20:52:34 +0000 (21:52 +0100)]
configure.ac: enable artist screen by default

The artist screen has matured, and everybody should have it by
default.

15 years agoMakefile.am: added screen_play.h to $(ncmpc_headers)
Max Kellermann [Mon, 17 Nov 2008 20:52:00 +0000 (21:52 +0100)]
Makefile.am: added screen_play.h to $(ncmpc_headers)

screen_play.h was missing in the tarball.

15 years agopo: regenerated ncmpc.pot
Max Kellermann [Mon, 17 Nov 2008 20:51:03 +0000 (21:51 +0100)]
po: regenerated ncmpc.pot

15 years agopo: updated POTFILES.in
Max Kellermann [Mon, 17 Nov 2008 19:07:22 +0000 (20:07 +0100)]
po: updated POTFILES.in

Added new sources, removed screen_clock.c.

15 years agopo: improved russian translation
Max Arnold [Mon, 17 Nov 2008 18:03:06 +0000 (19:03 +0100)]
po: improved russian translation

15 years agoscreen_utils: check for NULL password
Max Kellermann [Mon, 17 Nov 2008 17:28:57 +0000 (18:28 +0100)]
screen_utils: check for NULL password

Fix a NULL pointer dereference and a memory leak: check if
screen_read_password() returns NULL, and don't call
mpd_sendPasswordCommand(NULL) in this case.  Free the password
when done.

15 years agolirc: refactored event handler
Thomas Jansen [Mon, 10 Nov 2008 13:13:46 +0000 (14:13 +0100)]
lirc: refactored event handler

 * moved lirc_event to lirc.c and split out the parts that depend on
   variables in main.c into three separate functions
 * changed keyboard_event accordingly to avoid duplicate code
 * merged lirc_event with ncmpc_lirc_get_command

15 years agoconfigure.ac: require autoconf 2.60
Max Kellermann [Fri, 7 Nov 2008 16:13:00 +0000 (17:13 +0100)]
configure.ac: require autoconf 2.60

15 years agompdclient: use g_utf8_collate()
Max Kellermann [Fri, 7 Nov 2008 15:37:32 +0000 (16:37 +0100)]
mpdclient: use g_utf8_collate()

Use one g_utf8_collate() call instead of g_utf8_collate_key() twice
plus strcmp().

15 years agowreadln: return NULL instead of empty string
Max Kellermann [Fri, 7 Nov 2008 15:17:21 +0000 (16:17 +0100)]
wreadln: return NULL instead of empty string

No wreadln() caller cares about an empty string.  Simplify the callers
by returning NULL instead of an allocated empty string.  This fixes
several memory leaks.

15 years agompdclient: removed _utf8 suffix from function names
Max Kellermann [Fri, 7 Nov 2008 15:17:21 +0000 (16:17 +0100)]
mpdclient: removed _utf8 suffix from function names

All functions must receive UTF-8 file names.  Delete all which still
work with locale strings, and remove the _utf8 suffix from the others.

15 years agompdclient: expect UTF-8 strings
Max Kellermann [Fri, 7 Nov 2008 15:14:39 +0000 (16:14 +0100)]
mpdclient: expect UTF-8 strings

Don't convert the character set of strings to and from the current
locale.  This library cannot know what the strings are going to be
used for, so it should not mess with them.

15 years agoscreen_search: fixed 2 memory leaks
Max Kellermann [Fri, 7 Nov 2008 15:14:32 +0000 (16:14 +0100)]
screen_search: fixed 2 memory leaks

Free the old pattern before prompting for a new one.  Free the old
filelist object before retrieving the new one.

15 years agoscreen_play: free the wreadln() return value
Max Kellermann [Fri, 7 Nov 2008 15:13:40 +0000 (16:13 +0100)]
screen_play: free the wreadln() return value

15 years agoscreen_browser: free g_path_get_dirname() return value
Max Kellermann [Fri, 7 Nov 2008 14:28:56 +0000 (15:28 +0100)]
screen_browser: free g_path_get_dirname() return value

The function browser_change_directory() did not free the return value
of g_path_get_dirname().

15 years agoscreen_file: optimized title formula
Max Kellermann [Fri, 7 Nov 2008 14:20:35 +0000 (15:20 +0100)]
screen_file: optimized title formula

Don't allocate and copy memory.

15 years agomain: optimized error_msg()
Max Kellermann [Fri, 7 Nov 2008 13:01:06 +0000 (14:01 +0100)]
main: optimized error_msg()

The pointer has already been checked for NULL, eliminate that check.

15 years agoMakefile.am: added custom rule with -fwhole-program
Max Kellermann [Fri, 7 Nov 2008 12:42:31 +0000 (13:42 +0100)]
Makefile.am: added custom rule with -fwhole-program

To make the ncmpc binary even smaller, you can compile all sources at
once with "--combine -fwhole-program".  Unfortunately, automake does
not support this mode.  For further experiments, this patch adds a
custom rule which creates the binary named "ncmpc-tiny" this way.

15 years agoconfigure.ac, Makefile.am: removed subversion keywords
Max Kellermann [Fri, 7 Nov 2008 12:37:58 +0000 (13:37 +0100)]
configure.ac, Makefile.am: removed subversion keywords

Removed $Id$.

15 years agodisable more features with --enable-mini
Max Kellermann [Fri, 7 Nov 2008 12:27:31 +0000 (13:27 +0100)]
disable more features with --enable-mini

Disable lots of smaller features which don't have a separate configure
option:
- xterm title
- screen list
- horizontal scrolling
- MPD version number check
- key binding checks
- character set conversion
- bitrate display
- highlighting in the file browser
- completion / history

15 years agoconfigure.ac: remove misplaced comma
Max Kellermann [Fri, 7 Nov 2008 12:27:29 +0000 (13:27 +0100)]
configure.ac: remove misplaced comma

15 years agocommand.h: include config.h
Max Kellermann [Fri, 7 Nov 2008 12:23:24 +0000 (13:23 +0100)]
command.h: include config.h

The source command.h checks for configure.ac options, so it needs to
include config.h.

15 years agocharset: don't allocate GError
Max Kellermann [Fri, 7 Nov 2008 12:22:45 +0000 (13:22 +0100)]
charset: don't allocate GError

Since the GError return value of g_convert_*() is ignored by ncmpc, we
don't need to retrieve it at all.

15 years agooptions: don't store disabled options
Max Kellermann [Fri, 7 Nov 2008 07:30:18 +0000 (08:30 +0100)]
options: don't store disabled options

Options which are disabled at compile time shouldn't reserve space for
their values in the options struct.

15 years agooptions: static initialization if possible
Max Kellermann [Fri, 7 Nov 2008 07:29:23 +0000 (08:29 +0100)]
options: static initialization if possible

Initialize the options struct statically.

15 years agooptions: removed deprecated options
Max Kellermann [Fri, 7 Nov 2008 07:28:53 +0000 (08:28 +0100)]
options: removed deprecated options

"reconnect" is always enabled.  "debug" code has been removed.

15 years agoconfigure.ac: added --disable-help-screen
Max Kellermann [Fri, 7 Nov 2008 07:27:14 +0000 (08:27 +0100)]
configure.ac: added --disable-help-screen

15 years agoconfigure.ac: added --disable-nls
Max Kellermann [Fri, 7 Nov 2008 07:25:51 +0000 (08:25 +0100)]
configure.ac: added --disable-nls

Option --disable-nls disables all NLS features, even if the system
supports it.

15 years agoconfigure.ac: added option --enable-mini
Max Kellermann [Fri, 7 Nov 2008 07:24:13 +0000 (08:24 +0100)]
configure.ac: added option --enable-mini

The option --enable-mini disables lots of features, and tries to
create a ncmpc binary which fits on very small machines.

15 years agoconfigure.ac: renamed $use_wide to $enable_wide
Max Kellermann [Fri, 7 Nov 2008 07:17:04 +0000 (08:17 +0100)]
configure.ac: renamed $use_wide to $enable_wide

15 years agoconfigure.ac: removed deprecated result line
Max Kellermann [Fri, 7 Nov 2008 07:17:01 +0000 (08:17 +0100)]
configure.ac: removed deprecated result line

15 years agoconfigure.ac: added LIRC configure switch
Max Kellermann [Fri, 7 Nov 2008 07:16:53 +0000 (08:16 +0100)]
configure.ac: added LIRC configure switch

Detect liblircclient with pkg-config.

15 years agolirc: pass writable string to lirc_init()
Max Kellermann [Fri, 7 Nov 2008 07:16:46 +0000 (08:16 +0100)]
lirc: pass writable string to lirc_init()

The "prog" argument of lirc_init() expects a non-const string.
Pass a local string variable.

15 years agonative LIRC support for ncmpc
Thomas Jansen [Fri, 7 Nov 2008 07:16:41 +0000 (08:16 +0100)]
native LIRC support for ncmpc

The attachment includes the patch and a sample .lircrc config for
testing purposes (i. e. only a few commands are mapped to IR events).
The config is rather simple to write: For each button add a block like
this to ~/.lircrc:

begin
     button = <button name from /etc/lircd.conf>
     prog = ncmpc
     config = <command name from src/command.c>
end

The patch is not finished, there are several problems that still need to
be solved:

1. the configure.ac modifications are just for testing purposes and
should be made optional with a parameter like --enable-lirc
for ./configure. Unfortunately I'm not an expert on autoconfig tools.

2. LIRC example code [1] suggests looping over lirc_code2char, probably
to have multiple actions that can be triggered from one button. Perhaps
lirc_event(...) should be moved to lirc.c and be heavily modified, no
longer being a mere copy of keyboard_event(...).

15 years agoMakefile.am: require automake 1.9
Max Kellermann [Fri, 7 Nov 2008 07:16:39 +0000 (08:16 +0100)]
Makefile.am: require automake 1.9

Makefile.am uses several features which are not available in the
ancient automake version 1.6.  Let's just raise the bar to 1.9.

15 years agoconfigure.ac: disable libtool
Max Kellermann [Fri, 7 Nov 2008 07:11:20 +0000 (08:11 +0100)]
configure.ac: disable libtool

libtool isn't required for the ncmpc build process, it only causes
massive slowdown.

15 years agoconfigure.ac: disabled the C++ and fortran checks
Max Kellermann [Tue, 14 Oct 2008 20:48:54 +0000 (22:48 +0200)]
configure.ac: disabled the C++ and fortran checks

Why check for C++ and fortran compilers?  This hack was borrowed from
Qball's gmpc git repository.

15 years agoscreen_browser: fix warning when lyrics screen is disabled
Max Kellermann [Wed, 8 Oct 2008 10:44:45 +0000 (12:44 +0200)]
screen_browser: fix warning when lyrics screen is disabled

A local variable was only used by the lyrics screen code.  Put #ifdef
around its declaration.

15 years agowreadln: support wide characters
Max Kellermann [Mon, 6 Oct 2008 15:03:31 +0000 (17:03 +0200)]
wreadln: support wide characters

wreadln() didn't distinguish narrow from wide characters, which
resulted in display corruption.  This patch adds a lot of internal
conversions between byte positions, screen positions and character
position, which hopefully fixes all these bugs.  Since these
conversions are quite expensive, the code should be revised and
optimized.

15 years agowreadln: wait for complete multibyte sequence in wreadln_insert_byte()
Max Kellermann [Mon, 6 Oct 2008 14:57:44 +0000 (16:57 +0200)]
wreadln: wait for complete multibyte sequence in wreadln_insert_byte()

For multibyte input, we should use wget_wch(), but this function isn't
supported properly on some platforms.  Add a patch which completes a
multibyte character with multiple non-blocking reads.  We'll see how
portable this hack is...