aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_utils.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-11-17screen_utils: check for NULL passwordMax Kellermann1-1/+10
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.
2008-11-07wreadln: return NULL instead of empty stringMax Kellermann1-1/+1
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.
2008-11-07disable more features with --enable-miniMax Kellermann1-0/+2
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
2008-10-06removed my_wgetch(), switch to wgetch()Max Kellermann1-1/+1
There are no special cases left for my_wgetch() to handle. We can remove it and use the original wgetch() instead.
2008-10-04use g_basename() instead of basename()Max Kellermann1-1/+1
Another occurence of the non-portable basename() wasn't converted to glib yet.
2008-10-03screen: export the global variable "screen"Max Kellermann1-20/+20
screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
2008-10-02moved i18n macros to i18n.hMax Kellermann1-1/+1
Don't make everybody include ncmpc.h just to have generic features. Move generic i18n macros to a separate header.
2008-09-25screen_utils: don't call wmove() twiceMax Kellermann1-3/+0
The second wmove() is redundant, because the cursor is already there after waddstr(). This also repairs wide characters in the prompt.
2008-09-25list_window: removed property "repaint"Max Kellermann1-3/+1
The property "repaint" is never read, since all callers repaint the list window on demand.
2008-09-25code style, indent with tabs XMax Kellermann1-3/+1
Follow the same code style als MPD itself.
2008-09-22screen_utils: simplified call to wreadln_masked()Max Kellermann1-3/+2
If prompt is NULL, do not add a second call to wreadln_masked() with a literal string, but assign this literal string to the variable "prompt". This saves several bytes in the compiled binary.
2008-09-22screen_utils: hide cursor after screen_read_password()Max Kellermann1-2/+5
The call to curs_set(0) in screen_read_password() was dead code, because it was after the function return. Repair that.
2008-09-22screen: unsigned integers for screen dimensionsMax Kellermann1-3/+3
Store screen width and height as unsigned integer.
2008-09-22code style, indent with tabs IXMax Kellermann1-158/+154
Follow the same code style als MPD itself.
2008-09-18use the glib main event loopMax Kellermann1-2/+0
This big patch replaces our custom main loop with the event based glib main loop. This has several advantages: we can make all the tiny code bits in the main loop independent from each others, we can add additional file descriptors for polling (e.g. the mpdclient socket). We don't need the ncurses timeout() anymore, because glib will poll stdin for us.
2008-09-16screen: added struct namesMax Kellermann1-2/+4
Let us declare struct names in addition to typedef names, so we can forward-declare them.
2008-09-15include cleanupMax Kellermann1-10/+5
A header should include all headers which he needs. Move local includes on top, and let foo.c include foo.h in the first line, to automatically test its dependencies.
2008-09-15screen_auth() returns resultMax Kellermann1-1/+2
screen_auth() returns an int, and its result is actually being used. Only the "return" was missing in its implementation. Return _screen_auth()'s result.
2008-09-15fix function prototypesMax Kellermann1-2/+2
Add missing prototypes, and fix wrong prototypes. Convert lots of functions to "static" when they are only used within the current source file.
2008-09-15const pointersMax Kellermann1-7/+7
Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings.
2008-09-15code style, indent with tabsMax Kellermann1-14/+13
Follow the same code style als MPD itself. This patch only fixes parts of the code which are going to be touched in the following bunch of patches, i.e. there will be more "code style" patches in the future.
2008-09-15remove unused static functionsMax Kellermann1-8/+0
Also remove some commented code and unused function parameters.
2006-09-08multi liner ;) fixed segfaultAndreas Obergrusberger1-2/+2
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4749 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-07due to bensonk's demand i added a splash screen.Andreas Obergrusberger1-2/+50
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4741 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-06-15New configuraton option: find-show-lastKalle Wallin1-1/+2
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3359 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-15Added a search screenKalle Wallin1-3/+4
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2668 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-13Use glib's str functions (g_strlcat, g_strlcpy, g_snprintf, g_strdup_vprintf)Kalle Wallin1-3/+4
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1868 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-13Use my_wgetch() instead of wgetch(), added --[no-]mouse optionKalle Wallin1-11/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1864 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-12Support SIGSTOP, SIGCONT in raw modeKalle Wallin1-0/+5
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1858 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-03Ignore mouse events in wreadln, screen_getchKalle Wallin1-2/+10
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1778 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-24Made the xterm title dynamic, added configuration option xterm-title-formatKalle Wallin1-8/+13
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1647 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-22added screen_bell() for optional audible/visible bellsKalle Wallin1-1/+28
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1612 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-19fixed the display of completion listsKalle Wallin1-4/+22
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1565 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-18Added completion stuffKalle Wallin1-0/+22
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1556 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-16Use the alert color in screen_readln()Kalle Wallin1-0/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1509 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-14Major cleanup of the mpd client code (mpc->mpdclient)Kalle Wallin1-4/+5
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1481 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-06Added wreadln.c, wreadln.h a simple line editorKalle Wallin1-19/+25
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1351 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-05Added initial i18n supportKalle Wallin1-3/+4
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-05Changed directory layout (for future use of gettext)Kalle Wallin1-0/+0
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1342 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-07Redesigned ncmpc's color supportKalle Wallin1-28/+3
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@937 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-21Fixed resize handling (SIGWINCH).Kalle Wallin1-0/+2
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@871 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-19Added copyright notice and license noticeKalle Wallin1-0/+18
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@833 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-28We now allocate and free memory with glibKalle Wallin1-2/+2
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@526 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-27Include "config.h" before support.hKalle Wallin1-0/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@518 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-27Added function screen_getch().Kalle Wallin1-2/+27
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@509 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-26Added reversed and wrapped list search (find).Kalle Wallin1-0/+69
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@497 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-25Added support for a configuration file ~/.ncmpcrc and color support.Kalle Wallin1-0/+28
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@473 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-24Moved list window fuctions to list_window.c. Kalle Wallin1-159/+0
Added function list_window_cmd() for basic commands (movment). git-svn-id: https://svn.musicpd.org/ncmpc/trunk@454 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-23Use screen_status_printf() instead of screen_status_message().Kalle Wallin1-10/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@418 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-22Modified list_window_find() - case independet search (strcasecmp).Kalle Wallin1-5/+5
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@371 09075e82-0dd4-0310-85a5-a0d7c8717e4f