Add source files and man page.

* Add bugtracker to manpage.
        * Print msg to stderr, when error dialog not available.
This commit is contained in:
QC 2014-09-06 14:57:30 +02:00
parent 10322b45a5
commit 15bee1f543
5 changed files with 11 additions and 2 deletions

View File

@ -318,6 +318,8 @@ Rofi supports the following keybindings:
**rofi** website can be found at [here](https://davedavenport.github.io/rofi/)
**rofi** bugtracker can be found [here](https://github.com/DaveDavenport/rofi/issues)
## AUTHOR
Qball Cow <qball@gmpclient.org>

View File

@ -422,6 +422,10 @@ Rofi supports the following keybindings:
\fBrofi\fP website can be found at here
.UR https://davedavenport.github.io/rofi/
.UE
.PP
\fBrofi\fP bugtracker can be found here
.UR https://github.com/DaveDavenport/rofi/issues
.UE
.SH AUTHOR
.PP
Qball Cow

View File

@ -1,3 +1,4 @@
#include <stdio.h>
#include <glib.h>
#include <rofi.h>
#include <helper.h>
@ -64,6 +65,8 @@ int helper_parse_setup ( char * string, char ***output, int *length, ... )
error->message );
#ifdef error_dialog
error_dialog ( msg );
#else
fputs ( msg, stderr );
#endif
g_free ( msg );
// print error.

View File

@ -1553,7 +1553,7 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
if ( state.selected_line != NULL ) {
// The cast to unsigned in here is valid, we checked if selected_line > 0.
// So its maximum range is 0-2³¹, well within the num_lines range.
if ( *( state.selected_line ) >= 0 && (unsigned int) ( *( state.selected_line ) ) <= state.num_lines ) {
if ( (*( state.selected_line )) >= 0 && (unsigned int) ( *( state.selected_line ) ) <= state.num_lines ) {
state.selected = *( state.selected_line );
}
}

View File

@ -73,7 +73,6 @@ pid_t execute_generator ( char * cmd )
static char **get_script_output ( char *command, unsigned int *length )
{
char buffer[1024];
char **retv = NULL;
*length = 0;
@ -81,6 +80,7 @@ static char **get_script_output ( char *command, unsigned int *length )
if ( fd >= 0 ) {
FILE *inp = fdopen ( fd, "r" );
if ( inp ) {
char buffer[1024];
while ( fgets ( buffer, 1024, inp ) != NULL ) {
retv = g_realloc ( retv, ( ( *length ) + 2 ) * sizeof ( char* ) );
retv[( *length )] = g_strdup ( buffer );