Skip to content

Commit

Permalink
src: Misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshavardhana committed Jul 16, 2014
1 parent 255f572 commit 6d9c968
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
10 changes: 3 additions & 7 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# build and install the .info pages
AUTOMAKE_OPTIONS = info-in-builddir
info_TEXINFOS = freetalk.texi
freetalk_TEXINFOS = authors.texi gpl.texi fdl.texi permissions.texi
CLEANFILES = *~ freetalk.info

man_MANS = freetalk.1

EXTRA_DIST = $(man_MANS)
CLEANFILES = *~
DISTCLEANFILES = .deps/*.P *.info *vti


dist_man_MANS = freetalk.1
13 changes: 6 additions & 7 deletions src/freetalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,19 @@ stdin_input_cb (GIOChannel *chan, GIOCondition *cond, gpointer conn)
return TRUE;
}

char * get_word_break_characters() {

int i;
char *get_word_break_characters()
{
int i = 0;

if (rl_line_buffer[0] != '/') {
for (i = rl_point; i >= 0; i--) {
if (rl_line_buffer[i] == ':')
return rl_basic_word_break_characters;
return (char *)rl_basic_word_break_characters;
}
return "\t\n\"\\'`@$><=;|&{(";
}

return rl_basic_word_break_characters;

return (char *)rl_basic_word_break_characters;
}

void
Expand All @@ -149,7 +148,7 @@ interface_init (void)
rl_completion_word_break_hook = get_word_break_characters;
rl_callback_handler_install (state.prompt, process_line);
rl_attempted_completion_function = ft_auto_complete;
rl_completion_entry_function = complete_none;
rl_completion_entry_function = NULL;

state.async_printf = 1;

Expand Down
6 changes: 0 additions & 6 deletions src/interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@

void interpreter_init (void);
int interpreter (char *line);

static char *complete_none (const char *txt, int state)
{
return NULL;
}

char ** ft_auto_complete (const char *txt, int start, int end);

#endif /* __INTERPRETER_H__ */

0 comments on commit 6d9c968

Please sign in to comment.